emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [PATCH] Fix "Not on a heading" error when setting priority ins


From: Bernt Hansen
Subject: [Orgmode] [PATCH] Fix "Not on a heading" error when setting priority inside a task
Date: Sun, 02 Aug 2009 10:58:36 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

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.
---
This patch is available at git://git.norang.ca/org-mode.git for-carsten

-Bernt

 lisp/org.el |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 119311a..942be39 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10294,13 +10294,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
-- 
1.6.2.rc1.1002.g6345





reply via email to

[Prev in Thread] Current Thread [Next in Thread]