Re: [O] [PATCH] org.el: Use normalized names in org-agenda-file-p

2014-10-20 Thread Bastien
Hi Yann,

Yann Hodique yann.hodi...@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



[O] [PATCH] org.el: Use normalized names in org-agenda-file-p

2014-10-12 Thread Yann Hodique
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
From 5cf4603cfacd3fb2a3569ed2ea14081631a11024 Mon Sep 17 00:00:00 2001
From: Yann Hodique yann.hodi...@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