[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 38b632d 06/29: org.el/org--get-local-tags: Add cach
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 38b632d 06/29: org.el/org--get-local-tags: Add cache support |
Date: |
Sun, 17 Oct 2021 02:57:26 -0400 (EDT) |
branch: externals/org
commit 38b632d2ea0471ab57f891473ff96a2b74854034
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org.el/org--get-local-tags: Add cache support
---
lisp/org.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 8cedfcb..b9a062e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12472,10 +12472,15 @@ TAGS is a list of strings."
(defun org--get-local-tags ()
"Return list of tags for the current headline.
Assume point is at the beginning of the headline."
- (and (looking-at org-tag-line-re)
- (split-string (match-string-no-properties 2) ":" t)))
-
-(defun org-get-tags (&optional pos local)
+ (let* ((cached (and (org-element--cache-active-p) (org-element-at-point nil
'cached)))
+ (cached-tags (org-element-property :tags cached)))
+ (if cached
+ ;; If we do not wrap result into `cl-copy-list', reference would
+ ;; be returned and cache element might be modified directly.
+ (cl-copy-list cached-tags)
+ ;; Parse tags manually.
+ (and (looking-at org-tag-line-re)
+ (split-string (match-string-no-properties 2) ":" t)))))
"Get the list of tags specified in the current headline.
When argument POS is non-nil, retrieve tags for headline at POS.
- [elpa] externals/org updated (9475993 -> f4bcc0c), ELPA Syncer, 2021/10/17
- [elpa] externals/org 6933c1a 01/29: lisp/org-persist.el: New library to store data across sessions, ELPA Syncer, 2021/10/17
- [elpa] externals/org fc80d05 02/29: Re-implement org-element-cache and add headline support, ELPA Syncer, 2021/10/17
- [elpa] externals/org bc52c4d 03/29: Fix compatibility for older Emacs versions, ELPA Syncer, 2021/10/17
- [elpa] externals/org 68a44ea 04/29: org.el/org-narrow-to-subtree: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 7159ec0 05/29: org.el/org-at-planning-p: Add cache support, ELPA Syncer, 2021/10/17
- [elpa] externals/org 38b632d 06/29: org.el/org--get-local-tags: Add cache support,
ELPA Syncer <=
- [elpa] externals/org 78abbcd 07/29: org.el/org-get-tags: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 5bf5fdb 09/29: org.el/org-entry-get-with-inheritance: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 5d162b7 10/29: org.el/org-back-to-heading: Handle inlinetasks correctly, ELPA Syncer, 2021/10/17
- [elpa] externals/org f4bcc0c 29/29: Merge branch 'main' into feature/org-element-cache-new, ELPA Syncer, 2021/10/17
- [elpa] externals/org fede258 15/29: org.el/org-in-archived-heading-p: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 07ca988 24/29: Fix compatibility with Emacs 27, ELPA Syncer, 2021/10/17
- [elpa] externals/org eeb0450 26/29: Use XDG cache dir as default dir for cache persistance, ELPA Syncer, 2021/10/17
- [elpa] externals/org 8ceb9e7 27/29: Add NEWS entry for new element cache, ELPA Syncer, 2021/10/17
- [elpa] externals/org 85e0a69 20/29: Avoid frequent cache updates in some functions, ELPA Syncer, 2021/10/17
- [elpa] externals/org 7b83168 08/29: org.el/org--property-local-values: Support cache and passing element arg, ELPA Syncer, 2021/10/17