I frequently use org-agenda-set-restriction-lock to concentrate
on one of my org-files during work.

I have a custom agenda-search command that I would like to
use while at work.  However, when I try to run the searches, the
restriction-lock
prevails over the org-agenda-files that are defined in my custom agenda command.

For example, I have an agenda buffer restriction on foo.org so that
I only see stuff from foo.org in my agenda TODO searches and SCHEDULED
searches.

But, I would like to run this search periodically through the day:

 ("n" "Notesmine search" search ""
            ((org-agenda-files (njn/notesmine-org-files))))

The problem is that the search will only search foo.org, unless I
remove the buffer restriction lock on foo.org before doing the search.

I see three ways to go about fixing this:

1) I can define special agenda views to only view "foo.org"
2) I can try to modify the "Notesmine search" to unlock the restriction lock
before doing the search, and restore it after doing the search
3) I can set org-agenda-files to "foo.org" throughout my work day.

Does anyone have advice on which one of the 3 solutions or a solution
that I missed?

I'm leaning towards #3, and I'm thinking that the restriction-lock
feature is really just for
on-the-fly agenda searches as opposed to being turned on all day long
for a particular file/buffer.

Thanks,
--Nate

Reply via email to