Merge branch 'maint'
This commit is contained in:
commit
5cd6b30182
13
lisp/org.el
13
lisp/org.el
|
@ -8039,7 +8039,7 @@ in the region."
|
|||
(diff (abs (- level (length down-head) -1))))
|
||||
(replace-match down-head nil t)
|
||||
;; Fixup tag positioning
|
||||
(and org-auto-align-tags (org-set-tags nil t))
|
||||
(and org-auto-align-tags (org-set-tags nil 'ignore-column))
|
||||
(if org-adapt-indentation (org-fixup-indentation diff))
|
||||
(run-hooks 'org-after-demote-entry-hook)))
|
||||
|
||||
|
@ -14567,15 +14567,18 @@ If DATA is nil or the empty string, any tags will be removed."
|
|||
(defvar org-indent-indentation-per-level)
|
||||
(defun org-set-tags (&optional arg just-align)
|
||||
"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.
|
||||
When JUST-ALIGN is non-nil, only align tags.
|
||||
When JUST-ALIGN is 'ignore-column, align tags without trying to set
|
||||
the column by ignoring invisible text."
|
||||
(interactive "P")
|
||||
(if (and (org-region-active-p) org-loop-over-headlines-in-active-region)
|
||||
(let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level)
|
||||
'region-start-level 'region))
|
||||
org-loop-over-headlines-in-active-region)
|
||||
(org-map-entries
|
||||
;; We don't use ARG and JUST-ALIGN here these args are not
|
||||
;; useful when looping over headlines
|
||||
;; We don't use ARG and JUST-ALIGN here because these args
|
||||
;; are not useful when looping over headlines.
|
||||
`(org-set-tags)
|
||||
org-loop-over-headlines-in-active-region
|
||||
cl (if (outline-invisible-p) (org-end-of-subtree nil t))))
|
||||
|
@ -14664,7 +14667,7 @@ With prefix ARG, realign all tags in headings in the current buffer."
|
|||
(and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point)))
|
||||
tags)
|
||||
(t (error "Tags alignment failed")))
|
||||
(org-move-to-column col nil nil t)
|
||||
(org-move-to-column col nil nil (not (eq just-align 'ignore-column)))
|
||||
(unless just-align
|
||||
(run-hooks 'org-after-tags-change-hook))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue