emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-sparse-tree using Lisp predicate?
       [not found] <8D8020DF9C0D35489A2D30CADCC5AC0819388867@US-EX10MB.ad.checkpoint.com>
@ 2016-01-18 19:02 ` Reuben Garrett
  0 siblings, 0 replies; 2+ messages in thread
From: Reuben Garrett @ 2016-01-18 19:02 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Is there functionality to build a sparse tree (as with org-sparse-tree)
using a predicate from Lisp code? I want something like org-map-entries,
but for narrowing/sparsing. Diving through the code, I think (org-scan-tags
'sparse-tree (lambda () … )) might be what I want, but am curious if anyone
else has suggestions from working that use-case.
--
Best regards,
Reuben Garrett

[-- Attachment #2: Type: text/html, Size: 605 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: org-sparse-tree using Lisp predicate?
       [not found] ` <8D8020DF9C0D35489A2D30CADCC5AC081938887F@US-EX10MB.ad.checkpoint.com>
@ 2016-01-18 19:22   ` Reuben Garrett
  0 siblings, 0 replies; 2+ messages in thread
From: Reuben Garrett @ 2016-01-18 19:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

I think I figured it out. This contrived example is simplistic, but it does
what I want:

(with-current-buffer "something.org"
  (org-scan-tags 'sparse-tree '(not (null (org-entry-get (point)
"some_property"))) t))

Would be a nice built-in sibling for org-map-entries :)

[-- Attachment #2: Type: text/html, Size: 553 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-18 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <8D8020DF9C0D35489A2D30CADCC5AC0819388874@US-EX10MB.ad.checkpoint.com>
     [not found] ` <8D8020DF9C0D35489A2D30CADCC5AC081938887F@US-EX10MB.ad.checkpoint.com>
2016-01-18 19:22   ` org-sparse-tree using Lisp predicate? Reuben Garrett
     [not found] <8D8020DF9C0D35489A2D30CADCC5AC0819388867@US-EX10MB.ad.checkpoint.com>
2016-01-18 19:02 ` Reuben Garrett

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).