From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Fix a bug in the remember properties escape Date: Tue, 18 Nov 2008 08:28:13 +0100 Message-ID: References: <1226955386-17206-1-git-send-email-ahktenzero@mohorovi.cc> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2LKj-00019V-5X for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 02:49:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2LKi-00019E-MG for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 02:49:12 -0500 Received: from [199.232.76.173] (port=47376 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2LKi-00019B-Hb for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 02:49:12 -0500 Received: from mx20.gnu.org ([199.232.41.8]:16324) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L2LKi-0004T7-9s for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 02:49:12 -0500 Received: from ug-out-1314.google.com ([66.249.92.172]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L2LKg-00070r-QO for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 02:49:11 -0500 Received: by ug-out-1314.google.com with SMTP id 36so150849uga.17 for ; Mon, 17 Nov 2008 23:49:09 -0800 (PST) In-Reply-To: <1226955386-17206-1-git-send-email-ahktenzero@mohorovi.cc> 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: James TD Smith Cc: emacs-orgmode@gnu.org Hi James, thank you for the report and patch, I have fixed the issue, in a different way. - Carsten On Nov 17, 2008, at 9:56 PM, James TD Smith wrote: > Calling org-property-get-allowed-values with the point not on an item > resulted in an error. > > This patch is available from my git repository, in the branch > remember-properties-fix. > > --- > lisp/ChangeLog | 6 ++++++ > lisp/org-remember.el | 5 ++++- > 2 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/lisp/ChangeLog b/lisp/ChangeLog > index 53a21fd..3690659 100755 > --- a/lisp/ChangeLog > +++ b/lisp/ChangeLog > @@ -1,3 +1,9 @@ > +2008-11-17 James TD Smith > + > + * org-remember.el (org-remember-apply-template): The call to > + `org-property-get-allowed-values' failed if the point in the > + target file was not on a headline. > + > 2008-11-17 Carsten Dominik > > * org-colview.el (org-columns-display-here): New argument > diff --git a/lisp/org-remember.el b/lisp/org-remember.el > index 5d99ba3..9026489 100644 > --- a/lisp/org-remember.el > +++ b/lisp/org-remember.el > @@ -504,7 +504,10 @@ to be run from that hook to function properly." > ((prop (substring-no-properties prompt)) > (allowed (with-current-buffer > (get-buffer (file-name-nondirectory file)) > - (org-property-get-allowed-values nil prop 'table))) > + (save-excursion > + (if (not (org-at-heading-p)) > + (re-search-forward org-complex-heading-regexp)) > + (org-property-get-allowed-values nil prop 'table)))) > (existing (with-current-buffer > (get-buffer (file-name-nondirectory file)) > (mapcar 'list (org-property-values prop)))) > -- > 1.5.6.5 > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode