From: Yann Hodique <yann.hodique@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org.el: Use normalized names in org-agenda-file-p
Date: Sun, 12 Oct 2014 09:01:13 -0700 [thread overview]
Message-ID: <y9gllholtgza.fsf@gmail.com> (raw)
[-- 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
next reply other threads:[~2014-10-12 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-12 16:01 Yann Hodique [this message]
2014-10-20 13:36 ` [PATCH] org.el: Use normalized names in org-agenda-file-p Bastien
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=y9gllholtgza.fsf@gmail.com \
--to=yann.hodique@gmail.com \
--cc=emacs-orgmode@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 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).