Open randomwangran opened 3 years ago
Hey thanks for this report. Unfortunately, I can't really recreate the "File Name" issue with a mono or non-mono spaced font.
As for tags with a variable width font there are concerns about tags being aligned. There has been work done to make sure they align. Namely, I apply the solution described here. Recently, I also discovered issues with monospaced fonts and tags appearing off screen. I have wrote a fix for that and I am waiting for MELPA to pick that up.
Hi @justinbarclay
For the "File Name" issue, I mock an ideal situation:
The issue is with "TODO" items.
For the tag issue, I tested the following code without success.
(defun org-agenda-fix-tag-alignment ()
"Use 'display :align-to instead of spaces in agenda."
(goto-char (point-min))
(setq-local word-wrap nil) ; tags would be moved to next line if
`word-wrap'` is non-nil and `truncate-lines' is nil
(while (re-search-forward org-tag-group-re nil 'noerror)
(put-text-property (match-beginning 0) (match-beginning 1) 'display
`(space . (:align-to (- right (,(string-display-pixel-width (match-string
1)))))))))
(add-hook 'org-agenda-finalize-hook #'org-agenda-fix-tag-alignment)
Thanks for patching this issue on MELPA, I will test it later or study the source code to see what I can do.
Thanks for looking into this, unfortunately, I don't know of a good way to resolve this myself. But if you find one I would happily accept a PR :)
One small suggestion or area to look into, but you might what to apply spacing based on todo-keywords and not tags, Org treats these differently and has different variables for them.
Thanks for writing this elegant package.
I found one issue with regard to alignment. Following is a figure to show the difference.
Thanks for your effort.