Hello,
This minor bug had been bothering me for a while and I eventually got to looking into the source code for it.
As of current master, C-u C-c C-q doesn't work as in the doc-string i.e. "When optional argument ALL is non-nil, align all tags in the visible part of the buffer.".
Here's an example Org buffer:
=====
* Foo :abc:
** Bar :def:
=====
- With point on Foo heading, C-u C-c C-q aligns only :def: tag (tags from *next* heading onwards).
- So when point is on Bar, no tags get aligned.
Though I remember that C-u C-c C-q worked quite some time back.
While I don't understand that entire commit, this simple fix brings back the true C-u C-c C-q behavior:
diff --git a/lisp/org.el b/lisp/org.el
index db3c11b5f..b8daa3bfc 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14203,8 +14203,10 @@ visible part of the buffer."
(org--align-tags-here (funcall get-indent-column))
(save-excursion
(if all
+ (progn
+ (goto-char (point-min))
(while (re-search-forward org-tag-line-re nil t)
- (org--align-tags-here (funcall get-indent-column)))
+ (org--align-tags-here (funcall get-indent-column))))
(org-back-to-heading t)
(org--align-tags-here (funcall get-indent-column)))))))
If this looks good, I can commit this to maint and master.
Thanks.