* bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers
@ 2014-11-21 16:12 Ivan Shmakov
2014-12-30 19:45 ` Ivan Shmakov
0 siblings, 1 reply; 7+ messages in thread
From: Ivan Shmakov @ 2014-11-21 16:12 UTC (permalink / raw)
To: 19140
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
Package: emacs
Severity: minor
Please consider the patch MIMEd.
* lisp/files.el (dir-locals-collect-variables): Use
default-directory in place of the file name while working on
non-file buffers (as hack-dir-local-variables already does.)
The issue I observe is as follows. First, I create ~/foo and
~/foo/ru directories, and a ~/foo/.dir-locals.el file like:
((nil
(ispell-local-dictionary . "esperanto"))
("ru"
(nil
(ispell-local-dictionary . "russian"))))
Then:
(with-temp-buffer
(cd "~/foo/ru/")
(hack-dir-local-variables-non-file-buffer)
;; .
dir-local-variables-alist)
The result is '((ispell-local-dictionary . "esperanto")),
contrary to the expected '((… . "russian")).
This does not happen for buffers associated with files:
(with-current-buffer (find-file-noselect "~/foo/ru/bar")
(hack-dir-local-variables)
;; .
dir-local-variables-alist)
Reading the code suggests that dir-locals-collect-variables
fails to handle the (stringp key) case properly when ‘file-name’
is nil, which is what my patch is intended to fix.
--
FSF associate member #7257 np. Conclusion — Apocalyptica … B6A0 230E 334A
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 562 bytes --]
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3567,8 +3569,10 @@
(defun dir-locals-collect-variables (class-variables root variables)
"Collect entries from CLASS-VARIABLES into VARIABLES.
ROOT is the root directory of the project.
Return the new variables list."
- (let* ((file-name (buffer-file-name))
+ (let* ((file-name (or (buffer-file-name)
+ ;; handle non-file buffers, too
+ default-directory))
(sub-file-name (if file-name
;; FIXME: Why not use file-relative-name?
(substring file-name (length root)))))
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers
2014-11-21 16:12 bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers Ivan Shmakov
@ 2014-12-30 19:45 ` Ivan Shmakov
2015-01-19 7:30 ` Katsumi Yamaoka
0 siblings, 1 reply; 7+ messages in thread
From: Ivan Shmakov @ 2014-12-30 19:45 UTC (permalink / raw)
To: 19140
Please consider the revised patch MIMEd.
* lisp/files.el (dir-locals-collect-variables): Use
default-directory in place of the file name while working on
non-file buffers (as hack-dir-local-variables already does.)
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
--- a/lisp/files.el
+++ b/lisp/files.el 2014-12-28 19:20:59+00:00
@@ -3628,7 +3628,9 @@ defun dir-locals-collect-variables (class-variables root variables)
"Collect entries from CLASS-VARIABLES into VARIABLES.
ROOT is the root directory of the project.
Return the new variables list."
- (let* ((file-name (buffer-file-name))
+ (let* ((file-name (or (buffer-file-name)
+ ;; handle non-file buffers, too
+ (expand-file-name default-directory)))
(sub-file-name (if file-name
;; FIXME: Why not use file-relative-name?
(substring file-name (length root)))))
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers
2014-12-30 19:45 ` Ivan Shmakov
@ 2015-01-19 7:30 ` Katsumi Yamaoka
2015-01-19 8:55 ` Ivan Shmakov
0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2015-01-19 7:30 UTC (permalink / raw)
To: 19140
Hi Ivan,
On Tue, 30 Dec 2014 19:45:57 +0000, Ivan Shmakov <ivan@siamics.net> wrote:
> Please consider the revised patch MIMEd.
> * lisp/files.el (dir-locals-collect-variables): Use
> default-directory in place of the file name while working on
> non-file buffers (as hack-dir-local-variables already does.)
After this change, I got to get unknown errors[1] when building
Ma Gnus. To reproduce the same result, try the following in
the Emacs source tree:
% cd lisp/gnus
% emacs -batch -Q --eval FORM
where FORM is:
'(with-temp-buffer (let ((default-directory (expand-file-name ".")))
(insert-file-contents "./auth-source.el") (hack-local-variables)))'
And you will see
(args-out-of-range "/DIR/emacs/lisp/gnus" 21 nil)
or something similar (where 21 is 1+ the number of letters of
the dir name).
The FORM above is what `custom-make-dependencies' does. When
building Ma Gnus, `dir-locals-collect-variables' is called in
this way:
dgnushack.el (dgnushack-make-cus-load)
-> cus-dep.el (custom-make-dependencies)
-> files.el (hack-local-variables)
-> files.el (hack-dir-local-variables)
-> files.el (dir-locals-collect-variables)
Before you changed `dir-locals-collect-variables', it returned
nil and `custom-make-dependencies' issued no error. I guess
`custom-make-dependencies' expects the function in question to
return nil, otherwise it needs to be modified in some way.
Thanks.
[1]
% cd /Work/gnus
% ./configure
% make lick
cd lisp && make EMACS="emacs" lispdir="/usr/local/share/emacs/site-lisp/gnus" all
make[1]: Entering directory '/Work/gnus/lisp'
rm -f *.elc gnus-load.el auto-autoloads.* custom-load.*
lispdir="/usr/local/share/emacs/site-lisp/gnus" srcdir=. emacs -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-make-cus-load .
Loading cus-dep...
Directory .
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Directory-local variables error: (args-out-of-range "/Work/gnus/lisp" 16 nil)
Generating cus-load.el...
Generating cus-load.el...done
lispdir="/usr/local/share/emacs/site-lisp/gnus" srcdir=. emacs -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-make-auto-load .
lispdir="/usr/local/share/emacs/site-lisp/gnus" srcdir=. emacs -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-make-load
Generating /Work/gnus/lisp/gnus-load.el...
Compiling /Work/gnus/lisp/gnus-load.el...
[...]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers
2015-01-19 7:30 ` Katsumi Yamaoka
@ 2015-01-19 8:55 ` Ivan Shmakov
2015-01-19 9:28 ` Katsumi Yamaoka
0 siblings, 1 reply; 7+ messages in thread
From: Ivan Shmakov @ 2015-01-19 8:55 UTC (permalink / raw)
To: 19140
[-- Attachment #1: Type: text/plain, Size: 1896 bytes --]
>>>>> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>> On Tue, 30 Dec 2014 19:45:57 +0000, Ivan Shmakov wrote:
[…]
>> * lisp/files.el (dir-locals-collect-variables): Use
>> default-directory in place of the file name while working on
>> non-file buffers (as hack-dir-local-variables already does.)
> After this change, I got to get unknown errors[1] when building
> Ma Gnus. To reproduce the same result, try the following in the
> Emacs source tree:
> % cd lisp/gnus
> % emacs -batch -Q --eval FORM
> where FORM is:
> '(with-temp-buffer (let ((default-directory (expand-file-name ".")))
> (insert-file-contents "./auth-source.el") (hack-local-variables)))'
> And you will see
> (args-out-of-range "/DIR/emacs/lisp/gnus" 21 nil)
> or something similar (where 21 is 1+ the number of letters of the dir
> name).
> The FORM above is what `custom-make-dependencies' does.
ACK, thanks. Indeed, this change assumes that the result for
(expand-file-name default-directory) ends with a ‘/’, yet that’s
only the case when default-directory itself ends with a ‘/’,
which I believe it should; consider, e. g.:
(defun cd-absolute (dir)
"Change current directory to given absolute file name DIR."
;; Put the name into directory syntax now,
;; because otherwise expand-file-name may give some bad results.
(setq dir (file-name-as-directory dir))
…)
The issue at hand could be solved by using the first of the
patches MIMEd. However, I believe that such a change may easily
mask bugs in the other parts of the code, so the proper solution
would probably be a fix to custom-make-dependencies, as per the
second patch MIMEd.
Could you please check if both indeed resolve the issue at hand?
TIA.
[…]
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 536 bytes --]
--- a/lisp/files.el 2015-01-17 19:02:00 +0000
+++ b/lisp/files.el
@@ -3604,7 +3604,8 @@ defun dir-locals-collect-variables (class-variables root variables)
Return the new variables list."
(let* ((file-name (or (buffer-file-name)
;; Handle non-file buffers, too.
- (expand-file-name default-directory)))
+ (file-name-as-directory
+ (expand-file-name default-directory))))
(sub-file-name (if file-name
;; FIXME: Why not use file-relative-name?
(substring file-name (length root)))))
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Type: text/diff, Size: 638 bytes --]
--- a/lisp/cus-dep.el 2015-01-01 22:26:41 +0000
+++ b/lisp/cus-dep.el 2015-01-19 08:49:23 +0000
@@ -62,7 +62,8 @@ defun custom-make-dependencies ()
(while (setq subdir (pop command-line-args-left))
(message "Directory %s" subdir)
(let ((files (directory-files subdir nil "\\`[^=.].*\\.el\\'"))
- (default-directory (expand-file-name subdir))
+ (default-directory
+ (file-name-as-directory (expand-file-name subdir)))
(preloaded (concat "\\`\\(\\./+\\)?"
(regexp-opt preloaded-file-list t)
"\\.el\\'")))
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers
2015-01-19 8:55 ` Ivan Shmakov
@ 2015-01-19 9:28 ` Katsumi Yamaoka
2015-01-19 9:55 ` Ivan Shmakov
0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2015-01-19 9:28 UTC (permalink / raw)
To: 19140
On Mon, 19 Jan 2015 08:55:43 +0000, Ivan Shmakov <ivan@siamics.net> wrote:
> so the proper solution would probably be a fix to
> custom-make-dependencies
Hm, I wish there aren't many other modules to have to be fixed.
> Could you please check if both indeed resolve the issue at hand?
Both work. Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers
2015-01-19 9:28 ` Katsumi Yamaoka
@ 2015-01-19 9:55 ` Ivan Shmakov
2015-02-14 21:09 ` Ivan Shmakov
0 siblings, 1 reply; 7+ messages in thread
From: Ivan Shmakov @ 2015-01-19 9:55 UTC (permalink / raw)
To: 19140
>>>>> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>> On Mon, 19 Jan 2015 08:55:43 +0000, Ivan Shmakov wrote:
[…]
>> Could you please check if both indeed resolve the issue at hand?
> Both work. Thanks.
ACK; I’ve just pushed the change to custom-make-dependencies.
commit 2e8d209f258c9bb6a6626d4a101995965b040024
Fix the value default-directory gets in custom-make-dependencies.
* lisp/cus-dep.el (custom-make-dependencies): Ensure that
default-directory is interpreted as a directory (see bug#19140.)
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers
2015-01-19 9:55 ` Ivan Shmakov
@ 2015-02-14 21:09 ` Ivan Shmakov
0 siblings, 0 replies; 7+ messages in thread
From: Ivan Shmakov @ 2015-02-14 21:09 UTC (permalink / raw)
To: 19140-done
Version: 25.1
>>>>> Ivan Shmakov <ivan@siamics.net> writes:
>>>>> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>> On Mon, 19 Jan 2015 08:55:43 +0000, Ivan Shmakov wrote:
>>> Could you please check if both indeed resolve the issue at hand?
>> Both work. Thanks.
> ACK; I’ve just pushed the change to custom-make-dependencies.
> commit 2e8d209f258c9bb6a6626d4a101995965b040024
> Fix the value default-directory gets in custom-make-dependencies.
> * lisp/cus-dep.el (custom-make-dependencies): Ensure that
> default-directory is interpreted as a directory (see bug#19140.)
No further issues reported; closing.
commit e000ff30b4354064ca7f9ed07e58903d7c44033f
CommitDate: 2015-01-17 19:33:50 +0000
Fix dir-locals handling for non-file buffers.
* lisp/files.el (dir-locals-collect-variables): Use default-directory
in place of the file name while working on non-file buffers, just
like hack-dir-local-variables already does.
Fixes: debbugs:19140
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-02-14 21:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 16:12 bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers Ivan Shmakov
2014-12-30 19:45 ` Ivan Shmakov
2015-01-19 7:30 ` Katsumi Yamaoka
2015-01-19 8:55 ` Ivan Shmakov
2015-01-19 9:28 ` Katsumi Yamaoka
2015-01-19 9:55 ` Ivan Shmakov
2015-02-14 21:09 ` Ivan Shmakov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.