forked from mirrors/org-mode
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.
This commit is contained in:
parent
97d4d927f2
commit
f28288c255
|
@ -10091,30 +10091,31 @@ current line."
|
||||||
org-agenda-tags-column))
|
org-agenda-tags-column))
|
||||||
(end (and line (line-end-position)))
|
(end (and line (line-end-position)))
|
||||||
l c)
|
l c)
|
||||||
(save-excursion
|
(org-fold-core-ignore-modifications
|
||||||
(goto-char (if line (line-beginning-position) (point-min)))
|
(save-excursion
|
||||||
(while (re-search-forward org-tag-group-re end t)
|
(goto-char (if line (line-beginning-position) (point-min)))
|
||||||
(add-text-properties
|
(while (re-search-forward org-tag-group-re end t)
|
||||||
(match-beginning 1) (match-end 1)
|
(add-text-properties
|
||||||
(list 'face (delq nil (let ((prop (get-text-property
|
(match-beginning 1) (match-end 1)
|
||||||
|
(list 'face (delq nil (let ((prop (get-text-property
|
||||||
(match-beginning 1) 'face)))
|
(match-beginning 1) 'face)))
|
||||||
(or (listp prop) (setq prop (list prop)))
|
(or (listp prop) (setq prop (list prop)))
|
||||||
(if (memq 'org-tag prop)
|
(if (memq 'org-tag prop)
|
||||||
prop
|
prop
|
||||||
(cons 'org-tag prop))))))
|
(cons 'org-tag prop))))))
|
||||||
(setq l (string-width (match-string 1))
|
(setq l (string-width (match-string 1))
|
||||||
c (if (< org-agenda-tags-column 0)
|
c (if (< org-agenda-tags-column 0)
|
||||||
(- (abs org-agenda-tags-column) l)
|
(- (abs org-agenda-tags-column) l)
|
||||||
org-agenda-tags-column))
|
org-agenda-tags-column))
|
||||||
(goto-char (match-beginning 1))
|
(goto-char (match-beginning 1))
|
||||||
(delete-region (save-excursion (skip-chars-backward " \t") (point))
|
(delete-region (save-excursion (skip-chars-backward " \t") (point))
|
||||||
(point))
|
(point))
|
||||||
(insert (org-add-props
|
(insert (org-add-props
|
||||||
(make-string (max 1 (- c (current-column))) ?\s)
|
(make-string (max 1 (- c (current-column))) ?\s)
|
||||||
(plist-put (copy-sequence (text-properties-at (point)))
|
(plist-put (copy-sequence (text-properties-at (point)))
|
||||||
'face nil))))
|
'face nil))))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(org-font-lock-add-tag-faces (point-max)))))
|
(org-font-lock-add-tag-faces (point-max))))))
|
||||||
|
|
||||||
(defun org-agenda-priority-up ()
|
(defun org-agenda-priority-up ()
|
||||||
"Increase the priority of line at point, also in Org file."
|
"Increase the priority of line at point, also in Org file."
|
||||||
|
|
Loading…
Reference in a new issue