GNU bug report logs -
#7516
[PATCH] lisp/startup.el (normal-top-level-add-subdirs-to-load-path) Exclude more VCS dirs
Previous Next
Reported by: Jari Aalto <jari.aalto <at> cante.net>
Date: Mon, 29 Nov 2010 14:00:04 UTC
Severity: wishlist
Tags: notabug
Found in version 23.2+1-5.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7516 in the body.
You can then email your comments to 7516 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7516
; Package
emacs
.
(Mon, 29 Nov 2010 14:00:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jari Aalto <jari.aalto <at> cante.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 29 Nov 2010 14:00:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Package: emacs
Version: 23.2+1-5.1
Severity: wishlist
Tags: patch
2010-11-29 Jari Aalto <jari.aalto <at> cante.net>
* startup.el: (normal-top-level-add-subdirs-to-load-path): Exclude
more VCS directories: .svn, .hg, .bzr, .git and .mtn (monotone).
-- System Information
Debian Release: squeeze/sid
APT Prefers testing
APT policy: (990, testing) (500, unstable) (1, experimental)
Architecture: amd64
Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Fri Sep 17 21:50:19 UTC 2010 x86_64 GNU/Linux
Locale: LANG=en_DK.UTF-8
-- Versions of packages `emacs depends on'.
Depends:
emacs23 23.2+1-5.1 GNU Emacs is the extensible self-documenting
emacs23-lucid 23.2+1-5.1 GNU Emacs is the extensible self-documenting
emacs23-nox 23.2+1-5.1 GNU Emacs is the extensible self-documenting
[0001-startup.el-normal-top-level-add-subdirs-to-load-path.patch (text/x-diff, inline)]
From ebdacca7a561c40777a087ef4a16f2752895edab Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto <at> cante.net>
Date: Mon, 29 Nov 2010 15:52:58 +0200
Subject: [PATCH] * startup.el: (normal-top-level-add-subdirs-to-load-path): Exclude
more VCS directories: .svn, .hg, .bzr, .git and .mtn (monotone).
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Jari Aalto <jari.aalto <at> cante.net>
---
lisp/startup.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lisp/startup.el b/lisp/startup.el
index da0264d..67f5ebc 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -419,7 +419,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
(push attrs normal-top-level-add-subdirs-inode-list)
(dolist (file contents)
;; The lower-case variants of RCS and CVS are for DOS/Windows.
- (unless (member file '("." ".." "RCS" "CVS" "rcs" "cvs"))
+ (unless (member file '("." ".." "RCS" "CVS" "rcs" "cvs"
+ ".svn" ".hg" ".bzr" ".git" .mtn"))
(when (and (string-match "\\`[[:alnum:]]" file)
;; Avoid doing a `stat' when it isn't necessary
;; because that can cause trouble when an NFS server
--
1.7.2.3
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7516
; Package
emacs
.
(Mon, 29 Nov 2010 18:06:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 7516 <at> debbugs.gnu.org (full text, mbox):
> * startup.el: (normal-top-level-add-subdirs-to-load-path): Exclude
> more VCS directories: .svn, .hg, .bzr, .git and .mtn (monotone).
Wouldn't it make more sense to skip anything that starts with a dot?
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7516
; Package
emacs
.
(Mon, 29 Nov 2010 22:29:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 7516 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
2010-11-29 20:11 Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
>> * startup.el: (normal-top-level-add-subdirs-to-load-path): Exclude
>> more VCS directories: .svn, .hg, .bzr, .git and .mtn (monotone).
>
> Wouldn't it make more sense to skip anything that starts with a dot?
Sure. See below.
Jari
2010-11-29 Jari Aalto <jari.aalto <at> cante.net>
* startup.el (normal-top-level-add-subdirs-to-load-path): Change
`member' to `string-match' file test. Skip all dot-files.
[0001-startup.el-normal-top-level-add-subdirs-to-load-path.patch (text/x-diff, inline)]
From 77eb2b69e60378fbfd8e1d70630ec136638381cd Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto <at> cante.net>
Date: Mon, 29 Nov 2010 15:52:58 +0200
Subject: [PATCH] startup.el: (normal-top-level-add-subdirs-to-load-path): Skip all dot files.
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Jari Aalto <jari.aalto <at> cante.net>
---
lisp/startup.el | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lisp/startup.el b/lisp/startup.el
index da0264d..5b9b62b 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -419,7 +419,9 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
(push attrs normal-top-level-add-subdirs-inode-list)
(dolist (file contents)
;; The lower-case variants of RCS and CVS are for DOS/Windows.
- (unless (member file '("." ".." "RCS" "CVS" "rcs" "cvs"))
+ ;; Skip all dot-files.
+ (unless (let ((case-fold-search t))
+ (string-match "^\\(RCS\\|CVS\\|\\..*\\)$" file))
(when (and (string-match "\\`[[:alnum:]]" file)
;; Avoid doing a `stat' when it isn't necessary
;; because that can cause trouble when an NFS server
--
1.7.2.3
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7516
; Package
emacs
.
(Mon, 29 Nov 2010 22:29:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 7516 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier wrote:
> Wouldn't it make more sense to skip anything that starts with a dot?
The very next line does:
(string-match "\\`[[:alnum:]]" file)
so this change seems unnecessary (the function is documented to behave
in this way). Empirically, .svn etc directories are already skipped,
so I don't see any point to this patch.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7516
; Package
emacs
.
(Thu, 02 Dec 2010 12:34:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 7516 <at> debbugs.gnu.org (full text, mbox):
On 2010-11-29 17:34, Glenn Morris wrote:
| Stefan Monnier wrote:
|
| > Wouldn't it make more sense to skip anything that starts with a dot?
|
| The very next line does:
|
| (string-match "\\`[[:alnum:]]" file)
Wouldn't the first two tests be redundant then in previous line:
(unless (member file '("." ".." "RCS" "CVS" "rcs" "cvs"))
========
Jari
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Fri, 03 Dec 2010 18:53:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jari Aalto <jari.aalto <at> cante.net>
:
bug acknowledged by developer.
(Fri, 03 Dec 2010 18:53:03 GMT)
Full text and
rfc822 format available.
Message #22 received at 7516-done <at> debbugs.gnu.org (full text, mbox):
jari wrote:
> Wouldn't the first two tests be redundant then in previous line:
>
> (unless (member file '("." ".." "RCS" "CVS" "rcs" "cvs"))
> ========
Why not test it and see?
Anyway, it's hardly a bug but I simplified it anyway.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 01 Jan 2011 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.