[Top][All Lists]

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

[elpa] externals/gnorb 73b7f47 227/449: Use org-element-map's arguments

From: Stefan Monnier
Subject: [elpa] externals/gnorb 73b7f47 227/449: Use org-element-map's arguments properly
Date: Fri, 27 Nov 2020 23:15:44 -0500 (EST)

branch: externals/gnorb
commit 73b7f4721d04c188aa5c5186eb594ca23a5f144f
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Use org-element-map's arguments properly
    * lisp/gnorb-org.el (gnorb-org-extract-links): Use org-element-map's
      no-recursion argument. Behavior changes slightly: instead of skipping
      paragraphs inside list items, we skip paragraphs inside drawers.
 lisp/gnorb-org.el | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index 02e549b..a435b25 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -179,16 +179,9 @@ might have been in the outgoing message's headers and call
          (org-element-map tree 'paragraph
            (lambda (p)
-             ;; Don't select paragraphs from the LOGBOOK drawer. This
-             ;; will actually skip over any list, but we'll refine
-             ;; that later.
-             (when (not (eq
-                         (org-element-type
-                          (org-element-property :parent p))
-                         'item))
-               (push
-                (org-element-interpret-data p)
-                strings)))))))
+             (push (org-element-interpret-data p)
+                   strings))
+           nil nil 'drawer))))
     (when strings
       ;; Limit number of paragraphs based on
       ;; `gnorb-org-mail-scan-scope'

reply via email to

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