emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Yuri Lensky <ydl@ydl.cm>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [Patch] Fix handling of variable capture location
Date: Wed, 17 May 2017 14:25:24 +0200	[thread overview]
Message-ID: <87r2znr7pn.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAC38U-ezfZ0REh_7Rjmu3fcqWJEWV7kiM8WtdYY4-fDDC8_XZg@mail.gmail.com> (Yuri Lensky's message of "Tue, 16 May 2017 17:57:12 -0700")

Hello,

Yuri Lensky <ydl@ydl.cm> 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" <ydlensky@gmail.com>
> 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	other threads:[~2017-05-17 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17  0:57 [Patch] Fix handling of variable capture location Yuri Lensky
2017-05-17 12:25 ` Nicolas Goaziou [this message]
2017-05-17 18:52   ` Yuri Lensky
2017-05-19 14:16     ` Nicolas Goaziou
2017-05-19 23:37       ` Yuri Lensky
2017-05-20  6:36         ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r2znr7pn.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=ydl@ydl.cm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).