From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Call org-map-entries just on children? Date: Tue, 08 Feb 2011 16:43:55 +0100 Message-ID: <878vxqbkg4.fsf@gnu.org> References: <87ipwvd97b.fsf@berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=59653 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmpjM-0007un-QO for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 10:43:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmpjL-0007Xh-BD for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 10:43:52 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:39791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmpjL-0007X4-6R for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 10:43:51 -0500 Received: by eyh6 with SMTP id 6so2809744eyh.0 for ; Tue, 08 Feb 2011 07:43:49 -0800 (PST) In-Reply-To: <87ipwvd97b.fsf@berkeley.edu> (Richard Lawrence's message of "Mon, 07 Feb 2011 09:51:36 -0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Richard Lawrence Cc: emacs-orgmode@gnu.org Hi Richard, Richard Lawrence 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