emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Xi Shen <davidshen84@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: "emacs-orgmode@gnu.org" <Emacs-orgmode@gnu.org>
Subject: Re: org-capture-expand-file: Invalid file location: nil
Date: Sun, 05 Nov 2017 02:27:24 +0000	[thread overview]
Message-ID: <CANO68EOVhoKvQ6HzUpsGbjp3Kr_4MfEz0vdFE0yzuALoXAh8BQ@mail.gmail.com> (raw)
In-Reply-To: <87d14xpwl7.fsf@nicolasgoaziou.fr>

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

Hi Nicolas,

Sorry, I missed this one.

(global-set-key (kbd "C-c c") 'org-capture)

OK, thanks for the tip. The problem lies in the "org-capture-templates"
settings. I think in the past, it accept a "nil" argument. Now it expects
an empty string. Replacing nil with empty string solves my problem.


Regards,
David


On Sun, Nov 5, 2017 at 5:23 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xi Shen <davidshen84@gmail.com> writes:
>
> > When I do C-c c, I got an error:
>
> I don't see any "c" template in your `org-capture-templates'.
>
> > org-capture-expand-file: Invalid file location: nil
> >
> > But (org-capture-expand-file "") returns the expected value. And the file
> > does exist. But (org-capture-expand-file nil) raise an error.
>
> This seems expected according to the docstring.
>
> > So I guess the function was given an erroneous value.
> >
> > My relevant settings are:
> >
> > (org-capture-templates
> >    (quote
> >     (("t" "Task" entry
> >       (file+headline nil "Tasks")
> >       "* TODO %? %^g")
> >      ("q" "Quick note" entry
> >       (file+datetree nil)
> >       "* [%<%H:%M>] %?"))))
>
> Have you tried to specify an actual filename, or the empty string,
> instead of using nil? Both `file+headline' and `file+datetree' expect
> some file to operate on.
>
> Regards,
>
> --
> Nicolas Goaziou
>

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

      reply	other threads:[~2017-11-05  2:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-04 11:23 org-capture-expand-file: Invalid file location: nil Xi Shen
2017-11-04 21:23 ` Nicolas Goaziou
2017-11-05  2:27   ` Xi Shen [this message]

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=CANO68EOVhoKvQ6HzUpsGbjp3Kr_4MfEz0vdFE0yzuALoXAh8BQ@mail.gmail.com \
    --to=davidshen84@gmail.com \
    --cc=Emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).