* [PATCH] org.el: Use normalized names in org-agenda-file-p
@ 2014-10-12 16:01 Yann Hodique
2014-10-20 13:36 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Yann Hodique @ 2014-10-12 16:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
Hi,
attached is a patch that fixes a bug where `org-agenda-file-p' doesn't
recognize files when, for example, `org-agenda-files' contains entries
that involve symlinks.
Thanks
Yann
--
Seek freedom and become captive of your desires.
Seek discipline and find your liberty.
-- The Coda
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org.el-Use-normalized-names-in-org-agenda-file-p.patch --]
[-- Type: text/x-patch, Size: 1049 bytes --]
From 5cf4603cfacd3fb2a3569ed2ea14081631a11024 Mon Sep 17 00:00:00 2001
From: Yann Hodique <yann.hodique@gmail.com>
Date: Sun, 12 Oct 2014 08:42:04 -0700
Subject: [PATCH] org.el: Use normalized names in org-agenda-file-p
* lisp/org.el (org-agenda-file-p): Make sure all filenames are
normalized before performing comparison.
---
lisp/org.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index d702cf5..8ac4780 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18181,8 +18181,10 @@ used by the agenda files. If ARCHIVE is `ifmode', do this only if
"Return non-nil, if FILE is an agenda file.
If FILE is omitted, use the file associated with the current
buffer."
- (member (or file (buffer-file-name))
- (org-agenda-files t)))
+ (let ((fname (or file (buffer-file-name))))
+ (and fname
+ (member (file-truename fname)
+ (mapcar #'file-truename (org-agenda-files t))))))
(defun org-edit-agenda-file-list ()
"Edit the list of agenda files.
--
2.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] org.el: Use normalized names in org-agenda-file-p
2014-10-12 16:01 [PATCH] org.el: Use normalized names in org-agenda-file-p Yann Hodique
@ 2014-10-20 13:36 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2014-10-20 13:36 UTC (permalink / raw)
To: Yann Hodique; +Cc: emacs-orgmode
Hi Yann,
Yann Hodique <yann.hodique@gmail.com> writes:
> attached is a patch that fixes a bug where `org-agenda-file-p' doesn't
> recognize files when, for example, `org-agenda-files' contains entries
> that involve symlinks.
Applied, thanks,
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-20 13:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-12 16:01 [PATCH] org.el: Use normalized names in org-agenda-file-p Yann Hodique
2014-10-20 13:36 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).