mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-26 07:33:39 +00:00
Fix "Not on a heading" error when setting priority inside a task
Changing the priority of a task when the point is after the heading (anywhere inside the task) worked but aligning the tags failed with a "not on a heading" error due to the save-excursion not including the tag alignment. This change moves back to the heading and includes that during tag alignment to remove the error text. Patch by Bernt Hansen.
This commit is contained in:
parent
052f6e334d
commit
47994f66d2
@ -2,6 +2,8 @@
|
||||
|
||||
* org.el (org-adapt-indentation): Slightly improve the docstring.
|
||||
(org-occur): Sends an error when the user inputs an empty string.
|
||||
(org-priority): Bugfix: the tag alignement should happen within
|
||||
save-excursion.
|
||||
|
||||
* org-exp.el (org-export-as-org): Use file-source.org format
|
||||
instead of file.org-source.
|
||||
|
@ -10307,13 +10307,12 @@ ACTION can be `set', `up', `down', or a character."
|
||||
(goto-char (match-end 2))
|
||||
(insert " [#" news "]"))
|
||||
(goto-char (match-beginning 3))
|
||||
(insert "[#" news "] ")))))
|
||||
(org-preserve-lc (org-set-tags nil 'align))
|
||||
(insert "[#" news "] "))))
|
||||
(org-preserve-lc (org-set-tags nil 'align)))
|
||||
(if remove
|
||||
(message "Priority removed")
|
||||
(message "Priority of current item set to %s" news))))
|
||||
|
||||
|
||||
(defun org-get-priority (s)
|
||||
"Find priority cookie and return priority."
|
||||
(save-match-data
|
||||
|
Loading…
Reference in New Issue
Block a user