emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: nicholas.dokos@hp.com
Cc: Richard Lawrence <richard.lawrence@berkeley.edu>, emacs-orgmode@gnu.org
Subject: Re: org-map-entries and org-map-continue-from
Date: Mon, 28 Feb 2011 14:14:39 -0500	[thread overview]
Message-ID: <26658.1298920479@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Nick Dokos <nicholas.dokos@hp.com> of "Mon, 28 Feb 2011 14:02:39 EST." <26540.1298919759@alphaville.dokosmarshall.org>

Nick Dokos <nicholas.dokos@hp.com> wrote:

> Richard Lawrence <richard.lawrence@berkeley.edu> wrote:
> 
> 
> > For a simple example, suppose I write:
> > #+BEGIN_SRC emacs-lisp
> > (defun get-export-filenames ()
> >   (interactive)
> >   (setq export-files '())
> >   (progn
> >     (org-map-entries
> >      (lambda ()
> >        (setq org-map-continue-from (outline-next-heading))
> >        (let ((org-trust-scanner-tags t))
> > 	 (push (org-entry-get (point) "EXPORT_FILE_NAME") export-files)))
> >      nil 'tree)
> >     (message export-files))) ; errors, but lets me see the list of collected values
> > #+END_SRC
> > 
> 

> But I'm not sure what the right way to deal with it is.
> 

Maybe this?

--8<---------------cut here---------------start------------->8---
#+BEGIN_SRC emacs-lisp
  (defun get-export-filenames ()
    (interactive)
    (setq export-files '())
    (progn
      (org-map-entries
       (lambda ()
         (setq org-map-continue-from (outline-next-heading))
         (if org-map-continue-from
             (let ((org-trust-scanner-tags t))
               (push (org-entry-get (point) "EXPORT_FILE_NAME") export-files))))
         nil 'tree)
       (message export-files))) ; errors, but lets me see the list of collected values
  
#+END_SRC
--8<---------------cut here---------------end--------------->8---


Nick

  reply	other threads:[~2011-02-28 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 18:40 org-map-entries and org-map-continue-from Richard Lawrence
2011-02-28 19:02 ` Nick Dokos
2011-02-28 19:14   ` Nick Dokos [this message]
2011-03-01  4:01     ` Richard Lawrence

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=26658.1298920479@alphaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=richard.lawrence@berkeley.edu \
    /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).