emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] adding file to agenda removes directories


From: Kyle Meyer
Subject: Re: [O] adding file to agenda removes directories
Date: Thu, 31 Dec 2015 18:54:31 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Tyler Smith <address@hidden> writes:

> I set up org-agenda-files to contain ~/org/, such that all files in that
> directory are in my agenda. I then add an individual file from
> elsewhere, via org-agenda-file-to-front. In the process, the entry for
> the ~/org/ directory is removed, and replaced with explicit entries for
> every org file in that directory. This leads to surprising behaviour,
> where new org files in ~/org/ aren't detected by the agenda.
>
> The help suggests that org-agenda-files can be a list of 'files and
> directories', but this behaviour seems to suggest that it can be a list
> of files, *or* a directory. Am I doing something wrong, or can I not
> combine files and directories in org-agenda-files?

Right, glancing at org-agenda-file-to-front's code, I don't think it's
currently possible to use it and keep directory entries from being
replaced with the Org files they contain at that time.

Like you, I'd expect the directory entries to stay intact, but I'm
guessing the behavior is the way it is because

* Doing otherwise would make the code more complicated.

* org-agenda-file-to-front moves a file to the front or end of the
  agenda list, but, if directories are left as is, calling
  org-agenda-file-to-front on a file within an agenda directory would
  duplicate that file in the return value of (org-agenda-files).  Just
  expanding the files avoids having to decide how to deal with this.

--
Kyle



reply via email to

[Prev in Thread] Current Thread [Next in Thread]