From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Bug: org-capture-templates issues Date: Wed, 04 Oct 2017 19:26:24 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c14e29800e39e055abd96b6" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzpJV-0007eV-Ah for emacs-orgmode@gnu.org; Wed, 04 Oct 2017 15:26:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzpJU-0002vk-E3 for emacs-orgmode@gnu.org; Wed, 04 Oct 2017 15:26:37 -0400 Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]:46920) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzpJU-0002vc-9f for emacs-orgmode@gnu.org; Wed, 04 Oct 2017 15:26:36 -0400 Received: by mail-qt0-x22d.google.com with SMTP id 6so12210487qtw.3 for ; Wed, 04 Oct 2017 12:26:36 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Haider Rizvi , emacs-orgmode@gnu.org --94eb2c14e29800e39e055abd96b6 Content-Type: text/plain; charset="UTF-8" On Wed, Oct 4, 2017 at 3:13 PM Haider Rizvi 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 --94eb2c14e29800e39e055abd96b6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Oct 4,= 2017 at 3:13 PM Haider Rizvi <hari= zvi@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"= )
=C2=A0 signal(error ("Invalid file location: nil"))
=C2=A0 error("Invalid file location: %S" nil)
=C2=A0 org-capture-expand-file((concat org-directory "inbox-gtd.org&quo= t;))
=C2=A0 org-capture-target-buffer((concat org-directory "inbox-gtd.org&q= uot;))
=C2=A0 org-capture-set-target-location()
=C2=A0 org-capture(nil)

My org-capture-templates is set as follows for ages:
(setq org-capture-templates
=C2=A0 =C2=A0 =C2=A0 '(("t" "Todo" entry (file+head= line=C2=A0 (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-express= ions as file names

Since functions are allowed the= re, 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 i= s
prepended automatically,

correct
= =C2=A0
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.=C2=A0
--

Kaushal Modi

--94eb2c14e29800e39e055abd96b6--