From: Ivan Shmakov <ivan@siamics.net>
To: 19140@debbugs.gnu.org
Subject: bug#19140: dir-locals-collect-variables discrepancy in handling non-file buffers
Date: Tue, 30 Dec 2014 19:45:57 +0000 [thread overview]
Message-ID: <87egrg9b0q.fsf@violet.siamics.net> (raw)
In-Reply-To: <87zjbky1kr.fsf@violet.siamics.net> (Ivan Shmakov's message of "Fri, 21 Nov 2014 16:12:52 +0000")
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)))))
next prev parent reply other threads:[~2014-12-30 19:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87egrg9b0q.fsf@violet.siamics.net \
--to=ivan@siamics.net \
--cc=19140@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.