Skip to content

Commit f28288c

Browse files
committed
org-agenda-align-tags: Do not trigger fold checks
* lisp/org-agenda.el (org-agenda-align-tags): Do not try to check for folded regions in agenda.
1 parent 97d4d92 commit f28288c

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

lisp/org-agenda.el

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10091,30 +10091,31 @@ current line."
1009110091
org-agenda-tags-column))
1009210092
(end (and line (line-end-position)))
1009310093
l c)
10094-
(save-excursion
10095-
(goto-char (if line (line-beginning-position) (point-min)))
10096-
(while (re-search-forward org-tag-group-re end t)
10097-
(add-text-properties
10098-
(match-beginning 1) (match-end 1)
10099-
(list 'face (delq nil (let ((prop (get-text-property
10094+
(org-fold-core-ignore-modifications
10095+
(save-excursion
10096+
(goto-char (if line (line-beginning-position) (point-min)))
10097+
(while (re-search-forward org-tag-group-re end t)
10098+
(add-text-properties
10099+
(match-beginning 1) (match-end 1)
10100+
(list 'face (delq nil (let ((prop (get-text-property
1010010101
(match-beginning 1) 'face)))
10101-
(or (listp prop) (setq prop (list prop)))
10102-
(if (memq 'org-tag prop)
10102+
(or (listp prop) (setq prop (list prop)))
10103+
(if (memq 'org-tag prop)
1010310104
prop
1010410105
(cons 'org-tag prop))))))
10105-
(setq l (string-width (match-string 1))
10106-
c (if (< org-agenda-tags-column 0)
10107-
(- (abs org-agenda-tags-column) l)
10108-
org-agenda-tags-column))
10109-
(goto-char (match-beginning 1))
10110-
(delete-region (save-excursion (skip-chars-backward " \t") (point))
10111-
(point))
10112-
(insert (org-add-props
10113-
(make-string (max 1 (- c (current-column))) ?\s)
10114-
(plist-put (copy-sequence (text-properties-at (point)))
10115-
'face nil))))
10116-
(goto-char (point-min))
10117-
(org-font-lock-add-tag-faces (point-max)))))
10106+
(setq l (string-width (match-string 1))
10107+
c (if (< org-agenda-tags-column 0)
10108+
(- (abs org-agenda-tags-column) l)
10109+
org-agenda-tags-column))
10110+
(goto-char (match-beginning 1))
10111+
(delete-region (save-excursion (skip-chars-backward " \t") (point))
10112+
(point))
10113+
(insert (org-add-props
10114+
(make-string (max 1 (- c (current-column))) ?\s)
10115+
(plist-put (copy-sequence (text-properties-at (point)))
10116+
'face nil))))
10117+
(goto-char (point-min))
10118+
(org-font-lock-add-tag-faces (point-max))))))
1011810119

1011910120
(defun org-agenda-priority-up ()
1012010121
"Increase the priority of line at point, also in Org file."

0 commit comments

Comments
 (0)