[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 5e94d5cef6 026/101: org-element-map: Allow FUN to b
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 5e94d5cef6 026/101: org-element-map: Allow FUN to be a lisp form |
Date: |
Sat, 1 Jul 2023 09:59:01 -0400 (EDT) |
branch: externals/org
commit 5e94d5cef609a61b8d2b1df45f16f35de0a05b08
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-element-map: Allow FUN to be a lisp form
* lisp/org-element-ast.el (org-element-ast-map):
* lisp/org-element.el (org-element-map): Allow FUN to be a lisp form,
wrapping it into lambda.
---
lisp/org-element-ast.el | 4 ++++
lisp/org-element.el | 3 +++
2 files changed, 7 insertions(+)
diff --git a/lisp/org-element-ast.el b/lisp/org-element-ast.el
index c47cdb6710..e550a0ed8e 100644
--- a/lisp/org-element-ast.el
+++ b/lisp/org-element-ast.el
@@ -829,6 +829,9 @@ It has to accept one argument: the node itself.
When TYPES is t, call FUN for all the node types.
+FUN can also be a Lisp form. The form will be evaluated as function
+with symbol `node' bound to the current node.
+
When optional argument IGNORE is non-nil, it should be a list holding
nodes to be skipped. In that case, the listed nodes and their
contents will be skipped.
@@ -864,6 +867,7 @@ Nil values returned from FUN do not appear in the results."
(_ (list types))))
(no-recursion (if (listp no-recursion) no-recursion
(list no-recursion)))
+ (fun (if (functionp fun) fun `(lambda (node) ,fun)))
--acc)
(letrec ((--walk-tree
(lambda (--data)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index e7cd491867..248a01c855 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4568,6 +4568,9 @@ one argument: the element or object itself.
When TYPES is t, call FUN for all the elements and objects.
+FUN can also be a lisp form. The form will be evaluated as function
+with symbol `node' bound to the current node.
+
When optional argument INFO is non-nil, it should be a plist
holding export options. In that case, elements of the parse tree
\\(compared with `eq') not exportable according to `:ignore-list'
- [elpa] externals/org 31d53cb015 056/101: org-end-of-subtree: Use org-element API, (continued)
- [elpa] externals/org 31d53cb015 056/101: org-end-of-subtree: Use org-element API, ELPA Syncer, 2023/07/01
- [elpa] externals/org 7dee228569 063/101: org-element-at-point-no-context: Update docstring, ELPA Syncer, 2023/07/01
- [elpa] externals/org e1a2ea65ef 064/101: Allow syntax nodes to be supplied in place of POM in API functions, ELPA Syncer, 2023/07/01
- [elpa] externals/org 16d7cdcf52 068/101: org-manual: Remove unused drawer properties to disable, ELPA Syncer, 2023/07/01
- [elpa] externals/org 96b754c105 083/101: org-get-category, org-get-tags: Clarify that match data is modified, ELPA Syncer, 2023/07/01
- [elpa] externals/org fcde1f779d 090/101: test-org-element/at-point: Add new test, ELPA Syncer, 2023/07/01
- [elpa] externals/org 383d5dacb7 096/101: org-fold-show-set-visibility: Fix lineage visibility, ELPA Syncer, 2023/07/01
- [elpa] externals/org 4a8849340d 005/101: org-element-ast: New functions to map and resolve property values, ELPA Syncer, 2023/07/01
- [elpa] externals/org ea9d5b45db 012/101: org-element-create: Allow single &rest argument as a list, ELPA Syncer, 2023/07/01
- [elpa] externals/org a8286a5a9e 015/101: org-element: Record origin buffer when parsing, ELPA Syncer, 2023/07/01
- [elpa] externals/org 5e94d5cef6 026/101: org-element-map: Allow FUN to be a lisp form,
ELPA Syncer <=
- [elpa] externals/org 4fcdcb456d 021/101: org-element: Defer large buffer substrings when parsing, ELPA Syncer, 2023/07/01
- [elpa] externals/org 01351f3eab 067/101: Restructure file organization, ELPA Syncer, 2023/07/01
- [elpa] externals/org 69383dfc24 031/101: org-ascii--current-justification: Use `org-element-lineage-map', ELPA Syncer, 2023/07/01
- [elpa] externals/org 771074ba5e 047/101: org-in-archived-heading-p: Use org-element API, ELPA Syncer, 2023/07/01
- [elpa] externals/org 5898fcf269 061/101: Remove unused declares, ELPA Syncer, 2023/07/01
- [elpa] externals/org 3ce57e17a0 071/101: org-item-re: Convert into defsubst, ELPA Syncer, 2023/07/01
- [elpa] externals/org 52c63f5cce 095/101: org-lint-export-option-keywords: Small refactoring, ELPA Syncer, 2023/07/01
- [elpa] externals/org 7f337a2b95 098/101: org-fold-core: Fix isearch with `org-fold-core-isearch-open-function', ELPA Syncer, 2023/07/01
- [elpa] externals/org afbbebff3f 097/101: org-fold-core-get-folding-spec: Respect `org-fold-core-style', ELPA Syncer, 2023/07/01
- [elpa] externals/org 80122a1204 008/101: org-element-ast: New function `org-element-property-2', ELPA Syncer, 2023/07/01