emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Call org-map-entries just on children?


From: Bastien
Subject: Re: [Orgmode] Call org-map-entries just on children?
Date: Tue, 08 Feb 2011 16:43:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Richard,

Richard Lawrence <address@hidden> writes:

> I want to call org-map-entries in a way that calls a function at each
> *child* of the current tree, but not at the current tree itself.  That
> is, for some function f, if my Org file looks like this:
>
> * Paper 1
> ** Student 1
> ** Student 2
> ...
>
> I want to call f at "Student 1", "Student 2", etc. but not at "Paper 1".
> But if point is positioned at "Paper 1", then
>
> (org-map-entries 'f nil 'tree)
>
> first calls f at the "Paper 1" entry, not the "Student 1" entry.  How
> can I apply f just to the *children* of "Paper 1"?

You can simply add 

  (setq org-map-continue-from (outline-next-heading))

at the very beginning of your `f' function.

HTH,

-- 
 Bastien



reply via email to

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