emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-capture templates broken?
@ 2015-11-03 17:08 Kaushal Modi
  2015-11-03 18:04 ` Kaushal Modi
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2015-11-03 17:08 UTC (permalink / raw)
  To: emacs-org list

Hi all,

I am on the following build of emacs:

Emacs version: GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+
Version 2.24.23)
 of 2015-11-02, built using commit 5401bb8645f955b6fde8c0a5e5c8cf5ec1cab626.

./configure options:
  --prefix=/home/kmodi/usr_local/apps/6/emacs/master
'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-ggdb3 -O0'
'CXXFLAGS=-ggdb3 -O0' 'LDFLAGS=-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64 -ggdb3'

Features:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS GTK2 X11


Org version: Org-mode version 8.3.2 (release_8.3.2-254-g061112 @
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/)

This is how I set my org capture template:

    (setq org-capture-templates
          '(("j" "Journal" entry ; `org-capture' binding + j
             (file+datetree (expand-file-name "journal.org" org-directory))
             "\n* %?\n  Entered on %U")
            ("n" "Note" entry ; `org-capture' binding + n
             (file (expand-file-name "notes.org" org-directory))
             "\n* %?\n  Context:\n    %i\n  Entered on %U")
            ("u" "UVM/System Verilog Notes" ; `org-capture' binding + u
             entry (file (expand-file-name "uvm.org" org-directory))
             "\n* %?\n  Context:\n    %i\n  Entered on %U")))

I use org-capture almost every other day. So I can confirm that all
those file paths are valid. I udpated to the latest git version of
org-mode yesterday (and I updated to the latest today too). But today
is the first time I tried to use org-capture this week.

When I do M-x org-capture, I see the capture template selection buffer
fine. But when I hit any key to one of the templates (for example: 'j'
or 'n'), I get this error:

Debugger entered--Lisp error: (error "Capture abort: (file-error
Cannot open load file No such file or directory org-eldoc)")
  signal(error ("Capture abort: (file-error Cannot open load file No
such file or directory org-eldoc)"))
  error("Capture abort: %s" (file-error "Cannot open load file" "No
such file or directory" "org-eldoc"))
  org-capture(nil)
  funcall-interactively(org-capture nil)
  call-interactively(org-capture nil nil)
  command-execute(org-capture)


The backtrace is surprisingly short and I couldn't understand why it
fails. Also org-eldoc is in contrib and I don't include it in my
compilation. So I don't know what org-capture has to do with
org-eldoc.

Is org-capture template selection working fine for anyone on the
latest build as of today?


--
Kaushal Modi

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

* Re: org-capture templates broken?
  2015-11-03 17:08 org-capture templates broken? Kaushal Modi
@ 2015-11-03 18:04 ` Kaushal Modi
  2015-11-03 18:51   ` Kaushal Modi
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2015-11-03 18:04 UTC (permalink / raw)
  To: emacs-org list

I have bound org-capture to "C-c c" and "C-c c j" is working fine when
using the latest version of org-plus-contrib from org elpa.

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

* Re: org-capture templates broken?
  2015-11-03 18:04 ` Kaushal Modi
@ 2015-11-03 18:51   ` Kaushal Modi
  0 siblings, 0 replies; 3+ messages in thread
From: Kaushal Modi @ 2015-11-03 18:51 UTC (permalink / raw)
  To: emacs-org list, lukasz

The issue got fixed when I changed the below in my local.mk file and
rebuilt org:

From

ORG_ADD_CONTRIB = org-mime org-eww

To

ORG_ADD_CONTRIB = org-eldoc org-mime org-eww

I figured out why I was seeing the problem:

I have org-plus-contrib installed too. So when `package-initialize`
was called, the below bare form in org-eldoc.el (installed via
org-plus-contrib) got evaluated too:

(add-hook 'org-mode-hook #'org-eldoc-load)


I like to have both stable and dev version installed so that I can
switch to the stable version in case of emergency. So I have this
snippet in my org setup:

;; If `org-load-version-dev' is non-nil, remove the stable version of org
;; from the `load-path'.
(when (bound-and-true-p org-load-version-dev)
  (when (version<= "25.0" emacs-version) ;
`directory-files-recursively' is not available in older emacsen
      (let ((org-stable-install-path (car (directory-files-recursively
                                           package-user-dir
                                           "org-plus-contrib-[0-9]+"
                                           :include-directories))))
        (setq load-path (delete org-stable-install-path load-path)))))


That basically removes the org-plus-contrib dir from the load-path if
I choose to use the dev version of org-mode. But that still keeps
`org-eldoc-load' in the org-mode-hook.

@Lucas: I would propose to not update the org-mode-hook automatically;
that add-hook should not be bare in the org-eldoc.el. It should be
updated only via a function call.

--
Kaushal Modi

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

end of thread, other threads:[~2015-11-03 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-03 17:08 org-capture templates broken? Kaushal Modi
2015-11-03 18:04 ` Kaushal Modi
2015-11-03 18:51   ` Kaushal Modi

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