emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sun Lin <sunlin7@yahoo.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: [PATCH] org.el: Make sure (org-agenda-files) search relative file paths in org-directory
Date: Thu, 13 May 2021 09:57:09 +0000 (UTC)	[thread overview]
Message-ID: <846951284.116420.1620899829306@mail.yahoo.com> (raw)
In-Reply-To: <1282662860.5259786.1619091670864@mail.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

(Resend with correct contributor email address)


According the document of variable `org-agenda-files`, "In this file paths can be given relative to
‘org-directory’.  ".

While it's failed to search the files for relative file paths in `org-agenda-files`.

The attachment is the patch try to search relative file paths in ‘org-directory’.

Please help to review and apply the patch. 


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-agenda-files-work-with-relateive-file-paths.patch --]
[-- Type: text/x-patch, Size: 844 bytes --]

From e963bd5554b076c813cde1f59d75f0686fec8a14 Mon Sep 17 00:00:00 2001
From: Sun Lin <sunlin7@yahoo.com>
Date: Thu, 13 May 2021 09:52:33 +0000
Subject: [PATCH] org-agenda-files: work with relateive file paths.

* lisp/org.el (org-agenda-files): Make sure org-agenda-files work with relative
file paths.
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index b388bca..04e1f80 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15395,7 +15395,7 @@ used by the agenda files.  If ARCHIVE is `ifmode', do this only if
 				 (if (file-directory-p f)
 				      f t org-agenda-file-regexp)
-				   (list f)))
+				   (list (expand-file-name f org-directory))))
     (when org-agenda-skip-unavailable-files
       (setq files (delq nil

  parent reply	other threads:[~2021-05-13 10:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1282662860.5259786.1619091670864.ref@mail.yahoo.com>
2021-04-22 11:41 ` [PATCH] org.el: Make sure (org-agenda-files) search relative file paths in org-directory Sun Lin
2021-04-28 21:19   ` Fw:[PATCH] " ‪sunlin7@yahoo.com‬
2021-05-13  9:57   ` Sun Lin [this message]
2021-05-21  2:30     ` [PATCH] " Sun Lin
2021-05-21 16:31       ` Nicolas Goaziou
2021-05-22  1:18         ` ‪sunlin7@yahoo.com‬

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:

  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=846951284.116420.1620899829306@mail.yahoo.com \
    --to=sunlin7@yahoo.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).