* [PATCH] Fix a bug in the remember properties escape
@ 2008-11-17 20:56 James TD Smith
2008-11-18 7:28 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: James TD Smith @ 2008-11-17 20:56 UTC (permalink / raw
To: emacs-orgmode
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 <ahktenzero@mohorovi.cc>
+
+ * 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 <carsten.dominik@gmail.com>
* 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix a bug in the remember properties escape
2008-11-17 20:56 [PATCH] Fix a bug in the remember properties escape James TD Smith
@ 2008-11-18 7:28 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2008-11-18 7:28 UTC (permalink / raw
To: James TD Smith; +Cc: emacs-orgmode
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 <ahktenzero@mohorovi.cc>
> +
> + * 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 <carsten.dominik@gmail.com>
>
> * 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-18 7:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 20:56 [PATCH] Fix a bug in the remember properties escape James TD Smith
2008-11-18 7:28 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.