branch: externals/org-modern commit 148f6c4159fa6f480fc9556ae1f6080957fdc968 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Revert "Better fix for tag alignment" This reverts commit 973c285b30f1d623e8c047f27139625b90202da6. --- README.org | 1 + org-modern.el | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.org b/README.org index eb620b0299..bca63d6305 100644 --- a/README.org +++ b/README.org @@ -88,6 +88,7 @@ screenshot above. org-pretty-entities t ;; Agenda styling + org-agenda-tags-column 0 org-agenda-block-separator ?─ org-agenda-time-grid '((daily today require-timed) diff --git a/org-modern.el b/org-modern.el index 3bc45ae195..cacbbf3da3 100644 --- a/org-modern.el +++ b/org-modern.el @@ -909,12 +909,11 @@ whole buffer; otherwise, for the line at point." (goto-char (point-min)) (let ((re (concat "\\( \\)\\(:\\(?:" org-tag-re "::?\\)+\\)[ \t]*$"))) (while (re-search-forward re nil 'noerror) - (let ((beg (- (match-beginning 0) 3))) - (org-modern--tag) - ;; Handle `org-agenda-tags-column' set to `auto' - (when (and (eq 'auto (bound-and-true-p org-agenda-tags-column)) - (save-excursion (goto-char beg) (looking-at-p " "))) - (delete-region beg (+ beg 3))))))) + ;; Hack to handle `org-agenda-align-tags-to-column' + (when (and (eq 'auto (bound-and-true-p org-agenda-align-tags-to-column)) + (eq ?\s (char-before (match-beginning 0)))) + (put-text-property (1- (match-beginning 0)) (match-beginning 0) 'invisible t)) + (org-modern--tag)))) (when org-modern-priority (goto-char (point-min)) (while (re-search-forward "\\(\\[#.\\]\\)" nil 'noerror)