emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Best way to check if a subtree with a property exists?


From: Kaushal Modi
Subject: Re: [O] Best way to check if a subtree with a property exists?
Date: Fri, 01 Dec 2017 15:17:04 +0000

On Fri, Dec 1, 2017 at 9:00 AM Kaushal Modi <address@hidden> wrote:
- How can I quit out of org-map-entries as soon as the first matching entry is found?

I think this is much better:

(let ((valid-found
       (catch 'break
         (org-map-entries
          (lambda ()
            (throw 'break t))
          ;; Only map through subtrees where
          ;; EXPORT_FILE_NAME property is not
          ;; empty.
          "EXPORT_FILE_NAME<>\"\""))))
  (message "valid-found: %S" valid-found))

- What's a better way to do the same?

Comments are welcome :)

Thanks.
--

Kaushal Modi


reply via email to

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