emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Capture broken with org-plus-contrib-20170917
@ 2017-09-21 16:14 N. Jackson
  2017-09-21 16:48 ` Josiah Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: N. Jackson @ 2017-09-21 16:14 UTC (permalink / raw)
  To: emacs-orgmode

After an Emacs package update a few days ago, my Org captures no
longer work. This is with org-plus-contib-20170917 from
http://orgmode.org/elpa/.

After I select a capture template to run, I get the error message

  Invalid file location: nil

and setting debug-on-error I see this:

  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 "/notes.org"))
    org-capture-target-buffer((concat org-directory "/notes.org"))
    org-capture-set-target-location()
    org-capture(nil)
    funcall-interactively(org-capture nil)
    call-interactively(org-capture nil nil)
    command-execute(org-capture)

. Checking the value returned by the concat,

  M-: (concat org-directory "/notes.org")

the correct value

  "/data/org/notes.org"

is returned. This is the correct file and it exists etc..

There have been no changes to my org configuration since June of
2016 and I have had no problem with my captures until the latest
Emacs package update.

An example of the capture templates that are suddenly failing is
this one:

  (setq org-capture-templates
      '(
	  ("n"
	   "Note"
	   ;; This one is a bit ugly. I see the guts of the template while the prompt is displayed. Also the PROPERTIES drawer is after the LOGBOOK instead of before.
	   entry (file (concat org-directory "/notes.org"))
	   "* %^{Enter Note Title}    %^g\n   :PROPERTIES:\n   :Created:  %U\n   :END:\n\n%?\n%i\n"
	   :kill-buffer t :empty-lines 1 :clock-in t :clock-resume t)
      )
  )

I found a work-around, in that if I change the `entry' line of the
capture template to read

  entry (file "notes.org")

the capture works again (taking advantage of what I assume must be
a new(ish) feature that org-directory is automatically used when
the file name in the capture template is unqualified).

Is this problem a new bug in Org, or is it simply that my capture
templates are wrong and that they've only worked all these years
by some accident?

If my capture templates are valid, then I would much rather see
Org put back the way it was so that they work, rather than have to
go through the error-prone process of having to edit them all (I
have dozens of them).

Thank you and best regards,
N.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-21 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-21 16:14 Capture broken with org-plus-contrib-20170917 N. Jackson
2017-09-21 16:48 ` Josiah Schwab
2017-09-21 17:09   ` N. Jackson

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).