From: Carsten Dominik <carsten.dominik@gmail.com>
To: Mueen Nawaz <mueen@nawaz.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Question about searches (ultimately for agenda)
Date: Sun, 20 Dec 2009 13:51:33 +0100 [thread overview]
Message-ID: <3888E19B-2C15-4669-B49C-24E703241B21@gmail.com> (raw)
In-Reply-To: <hghl87$1ca$1@ger.gmane.org>
On Dec 19, 2009, at 5:35 AM, Mueen Nawaz wrote:
> On 12/17/09 13:26, Carsten Dominik wrote:
>> Yes, so that the search only continues after that entry. But yes, you
>> are right, this can fail for the final entry in a file.
>>
>> Try
>>
>> '(when (org-entry-is-done) (outline-next-heading) (point))
>
> Seems to work.
>
>>> Also, I'm pretty weak with Emacs Lisp. What does (point) do?
>>> Google's
>>> no help (obviously).
>>
>> Point returns the buffer position of he cursor, in this case the
>> position where the next entry starts.
>
> OK. I guess I don't understand why we need to know where the point
> is.
The agenda skip function is called to check if an entry should be
skipped. At each entry that matches the current query definition
while sweeping an agenda file, this function will be called to give
you a final chance to say NO to this entry. If it returns nil, that
means, OK, take the entry and put it into the agenda. If it returns
something else, that must be the location from where to resume search
for another match of your query.
For example it can return the location of the end of the current entry
to make search continue from there. Or the location of the end of the
entire subtree end to make search continue from there. You could also
return (point-at-eob) to make sure that after skipping this entry, the
search in this buffer will find nothing more. You you also make it
return 1 o start from the beginning of the bugger an in this way end
up in an infinite loop :-)
Clearer now?
> Is this returning the value of the point in whatever buffer I am
> when I /execute/ the agenda command? Or is this more like the
> function is sweeping the point across all agenda files to find
> headlines? Or...?
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
next prev parent reply other threads:[~2009-12-20 12:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 1:57 Question about searches (ultimately for agenda) Mueen Nawaz
2009-12-16 3:26 ` Matt Lundin
2009-12-16 3:35 ` Mueen Nawaz
2009-12-16 9:37 ` Carsten Dominik
2009-12-17 4:53 ` Mueen Nawaz
2009-12-17 19:26 ` Carsten Dominik
2009-12-19 4:35 ` Mueen Nawaz
2009-12-20 12:51 ` Carsten Dominik [this message]
2009-12-16 12:02 ` Matt Lundin
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=3888E19B-2C15-4669-B49C-24E703241B21@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mueen@nawaz.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).