emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Haider Rizvi <harizvi@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Bug: org-capture-templates issues
Date: Wed, 04 Oct 2017 19:26:24 +0000	[thread overview]
Message-ID: <CAFyQvY3qjNaPAusUNsw+reVNH2UAv6MnqPuRkL8GkX-==3deqw@mail.gmail.com> (raw)
In-Reply-To: <whyigd162bucy.fsf@hrizvi-wsm4.internal.salesforce.com>

[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]

On Wed, Oct 4, 2017 at 3:13 PM Haider Rizvi <harizvi@gmail.com> wrote:

> I'm getting the following error, when trying to do an org-capture.
>
> Debugger entered--Lisp error: (error "Invalid file location: nil")
>   signal(error ("Invalid file location: nil"))
>   error("Invalid file location: %S" nil)
>   org-capture-expand-file((concat org-directory "inbox-gtd.org"))
>   org-capture-target-buffer((concat org-directory "inbox-gtd.org"))
>   org-capture-set-target-location()
>   org-capture(nil)
>
> My org-capture-templates is set as follows for ages:
> (setq org-capture-templates
>       '(("t" "Todo" entry (file+headline  (concat org-directory "
> inbox-gtd.org") "Tasks")
>

Org 9.1 onwards, bare sexp's are now allowed in the template.

From ORG-NEWS:

*** ~org-capture-templates~ no longer accepts S-expressions as file names

Since functions are allowed there, a straightforward way to migrate
is to turn, e.g.,

: (file (sexp))

into

: (file (lambda () (sexp)))

Reading up org-capture-expand-file, it seems org-directory is
> prepended automatically,


correct


> but it used to work fine in the
> past. Flipping back to the older code for org-capture-expand-file
> works fine. So I'd say this is a bug!
>

As mentioned above, this is expected.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2471 bytes --]

  reply	other threads:[~2017-10-04 19:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 19:12 Bug: org-capture-templates issues Haider Rizvi
2017-10-04 19:26 ` Kaushal Modi [this message]
2017-10-04 19:34   ` Haider Rizvi

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='CAFyQvY3qjNaPAusUNsw+reVNH2UAv6MnqPuRkL8GkX-==3deqw@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=harizvi@gmail.com \
    /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).