From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Not on a heading error while setting priorities Date: Sat, 01 Aug 2009 20:18:31 -0400 Message-ID: <87ab2jt6eg.fsf@gimli.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXS2C-0001aR-3G for emacs-orgmode@gnu.org; Sat, 01 Aug 2009 23:46:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXS28-0001Zn-5z for emacs-orgmode@gnu.org; Sat, 01 Aug 2009 23:46:55 -0400 Received: from [199.232.76.173] (port=41564 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXS27-0001Za-Tw for emacs-orgmode@gnu.org; Sat, 01 Aug 2009 23:46:51 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:56877) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MXS27-00033D-GL for emacs-orgmode@gnu.org; Sat, 01 Aug 2009 23:46:51 -0400 Received: from cpe000102d0fe75-cm0012256ecbde.cpe.net.cable.rogers.com ([99.239.148.180] helo=mail.norang.ca) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1MXS23-0002G2-Fr for emacs-orgmode@gnu.org; Sun, 02 Aug 2009 03:46:47 +0000 Received: from gollum.intra.norang.ca (gollum.intra.norang.ca [192.168.1.5]) by mail.norang.ca (8.14.3/8.14.3/Debian-5) with ESMTP id n723kjC0022292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 1 Aug 2009 23:46:46 -0400 Received: from gollum.intra.norang.ca (localhost [127.0.0.1]) by gollum.intra.norang.ca (8.14.3/8.14.3/Debian-5) with ESMTP id n723kjP5010953 for ; Sat, 1 Aug 2009 23:46:45 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, I noticed the following error while playing with task priorities. If you are in an org-file and use C-c , on a headline it works fine. If you try this after the headline (anywhere in the body of the task) you get a "Not on a heading" error but it still seems to work (it puts the appropriate priority in the heading of the task.) I like the idea of allowing the task priority to change while anywhere in the task and other than signalling the error this seems to work fine. I've attached the debug backtrace. A patch to fix this is in the following email. -Bernt Debugger entered--Lisp error: (error "Not on a heading") signal(error ("Not on a heading")) error("Not on a heading") (if (org-on-heading-p t) nil (error "Not on a heading")) (unless (org-on-heading-p t) (error "Not on a heading")) org-get-tags-string() (let* ((re ...) (current ...) (col ...) (org-setting-tags t) table current-tags inherited-tags tags p0 c0 c1 rpl) (if arg (save-excursion ... ... ...) (if just-align ... ... ...) (if org-tags-sort-function ...) (if ... ... ... ...) (beginning-of-line 1) (cond ... ... ...) (org-move-to-column col) (unless just-align ...))) org-set-tags(nil align) (progn (org-set-tags nil (quote align))) (unwind-protect (progn (org-set-tags nil ...)) (goto-line _line) (org-move-to-column _col)) (let ((_line ...) (_col ...)) (unwind-protect (progn ...) (goto-line _line) (org-move-to-column _col))) (org-preserve-lc (org-set-tags nil (quote align))) (let (current new news have remove) (save-excursion (org-back-to-heading t) (if ... ... ...) (cond ... ... ... ...) (if ... ...) (setq news ...) (if have ... ...)) (org-preserve-lc (org-set-tags nil ...)) (if remove (message "Priority removed") (message "Priority of current item set to %s" news))) org-priority() call-interactively(org-priority)