emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nathan Neff <nathan.neff@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Search from Agenda w/lock active
Date: Wed, 28 Sep 2011 12:13:40 -0500	[thread overview]
Message-ID: <CAC=HedCsoN3VkM9nHJwhbU40Fbj=S=ZpAWj0mz9MMt1yz3fhmw@mail.gmail.com> (raw)

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	other threads:[~2011-09-28 17:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAC=HedCsoN3VkM9nHJwhbU40Fbj=S=ZpAWj0mz9MMt1yz3fhmw@mail.gmail.com' \
    --to=nathan.neff@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).