diff options
author | Gerd Möllmann <gerd@gnu.org> | 2022-12-31 09:04:56 +0100 |
---|---|---|
committer | Gerd Möllmann <gerd@gnu.org> | 2022-12-31 09:04:56 +0100 |
commit | 716d676747119f9950861f9a64a8e7871b0082d4 (patch) | |
tree | b71f94b50896736a007d6977c97679e1abd895a6 /lisp/org/org-element.el | |
parent | 54ec3973e298c3d2b3d81484f80053d881694f88 (diff) | |
parent | 7493b4026fc74a51c76c5b614bc83b864af9bc31 (diff) | |
download | emacs-scratch/pkg.tar.gz |
Merge remote-tracking branch 'origin/master' into scratch/pkgscratch/pkg
Diffstat (limited to 'lisp/org/org-element.el')
-rw-r--r-- | lisp/org/org-element.el | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 71c242ea658..ace1cc1a984 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -1365,7 +1365,16 @@ Assume point is at beginning of the inline task." (priority (and (looking-at "\\[#.\\][ \t]*") (progn (goto-char (match-end 0)) (aref (match-string 0) 2)))) - (title-start (point)) + (commentedp + (and (let ((case-fold-search nil)) + (looking-at org-element-comment-string)) + (goto-char (match-end 0)) + (when (looking-at-p "\\(?:[ \t]\\|$\\)") + (point)))) + (title-start (prog1 (point) + (unless (or todo priority commentedp) + ;; Headline like "* :tag:" + (skip-chars-backward " \t")))) (tags (when (re-search-forward "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$" (line-end-position) @@ -1375,6 +1384,7 @@ Assume point is at beginning of the inline task." (title-end (point)) (raw-value (org-trim (buffer-substring-no-properties title-start title-end))) + (archivedp (member org-element-archive-tag tags)) (task-end (save-excursion (end-of-line) (and (re-search-forward org-element-headline-re limit t) @@ -1410,7 +1420,9 @@ Assume point is at beginning of the inline task." :todo-keyword todo :todo-type todo-type :post-blank (1- (count-lines (or task-end begin) end)) - :post-affiliated begin) + :post-affiliated begin + :archivedp archivedp + :commentedp commentedp) time-props standard-props)))) (org-element-put-property @@ -7260,18 +7272,18 @@ Each element indicates the latest `org-element--cache-change-tic' when change did not contain gaps.") ;;;###autoload -(defun org-element-cache-reset (&optional all no-persistance) +(defun org-element-cache-reset (&optional all no-persistence) "Reset cache in current buffer. When optional argument ALL is non-nil, reset cache in all Org buffers. -When optional argument NO-PERSISTANCE is non-nil, do not try to update +When optional argument NO-PERSISTENCE is non-nil, do not try to update the cache persistence in the buffer." (interactive "P") (dolist (buffer (if all (buffer-list) (list (current-buffer)))) (org-with-base-buffer buffer (when (and org-element-use-cache (derived-mode-p 'org-mode)) ;; Only persist cache in file buffers. - (when (and (buffer-file-name) (not no-persistance)) + (when (and (buffer-file-name) (not no-persistence)) (when (not org-element-cache-persistent) (org-persist-unregister 'org-element--headline-cache (current-buffer)) (org-persist-unregister 'org-element--cache (current-buffer))) |