emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [Patch] Fix handling of variable capture location


From: Yuri Lensky
Subject: Re: [O] [Patch] Fix handling of variable capture location
Date: Wed, 17 May 2017 11:52:21 -0700

The second call is indeed needed. This is the case fixed by the patch:

(setq org-default-notes-file (expand-file-name "~/docs/notes.org"))
(setq org-capture-templates '(("t" "Todo" entry (file+olp org-default-notes-file "Inbox") "* TODO %?\n%i")))

This breaks without the second symbol-value. The first is required to replicate the intended functionality of bound-and-true-p.

YL

On Wed, May 17, 2017 at 5:25 AM, Nicolas Goaziou <address@hidden> wrote:
Hello,

Yuri Lensky <address@hidden> writes:

> Capture locations in variable not working before this patch.

Thank you.

Could you show an example demonstrating the issue? The only difference
I can see with your patch is that you're referring to the global value
of file, not the local one.

> From c0de1c390b370b497fbb093ac5efd3d7aeaac0dc Mon Sep 17 00:00:00 2001
> From: "Yuri D. Lensky" <address@hidden>
> Date: Sun, 12 Mar 2017 17:58:15 -0700
> Subject: [PATCH] org-capture.el: Fix handling of variable capture location
>
> ---
>  lisp/org-capture.el | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/org-capture.el b/lisp/org-capture.el
> index 9ac9294..04c446d 100644
> --- a/lisp/org-capture.el
> +++ b/lisp/org-capture.el
> @@ -1060,7 +1060,8 @@ case, raise an error."
>    (let ((location (cond ((equal file "") org-default-notes-file)
>                       ((stringp file) (expand-file-name file org-directory))
>                       ((functionp file) (funcall file))
> -                     ((and (symbolp file) (bound-and-true-p file)))
> +                     ((and (symbolp file) (boundp file) (symbol-value file))
> +                      (symbol-value file))

The second call to `symbol-value' is not needed.

Regards,

--
Nicolas Goaziou


reply via email to

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