mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-15 22:16:27 +00:00
New command to align all tags
This commit is contained in:
parent
5f7a04036a
commit
9cfebf0842
|
@ -1,3 +1,7 @@
|
||||||
|
2010-04-13 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org.el (org-align-all-tags): New command.
|
||||||
|
|
||||||
2010-04-13 David Maus <dmaus@ictsoc.de>
|
2010-04-13 David Maus <dmaus@ictsoc.de>
|
||||||
|
|
||||||
* org-wl.el (org-wl-link-remove-filter): New customizable
|
* org-wl.el (org-wl-link-remove-filter): New customizable
|
||||||
|
|
10
lisp/org.el
10
lisp/org.el
|
@ -12171,6 +12171,16 @@ If DATA is nil or the empty string, any tags will be removed."
|
||||||
(if (looking-at ".*?\\([ \t]+\\)$")
|
(if (looking-at ".*?\\([ \t]+\\)$")
|
||||||
(delete-region (match-beginning 1) (match-end 1))))))
|
(delete-region (match-beginning 1) (match-end 1))))))
|
||||||
|
|
||||||
|
(defun org-align-all-tags ()
|
||||||
|
"Align the tags i all headings."
|
||||||
|
(interactive)
|
||||||
|
(save-excursion
|
||||||
|
(or (ignore-errors (org-back-to-heading t))
|
||||||
|
(outline-next-heading))
|
||||||
|
(if (org-on-heading-p)
|
||||||
|
(org-set-tags t)
|
||||||
|
(message "No headings"))))
|
||||||
|
|
||||||
(defun org-set-tags (&optional arg just-align)
|
(defun org-set-tags (&optional arg just-align)
|
||||||
"Set the tags for the current headline.
|
"Set the tags for the current headline.
|
||||||
With prefix ARG, realign all tags in headings in the current buffer."
|
With prefix ARG, realign all tags in headings in the current buffer."
|
||||||
|
|
Loading…
Reference in a new issue