[O] Capture aborts after selecting template
I am using GNU Emacs 23.1.1 with org-mode version 7.7. I want to use C-c c t to capture a task and send it to ~/todo.org as defined in the org-capture-template below. On pressing C-c c, the Org Select buffer opens but when I hit t, I get the error message "Capture abort: (void-function nil)" and nothing gets written to todo.org. The relevant lines from my .emacs and a backtrace from uncompiled code are shown below. Please help me fix this. .EMACS (define-key global-map "\C-cc" 'org-capture) (setq org-directory "~/") (setq org-capture-templates (quote (("t" "Todo" entry (file+headline "~/todo.org" "Tasks") "* TODO %?\n %i\n %a") ("j" "Journal" entry (file+datetree "~/journal.org") "* %?\nEntered on %U\n %i\n %a" BACKTRACE (Although I followed the instructions carefully, my backtrace still has some byte code that I couldn't paste here.) Debugger entered--Lisp error: (void-function nil) nil() run-hooks(text-mode-hook outline-mode-hook org-mode-hook) apply(run-hooks (text-mode-hook outline-mode-hook org-mode-hook)) run-mode-hooks(org-mode-hook) org-mode() set-auto-mode-0(org-mode nil) byte-code(..."*Ň" [modes mode --dolist-tail-- done keep-mode-if-same nil functionp message "Ignoring unknown mode `%s'" t set-auto-mode-0 throw nop] 4) set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(# "~/todo.org" nil nil "~/todo.org" (305483 2049)) find-file-noselect("/home/vadmin/todo.org") org-capture-target-buffer("~/todo.org") org-capture-set-target-location() org-capture(nil) call-interactively(org-capture nil nil)
Re: [O] Capture aborts after selecting template
Thanks, Bernt. The values are as shown below. Please suggest any changes. Sincerely, Felix text-mode-hook's value is (nil text-mode-hook-identify) outline-mode-hook's value is nil org-mode-hook is a variable defined in `org.el'. Its value is (#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes)
Re: [O] Capture aborts after selecting template
> > I think the problem is your 'nil' entries. > > My text-mode-hook looks like this: > > --8<---cut here---start->8--- > text-mode-hook's value is > (text-mode-hook-identify) > --8<---cut here---end--->8--- > > I would remove the nil entries and see if that helps > > My org-mode-hook looks like this: > --8<---cut here---start->8--- > Value: > (org-clock-load > (lambda nil >(abbrev-mode 1)) > (lambda nil >(add-hook 'before-save-hook 'org-encrypt-entries nil t)) > (lambda nil >(org-add-hook 'change-major-mode-hook 'org-show-block-all 'append 'local)) > (lambda nil >(org-add-hook 'change-major-mode-hook 'org-babel-show-result-all 'append 'local)) > org-babel-result-hide-spec org-babel-hide-all-hashes turn-on-flyspell > (lambda nil >(org-defkey org-mode-map "[" 'undefined) >(org-defkey org-mode-map "]" 'undefined)) > (lambda nil >(local-set-key > (kbd "C-c M-o") > 'bh/mail-subtree))) > --8<---cut here---end--->8--- > > I'm on GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11 on raven, modified by Debian > > Regards, > Bernt > > Please forgive the question, but how do you remove the nil entries? In .emacs I have (add-hook 'text-mode-hook (setq adaptive-fill-mode nil)) and so I'm not sure how text-mode-hook ends up with (nil (text-mode-hook-identify)). I tried (add-hook 'text-mode-hook (text-mode-hook-identify)) but this set text-mode-hook to (t text-mode-hook-identify) and when I tried C-c c t to enter a task, I get the message "Capture template 't': org-called-interactively-p" and nothing happens.
Re: [O] Capture aborts after selecting template
Bernt Hansen norang.ca> writes: > > If you want to set adaptive-fill-mode to nil you need something like > this instead: > > (add-hook 'text-mode-hook '(lambda () (setq adaptive-fill-mode nil))) > > Thanks for the detailed explanation. I added (add-hook 'text-mode-hook '(lambda () (setq adaptive-fill-mode nil))) as suggested. It didn't work at first, but then when I did C-u C-c C-x r to "reload org uncompiled" and generate a backtrace, it did work and I was able to use capture to add a todo list. The current status is that I have to reload org uncompiled every time I restart emacs to get capture to work. The situation is the same even when I comment out the preceding add-hook for text-mode-hook. Any idea how to fix this?
[O] Capture mode fails until "reload org uncompiled" is used
When I fire up emacs and use C-c c t to enter a task (see .emacs below), I get the message "Capture template `t': org-called-interactively-p" and nothing happens. However, if I use the menu option "Org->Refresh/Reload->Reload Org Uncompiled", then C-c c t works correctly every time. I have provided a backtrace below (without "reload org uncompiled", since that fixes the problem). Any suggestions to fix this so that I don't have to "reload org uncompiled" every time I start emacs? Thanks. -- .EMACS: ;;; org-mode (require 'org-install) (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (define-key global-map "\C-cl" 'org-store-link) (define-key global-map "\C-ca" 'org-agenda) (define-key global-map "\C-cc" 'org-capture) (setq org-log-done nil); to not log the time for an completed task. (setq org-directory "~/") (setq org-agenda-files (list "~/todo.org")) (setq org-agenda-start-on-weekday nil); start agenda from the current day. (setq org-agenda-start-with-follow-mode t) (setq org-capture-templates (quote (("t" "Todo" entry (file+headline "~/todo.org" "Tasks") "* TODO %?\n %i\n %a") ("j" "Journal" entry (file+datetree "~/journal.org") "* %?\nEntered on %U\n %i\n %a" -- BACKTRACE (Without "reload org uncompiled"): Debugger entered--Lisp error: (error "Capture template `t': org-called-interactively-p") signal(error ("Capture template `t': org-called-interactively-p")) error("Capture template `%s': %s" "t" org-called-interactively-p) byte-code("..." [error buffer-base-buffer string-match "\\`CAPTURE-" buffer-name kill-buffer set-window-configuration org-capture-get :return-to-wconf "Capture template `%s': %s" :key] 4) org-capture(nil) call-interactively(org-capture nil nil) ---
Re: [O] Capture mode fails until
Thanks, David. It worked. Sincerely, Felix
[Orgmode] Re: Customising title page
[02.04.2010 23:11] Graham Smith writes: > I would like to customise the title page, which I can do with a series > of LATEX_HEADER as below. > As I build up the full title page this is going to get a bit tedious > and I wondered if there a better way of doing this? Hi Graham, a simple trick: Use LaTeX for the title page. Create a separate file and then include it your org file via #+LaTeX: \input{title.tex} Cheers, Felix ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Preventing the export of cookies
Hi all, first, thanks for this great tool. :) Is there a way to prevent cookies ([/] and [%]) to be exported to LaTeX? Thanks for your help in advance! Sincerely, Felix ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[O] Python script to download Google Calendar events
Hi, I wrote a Python script that [1] uses the GData API to download events for your Google Calendar and prints them to a given org-file. It is a very tiny script, but perhaps it is of use to other people as well. Small disclaimer: I've tested this on Mac OS X only, using Python 2.7.2. Let me know what you think :) Cheers, Felix P.S.: Please excuse double posting if the first version does show up. Footnotes: [1] https://bitbucket.org/fgeller/gcal2org/src/8fa7d2b83ab3/gcal2org.py pgpgVIacIagKU.pgp Description: PGP signature
[O] Python script to download Google Calendar events
Hi, I wrote a Python script that [1] uses the GData API to download events for your Google Calendar and prints them to a given org-file. It is a very tiny script, but perhaps it is of use to other people as well. Small disclaimer: I've tested this on Mac OS X only, using Python 2.7.2. Let me know what you think :) Cheers, Felix Footnotes: [1] https://bitbucket.org/fgeller/gcal2org/src/8fa7d2b83ab3/gcal2org.py pgpVtFNe6jCLs.pgp Description: PGP signature
Re: [O] Python script to download Google Calendar events
Hi Bastien, On Wed, 13 Jul 2011 10:38:22 +0200, Bastien wrote: > This looks nice. I've not tested it yet, I'm busy with the release. > > Would you have any objection if I put this in this section of Worg: > > http://orgmode.org/worg/org-translators.html > > ? no, not at all :) Cheers, Felix > > > Thanks! > > -- > Bastien pgpV5itQIFZyl.pgp Description: PGP signature
Re: [O] Python script to download Google Calendar events
Hi Rasmus and list :) Small updates: 1. Integration of Rasmus' idea to support different calendars (thanks!) 2. Support for publishing a new title of an event. The second one is a very limited form of sync'ing changes back to Google Calendar, but suits my needs [2]. I updated the documentation to include examples. Take a look if you're interested: http://goo.gl/rZU78 Cheers, Felix On Fri, 22 Jul 2011 14:59:34 +0200, Rasmus wrote: > > Hi Felix, > > Felix Geller writes: > > > I wrote a Python script that [1] uses the GData API to download events > > for your Google Calendar and prints them to a given org-file. It is a > > very tiny script, but perhaps it is of use to other people as well. > > Now I've had some time to play around with your script and it is very > nice and fast. I tingled a bit with it. > > I (think) I have added support for other calendars using the > https://.*/private/full urls. I've also added a category. > > Thus, one can specify gcal2org.py n...@gpost.com file uri > > and if uri is left out it will work as your script. > > I have hosted the alternative script here: > > http://andromeda.kiwilight.com/~pank/gcal2org.txt (no .py allowed) > http://andromeda.kiwilight.com/~pank/gcal2org.diff > > The thing is, I don't know where you find these private/full urls in the > web-interface. I found them via Gdata. Optimally, it should just use > one of the urls from the web-interface. > > Cheers, > Rasmus > > -- > Sent from my Emacs > > Footnotes: [2] I add a hook to toggling the TODO state of an entry, and invoke the script to update the event title if applicable. There's an example in the script. pgp2Ke7HJs0Lx.pgp Description: PGP signature
[O] Code to convert lists etc. to HTML for org-mode export filter?
hi, I am working on org-freeplane.el, a fork of org-freemind.el [1]. [1] FreeMind and Freeplane are mind mapping programs and can thus be used to organize tree-structured information like org-mode does. Freeplane is a FreeMind fork, org-freeplane.el was necessary because users want to use the features of Freeplane. Can someone please point me to the code for converting node text to HTML in org-mode? The following code: * item1 - one - two - three should result in a mind map node with content: item1 one two three (of course there are more complex examples, like nested lists etc.) Is there common code for exporting to HTML (3.2 in my case)? Shall I import org-html.el in org-freeplane.el and use code from that? (I think that wouldn't be trivial because 'org-export-as-html' does a lot of stuff that I may not require/allow like running hooks...) Thanks and Best Regards, -- Felix Natter
[O] ox-freemind.el / org-freemind.el (was: Re: Code to convert lists etc. to HTML for org-mode export filter?)
Thorsten Jolitz writes: > Felix Natter writes: > >> hi, >> >> I am working on org-freeplane.el, a fork of org-freemind.el [1]. >> >> [1] FreeMind and Freeplane are mind mapping programs and can thus >> be used to organize tree-structured information like org-mode does. >> Freeplane is a FreeMind fork, org-freeplane.el was necessary because >> users want to use the features of Freeplane. >> >> Can someone please point me to the code for converting node text to >> HTML in org-mode? > > org-freemind is derived from ox-html: > > , > | ;;; Define Back-End > | (org-export-define-derived-backend 'freemind 'html ...) > ` > > so if org-freeplane derives from org-freemind, you have all the > html-exporting functionality at your fingertips already, if I'm not > mistaken. hi Thorsten, thanks for the hint, seems my org-mode is hopelessly outdated (from emacs 24.3). However, I cannot find any *-freemind.el in git://git.savannah.gnu.org/emacs.git, is that because it's non-free? (in git://orgmode.org/org-mode.git, it is included as contrib/lisp/ox-freemind.el, does the 'contrib' indicate non-free as well...?) Is ox-freemind.el derived (forked/copied) from org-freemind.el? Is anyone currently actively developing ox-freemind.el? Also: In order to build on the latest org-mode, can I just put contrib/lisp and lisp/ from git://orgmode.org/org-mode.git master branch in my load-path? Thanks and Best Regards, -- Felix Natter
Re: [O] ox-freemind.el / org-freemind.el
Thorsten Jolitz writes: > Felix Natter writes: > >> Thorsten Jolitz writes: >> >>> Felix Natter writes: >>> >>>> hi, >>>> >>>> I am working on org-freeplane.el, a fork of org-freemind.el [1]. >>>> >>>> [1] FreeMind and Freeplane are mind mapping programs and can thus >>>> be used to organize tree-structured information like org-mode does. >>>> Freeplane is a FreeMind fork, org-freeplane.el was necessary because >>>> users want to use the features of Freeplane. >>>> >>>> Can someone please point me to the code for converting node text to >>>> HTML in org-mode? >>> >>> org-freemind is derived from ox-html: >>> >>> , >>> | ;;; Define Back-End >>> | (org-export-define-derived-backend 'freemind 'html ...) >>> ` >>> >>> so if org-freeplane derives from org-freemind, you have all the >>> html-exporting functionality at your fingertips already, if I'm not >>> mistaken. >> >> hi Thorsten, >> >> thanks for the hint, seems my org-mode is hopelessly outdated (from >> emacs 24.3). >> However, I cannot find any *-freemind.el in >> git://git.savannah.gnu.org/emacs.git, is that because it's non-free? >> (in git://orgmode.org/org-mode.git, it is included as >> contrib/lisp/ox-freemind.el, does the 'contrib' indicate non-free as >> well...?) > > for me its in: > > , > | /org-mode/contrib/lisp/ox-freemind.el > ` For me too :-) So the right way for ox-freeplane.el to be accepted in org-mode is to extend or clone ox-freemind.el? Is there a chance that ox-freeplane.el will move from contrib/ to lisp/ (when I sign the copyright papers)? >> Is ox-freemind.el derived (forked/copied) from org-freemind.el? >> Is anyone currently actively developing ox-freemind.el? > > Does org-freemind.el exist at all? Yes, it's part of GNU Emacs 24.3: /usr/share/emacs/24.3/lisp/org/org-freemind.el.gz Thanks and Best Regards, -- Felix Natter
[O] Bug: org-export-icalendar-this-file doesn't work [8.2.10 (8.2.10-29-g89a0ac-elpa @ /home/vadmin/.emacs.d/elpa/org-20141222/)]
I recently updated to the latest org-mode version (using M-x list-packages). Now M-x org-export-icalendar-this file doesn't work. I get the following error message: org-export-icalendar: Symbol's function definition is void: org-prepare-agenda-buffers More information below. Please advise. Thank you. Sincerely, Felix Fernandes Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22 on chindi10, modified by Debian Package: Org-mode version 8.2.10 (8.2.10-29-g89a0ac-elpa @ /home/vadmin/.emacs.d/elpa/org-20141222/) current state: == (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-icalendar-include-todo t org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-agenda-use-time-grid nil org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-custom-commands '(("pa" "A-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"A\"") ("pb" "B-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"B\"") ("pc" "C-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"C\"") ("b" "Buy" tags "+CATEGORY=\"BUY\"") ("w" "Web" tags "+CATEGORY=\"WEB\"") ("k" "Books" tags "+CATEGORY=\"BOOKS\"") ("v" "Movies" tags "+CATEGORY=\"MOVIES\"") ("u" "Music" tags "+CATEGORY=\"MUSIC\"")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-deadline-warning-days 0 org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-sorting-strategy '((agenda priority-down) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)) org-agenda-start-with-follow-mode t org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-agenda-prefix-format " %-11:c% s" org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes my-org-mode-hook) org-agenda-start-on-weekday nil org-agenda-mode-hook '(my-org-agenda-mode-hook) org-directory "~/org/" org-metadown-hook '(org-babel-pop-to-session-maybe) org-agenda-files '("~/org/todo.org" "~/org/home.org") org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p )
Re: [O] Bug: org-export-icalendar-this-file doesn't work [8.2.10 (8.2.10-29-g89a0ac-elpa /home/vadmin/.emacs.d/elpa/org-20141222/)]
> You probably need to make sure that you install org correctly, so that > the previous bits are shadowed completely. Read the "Using Emacs > packaging system" subsection of the "Installation" section of the Org > manual for important information: > >(info "(org) Installation") I checked the information at the info node that you suggested. It provides the following requirements: Make sure that no other org files are open during the install and place (package-initialize) before setting org options in .emacs. I verified both of these requirements and updated to org version 20141229, but I still encounter the function org-export-icalendar-this-file and it still produces the same error as before. How to uninstall all org modes and re-install only the latest one? Thanks.
Re: [O] Bug: org-export-icalendar-this-file doesn't work [8.2.10 (8.2.10-29-g89a0ac-elpa /home/vadmin/.emacs.d/elpa/org-20141222/)]
Thanks for your help, Nick. I found that C-c C-e c f replaces org-export-icalendar-this-file. It would be nice if M-x org-export-icalendar-this-file is undefined or pops up an error message stating that it has been replaced by C-c C-e c f.
Re: [O] Bug: org-export-icalendar-this-file doesn't work [8.2.10 (8.2.10-29-g89a0ac-elpa /home/vadmin/.emacs.d/elpa/org-20141222/)]
> org-export-icalendar-this-file *is* undefined in versions of org >= 8.0. > When I try M-x org-export-icalendar-this-file on a modern org, I get "No > match". The fact that you get something else is indicative of > installation problems as I alluded to before. The org-export-icalendar-this-file is the least of my worries because I can just use org-icalendar-export-to-ics. Thanks again for your help. I will re-post seeking a solution to the installation problem.
[O] Org mode installation problems
Hi, I recently updated to the latest org-mode version (using M-x list-packages). I am having some problems after installation. For example, the following keyboard test macro (fset 'jj [?\C-c ?c ?t ?j ?j return ?\C-c ?\C-c]) that invokes this capture template definition (setq org-capture-templates '(("t" "Todo" entry (file "~/org/j.org" no longer works. However, when I removed the directories org* from ~/.emacs.d/elpa/, then this keyboard test macro began to work again. Any suggestions on how to fix the installation problems? I have placed package-initialize at the beginning of my .emacs but that doesn't help. Is there an easy way to delete all previous installations of org mode? I had several org* directories in my ~/.emacs.d/elpa/ directory and the above problem was fixed when I removed them all. Thanks. Sincerely, Felix -- Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22 on chindi10, modified by Debian Package: Org-mode version 7.8.02 current state: == (setq org-export-blocks '((src org-babel-exp-src-block nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-icalendar-include-todo t org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe) org-agenda-use-time-grid nil org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-custom-commands '(("pa" "A-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"A\"") ("pb" "B-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"B\"") ("pc" "C-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"C\"") ("b" "Buy" tags "+CATEGORY=\"BUY\"") ("w" "Web" tags "+CATEGORY=\"WEB\"") ("k" "Books" tags "+CATEGORY=\"BOOKS\"") ("v" "Movies" tags "+CATEGORY=\"MOVIES\"") ("u" "Music" tags "+CATEGORY=\"MUSIC\"")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-deadline-warning-days 0 org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-capture-templates '(("t" "Todo" entry (file+headline "~/org/todo.org" "Tasks") "* TODO %^{Brief Description}" :prepend t) ("e" "Email Todo" entry (file+headline "~/org/todo.org" "Tasks") "* TODO %:subject\n%a\n%?Added: %U\n" :prepend t)) org-agenda-sorting-strategy '((agenda priority-down) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-agenda-start-with-follow-mode t org-blank-before-new-entry nil org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-agenda-prefix-format " %-11:c% s" org-export-first-hook '(org-beamer-initialize-open-trackers) org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] org-babel-hide-all-hashes my-org-mode-hook) org-agenda-start-on-weekday nil org-agenda-mode-hook '(my-org-agenda-mode-hook) org-directory "~/org/" org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-metadown-hook '(org-babel-pop-to-session-maybe) org-agenda-files '("~/org/todo.org" "~/org/home.org") org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p )
Re: [O] Org mode installation problems
> Any suggestions on how to fix the installation problems? I have placed > package-initialize at the beginning of my .emacs but that doesn't help. I re-installed org-mode from elpa after deleting all org-related entries from my .emacs (I don't have init.el) and ensuring that no org buffers were open. After the installation I observed the following information from the elpa entry: org is an installed package. Status: Installed in `/home/vadmin/.emacs.d/elpa/org-20150105/', shadowing a built-in package. Version: 20150105 So, it appears to be installed correctly. However, the obsolete function M-x org-export-icalendar-this-file is still available (it shouldn't be) and the keyboard test macro that I mentioned in my previous post fails. According to available documentation, I have followed the correct procedure to update org from the built-in installation. But it doesn't work. Please advise. Thanks. Information on my state after the update is below: Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22 on chindi10, modified by Debian Package: Org-mode version 8.2.10 (8.2.10-29-g89a0ac-elpa @ /home/vadmin/.emacs.d/elpa/org-20150105/) current state: == (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-agenda-use-time-grid nil org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-custom-commands '(("pa" "A-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"A\"") ("pb" "B-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"B\"") ("pc" "C-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"C\"") ("b" "Buy" tags "+CATEGORY=\"BUY\"") ("w" "Web" tags "+CATEGORY=\"WEB\"") ("k" "Books" tags "+CATEGORY=\"BOOKS\"") ("v" "Movies" tags "+CATEGORY=\"MOVIES\"") ("u" "Music" tags "+CATEGORY=\"MUSIC\"")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-deadline-warning-days 0 org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-sorting-strategy '((agenda priority-down) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)) org-agenda-start-with-follow-mode t org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-agenda-prefix-format " %-11:c% s" org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes my-org-mode-hook) org-agenda-start-on-weekday nil org-agenda-mode-hook '(my-org-agenda-mode-hook) org-directory "~/org/" org-metadown-hook '(org-babel-pop-to-session-maybe) org-agenda-files '("~/org/todo.org" "~/org/home.org") org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p )
Re: [O] Org mode installation problems
> Try loading a minimal init file (e.g. check > >http://thread.gmane.org/gmane.emacs.orgmode/80179/focus=80213 > > for an example) and start emacs with > >emacs -q -l /path/to/minimal/.emacs > > If org-export-icalendar-this-file is undefined (as it should be), then > the problem is somewhere in your .emacs file. So start eliminating stuff > from it, until you find out what causes the problem. I chopped my .emacs file down to the following bare essentials: -- (require 'package) (package-initialize) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/";) t) (global-set-key "\C-t" 'previous-line) (global-set-key "\C-f" 'backward-char) (global-set-key "\C-v" 'next-line) (global-set-key "\C-g" 'forward-char) (global-set-key "\C-b" 'backward-word) (global-set-key "\C-n" 'forward-word) (global-set-key "\C-k" 'kill-line) (global-set-key "\C-l" 'kill-word) (global-set-key "\M-w" 'kill-region) (global-set-key (kbd "C-'") 'shrink-window) (global-set-key (kbd "C-;") 'kill-ring-save) (global-set-key (kbd "C-:") 'clipboard-kill-ring-save) (global-set-key "\C-q" 'recenter) --- Then I re-started emacs and opened an org file. I found that M-x org-export-icalendar-this-file is still defined. So the problem may not be in my .emacs? Not sure if this helps but in my load path, I find "usr/share/emacs24/site-lisp/org-mode" and at this location, grep shows that the obsolete function is defined: [vadmin@ubu1004:/usr/share/emacs24/site-lisp/org-mode] $ grep "org-export-icalendar-this-file" org-icalendar.el (defun org-export-icalendar-this-file () Any suggestions on how to fix this, since .emacs may not be the culprit? Here is the full load-path: ("/home/vadmin/.emacs.d/elpa/org-20150105" "/home/vadmin/.emacs.d/elpa/wanderlust-20141208.1533" "/home/vadmin/.emacs.d/elpa/semi-20141109.9" "/home/vadmin/.emacs.d/elpa/flim-20141216.1521" "/home/vadmin/.emacs.d/elpa/apel-20141024.1642" "/usr/share/emacs24/site-lisp/thailatex" "/usr/share/emacs24/site-lisp/namazu" "/usr/share/emacs24/site-lisp/latex-cjk-thai" "/usr/share/emacs24/site-lisp/latex-cjk-common" "/usr/share/emacs24/site-lisp/x-face-el" "/usr/share/emacs24/site-lisp/wl" "/usr/share/emacs24/site-lisp/bitmap-mule" "/usr/share/emacs24/site-lisp/semi" "/usr/share/emacs24/site-lisp/mu-cite" "/usr/share/emacs24/site-lisp/w3m" "/usr/share/emacs24/site-lisp/w3m/shimbun" "/usr/share/emacs24/site-lisp/org-mode" "/usr/share/emacs24/site-lisp/mhc" "/usr/share/emacs24/site-lisp/flim" "/usr/share/emacs24/site-lisp/dictionaries-common" "/usr/share/emacs24/site-lisp/bbdb" "/usr/share/emacs24/site-lisp/apel" "/etc/emacs24" "/etc/emacs" "/usr/local/share/emacs/24.3/site-lisp" "/usr/local/share/emacs/site-lisp" "/usr/share/emacs/24.3/site-lisp" "/usr/share/emacs/24.3/site-lisp/apel" "/usr/share/emacs/24.3/site-lisp/bbdb" "/usr/share/emacs/24.3/site-lisp/bitmap-mule" "/usr/share/emacs/24.3/site-lisp/dictionaries-common" "/usr/share/emacs/24.3/site-lisp/flim" "/usr/share/emacs/24.3/site-lisp/latex-cjk-common" "/usr/share/emacs/24.3/site-lisp/latex-cjk-thai" "/usr/share/emacs/24.3/site-lisp/mhc" "/usr/share/emacs/24.3/site-lisp/mu-cite" "/usr/share/emacs/24.3/site-lisp/namazu" "/usr/share/emacs/24.3/site-lisp/org-mode" "/usr/share/emacs/24.3/site-lisp/semi" "/usr/share/emacs/24.3/site-lisp/thailatex" "/usr/share/emacs/24.3/site-lisp/w3m" "/usr/share/emacs/24.3/site-lisp/wl" "/usr/share/emacs/24.3/site-lisp/x-face-el" "/usr/share/emacs/24.3/site-lisp/w3m/shimbun" "/usr/share/emacs/24.3/site-lisp/wl/etc" "/usr/share/emacs/24.3/site-lisp/wl/etc/icons" "/usr/share/emacs/site-lisp" "/usr/share/emacs/24.3/lisp" "/usr/share/emacs/24.3/lisp/vc" "/usr/share/emacs/24.3/lisp/url" "/usr/share/emacs/24.3/lisp/textmodes" "/usr/share/emacs/24.3/lisp/progmodes" "/usr/share/emacs/24.3/lisp/play" "/usr/share/emacs/24.3/lisp/org" "/usr/share/emacs/24.3/lisp/nxml" "/usr/share/emacs/24.3/lisp/net" "/usr/share/emacs/24.3/lisp/mh-e" "/usr/share/emacs/24.3/lisp/mail" "/usr/share/emacs/24.3/lisp/language" "/usr/share/emacs/24.3/lisp/international" "/usr/share/emacs/24.3/lisp/gnus" "/usr/share/emacs/24.3/lisp/eshell" "/usr/share/emacs/24.3/lisp/erc" "/usr/share/emacs/24.3/lisp/emulation" "/usr/share/emacs/24.3/lisp/emacs-lisp" "/usr/share/emacs/24.3/lisp/cedet" "/usr/share/emacs/24.3/lisp/calendar" "/usr/share/emacs/24.3/lisp/calc" "/usr/share/emacs/24.3/lisp/obsolete" "/usr/share/emacs/24.3/leim")
Re: [O] Org mode installation problems
> ... and where did that load-path get initialized? According to https://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Search.html, the load-path got initialized to default sources when emacs was compiled. Then after I did the elpa org-mode update, the elpa directories got placed at the start of the load-path so that all the files in them should shadow the built-in org-mode files. However, org-icalendar.el is obsolete and not included in the elpa directories. Hence, it does not get shadowed. I have appended an excerpt from the output of M-x list-load-path-shadows to show which org files are shadowed. This explains why M-x org-export-icalendar-this-file is still defined. It does not bother me as much as the following keyboard macro (fset 'jk [?\M-x ?o ?r ?g ?- ?c ?a ?p ?t ?u ?r ?e return ?t return ?\C-e ? ?j ?k ?\C-c ?\C-c]) that should invoke the following template: (setq org-capture-templates '(("t" "Todo" entry (file "~/org/j.org" Executing M-x jk gives the following error message: Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::(fset 'jk [?\M-x ?o ?r ?g ?- ?c ?a ?p ?t ?u ?r ?e return ?t return ?\C-e ? ?j ?k ?\C-c ?\C-c]) Tasks)) Any ideas? Thanks. Excerpt from M-x list-load-path-shadows /home/vadmin/.emacs.d/elpa/org-20150105/org-mobile hides /usr/share/emacs24/site-lisp/org-mode/org-mobile /home/vadmin/.emacs.d/elpa/org-20150105/ob-gnuplot hides /usr/share/emacs24/site-lisp/org-mode/ob-gnuplot /home/vadmin/.emacs.d/elpa/org-20150105/org-clock hides /usr/share/emacs24/site-lisp/org-mode/org-clock /home/vadmin/.emacs.d/elpa/org-20150105/org-install hides /usr/share/emacs24/site-lisp/org-mode/org-install /home/vadmin/.emacs.d/elpa/org-20150105/ob-octave hides /usr/share/emacs24/site-lisp/org-mode/ob-octave /home/vadmin/.emacs.d/elpa/org-20150105/org-protocol hides /usr/share/emacs24/site-lisp/org-mode/org-protocol /home/vadmin/.emacs.d/elpa/org-20150105/ob-asymptote hides /usr/share/emacs24/site-lisp/org-mode/ob-asymptote /home/vadmin/.emacs.d/elpa/org-20150105/ob-ref hides /usr/share/emacs24/site-lisp/org-mode/ob-ref /home/vadmin/.emacs.d/elpa/org-20150105/org-gnus hides /usr/share/emacs24/site-lisp/org-mode/org-gnus /home/vadmin/.emacs.d/elpa/org-20150105/ob-sass hides /usr/share/emacs24/site-lisp/org-mode/ob-sass /home/vadmin/.emacs.d/elpa/org-20150105/org-agenda hides /usr/share/emacs24/site-lisp/org-mode/org-agenda /home/vadmin/.emacs.d/elpa/org-20150105/org-w3m hides /usr/share/emacs24/site-lisp/org-mode/org-w3m /home/vadmin/.emacs.d/elpa/org-20150105/org-plot hides /usr/share/emacs24/site-lisp/org-mode/org-plot /home/vadmin/.emacs.d/elpa/org-20150105/org-indent hides /usr/share/emacs24/site-lisp/org-mode/org-indent /home/vadmin/.emacs.d/elpa/org-20150105/ob-org hides /usr/share/emacs24/site-lisp/org-mode/ob-org /home/vadmin/.emacs.d/elpa/org-20150105/org-list hides /usr/share/emacs24/site-lisp/org-mode/org-list /home/vadmin/.emacs.d/elpa/org-20150105/ob-emacs-lisp hides /usr/share/emacs24/site-lisp/org-mode/ob-emacs-lisp /home/vadmin/.emacs.d/elpa/org-20150105/org-bbdb hides /usr/share/emacs24/site-lisp/org-mode/org-bbdb /home/vadmin/.emacs.d/elpa/org-20150105/ob-scheme hides /usr/share/emacs24/site-lisp/org-mode/ob-scheme /home/vadmin/.emacs.d/elpa/org-20150105/ob-ledger hides /usr/share/emacs24/site-lisp/org-mode/ob-ledger /home/vadmin/.emacs.d/elpa/org-20150105/org-feed hides /usr/share/emacs24/site-lisp/org-mode/org-feed /home/vadmin/.emacs.d/elpa/org-20150105/ob-java hides /usr/share/emacs24/site-lisp/org-mode/ob-java /home/vadmin/.emacs.d/elpa/org-20150105/ob-js hides /usr/share/emacs24/site-lisp/org-mode/ob-js /home/vadmin/.emacs.d/elpa/org-20150105/org-info hides /usr/share/emacs24/site-lisp/org-mode/org-info /home/vadmin/.emacs.d/elpa/org-20150105/org-attach hides /usr/share/emacs24/site-lisp/org-mode/org-attach /home/vadmin/.emacs.d/elpa/org-20150105/ob-matlab hides /usr/share/emacs24/site-lisp/org-mode/ob-matlab /home/vadmin/.emacs.d/elpa/org-20150105/ob-ocaml hides /usr/share/emacs24/site-lisp/org-mode/ob-ocaml /home/vadmin/.emacs.d/elpa/org-20150105/ob-fortran hides /usr/share/emacs24/site-lisp/org-mode/ob-fortran /home/vadmin/.emacs.d/elpa/org-20150105/ob-exp hides /usr/share/emacs24/site-lisp/org-mode/ob-exp /home/vadmin/.emacs.d/elpa/org-20150105/org-mouse hides /usr/share/emacs24/site-lisp/org-mode/org-mouse /home/vadmin/.emacs.d/elpa/org-20150105/ob hides /usr/share/emacs24/site-lisp/org-mode/ob /home/vadmin/.emacs.d/elpa/org-20150105/ob-lilypond hides /usr/share/emacs24/site-lisp/org-mode/ob-lilypond /home/vadmin/.emacs.d/elpa/org-20150105/org-colview hides /usr/share/emacs24/site-lisp/org-mode/org-colview /home/vadmin/.emacs.d/elpa/org-20150105/ob-plantuml hides /usr/share/emacs24/site-lisp/org-mode/ob-plantuml /home/vadmin/.emacs.d/elpa/org-20150105/org-rmail hides /usr/share/emacs24/site-lisp/org-mode/org-rmail /home/vadmin/.emacs.d/elpa/org-20150105/org-compat hides /usr/share/emacs24/site-lisp/org-mode/org-compat /home/vadmin/.
Re: [O] Org mode installation problems
> It does not bother me as much as the following keyboard macro > > (fset 'jk > [?\M-x ?o ?r ?g ?- ?c ?a ?p ?t ?u ?r ?e return ?t return ?\C-e ? ?j ?k > ?\C-c ?\C-c]) > > that should invoke the following template: > (setq org-capture-templates '(("t" "Todo" entry (file "~/org/j.org" > If it helps to debug, here is the backtrace from M-x jk as defined above: Debugger entered--Lisp error: (error "Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks))") signal(error ("Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks))")) error("Capture abort: %s" (wrong-type-argument stringp ("file:~/org/todo.org::*Tasks" "Tasks"))) byte-code("\301\302!\203\302!\210\300\304" [error get-buffer "*Capture*" kill-buffer "Capture abort: %s"] 3) org-capture(nil) call-interactively(org-capture record nil) command-execute(org-capture record) execute-extended-command(nil "org-capture") call-interactively(execute-extended-command nil nil) command-execute(jj record) execute-extended-command(nil "jj") call-interactively(execute-extended-command nil nil)
Re: [O] Org mode installation problems
> The backtrace is not very useful as is because of the byte code. You > might try to reproduce with uncompiled code and see if it is any > clearer. How to do that? I had used C-u M-x org-reload RET before, as described in the org-mode documentation to get a backtrace from uncompiled code. Apparently, that didn't work. Could it be part of the problem?
Re: [O] Org mode installation problems
> > The backtrace is not very useful as is because of the byte code. You > > might try to reproduce with uncompiled code and see if it is any > > clearer. > > How to do that? I had used > C-u M-x org-reload RET > before, as described in the org-mode documentation to get a backtrace from > uncompiled code. Apparently, that didn't work. Could it be part of the problem? > > I did an org re-install from a tarball (instead of elpa). All problems persist. However by issuing a sudo make clean before the reload, I managed to get a backtrace without uncompiled code. I will create a new post with that backtrace seeking help to debug the problem.
[O] Need help debugging org-capture-template failure invoked by keyboard macro
I am trying to use the following keyboard test macro (fset 'jj [?\C-c ?c ?t ?j ?j return ?\C-c ?\C-c]) to invoke this capture template definition (setq org-capture-templates '(("t" "Todo" entry (file "~/org/j.org" Note that C-c c invokes M-x org-capture. Unfortunately, it produces the following error message: After 0 kbd macro iterations: byte-code: Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks)) I have produced the backtrace show below. The org-mode configuration is appended after the backtrace. Please help me debug and fix this problem. Thanks. Sincerely, Felix Debugger entered--Lisp error: (error "Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks))") signal(error ("Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks))")) error("Capture abort: %s" (wrong-type-argument stringp ("file:~/org/todo.org::*Tasks" "Tasks"))) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (cond ((equal entry "C") (customize-variable (quote org-capture-templates))) ((equal entry "q") (error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep (quote dired)) (car (rassq orig-buf dired-buffers :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template (equal (car (org-capture-get :target)) (quote function))) ((error quit) (if (and (buffer-base-buffer ...) (string-match "\\`CAPTURE-" ...)) (kill-buffer (current-buffer))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error (if (and (derived-mode-p (quote org-mode)) (org-capture-get :clock-in)) (condition-case nil (progn (if (org-clock-is-active) (org-capture-put :interrupted-clock ...)) (org-clock-in) (org-set-local (quote org-capture-clock-was-started) t)) (error "Could not start the clock in this capture buffer"))) (if (org-capture-get :immediate-finish) (org-capture-finalize) (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp (quote org-capture-link-is-already-stored)) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (condition-case nil (progn (org-store-link nil)) (error nil (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark) (if (stringp initial) (progn (remove-text-properties 0 (length initial) (quote (read-only t)) initial))) (if (stringp annotation) (progn (remove-text-properties 0 (length annotation) (quote (read-only t)) annotation))) (cond ((equal entry "C") (customize-variable (quote org-capture-templates))) ((equal entry "q") (error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep (quote dired)) (car (rassq orig-buf dired-buffers :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template (equal (car ...) (quote function))) ((error quit) (if (and ... ...) (kill-buffer ...)) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error (if (and (derived-mode-p (quote org-mode)) (org
Re: [O] Need help debugging org-capture-template failure invoked by keyboard macro
I'm no lisp expert, but I have attempted to indent the backtrace below for easier reading. Debugger entered--Lisp error: (error "Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks))") signal(error ("Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks))")) error("Capture abort: %s" (wrong-type-argument stringp ("file:~/org/todo.org::*Tasks" "Tasks"))) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (cond ((equal entry "C") (customize-variable (quote org-capture-templates))) ((equal entry "q") (error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep (quote dired)) (car (rassq orig-buf dired-buffers :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))$) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template (equal (car (org-capture-get :target)) (quote function))) ((error quit) (if (and (buffer-base-buffer ...) (string-match "\\`CAPTURE-" ...)) (kill-buffer (current-buffer))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error (if (and (derived-mode-p (quote org-mode)) (org-capture-get :clock-in)) (condition-case nil (progn (if (org-clock-is-active) (org-capture-put :interrupted-clock...)) (org-clock-in) (org-set-local (quote org-capture-clock-was-started) t)) (error "Could not start the clock in this capture buffer"))) (if (org-capture-get :immediate-finish) (org-capture-finalize) (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp (quote org-capture-link-is-already-stored)) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (condition-case nil (progn (org-store-link nil)) (error nil (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark) (if (stringp initial) (progn (remove-text-properties 0 (length initial) (quote (read-only t)) initial))) (if (stringp annotation) (progn (remove-text-properties 0 (length annotation) (quote (read-only t)) annotation))) (cond ((equal entry "C") (customize-variable (quote org-capture-templates))) ((equal entry "q") (error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep (quote dired)) (car (rassq orig-buf dired-buffers :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location)
[O] [Bug] org-store-link produces different results if called from keyboard macro
In the following post, http://stackoverflow.com/questions/27872038/emacs-keyboard-macro-fails-to-invoke-org-mode-capture-template, artscan showed that org capture templates don't work in org v.8.2.10 when invoked from within a keyboard macro. I reproduce his results here. The following function (defun test-inside-kbd-macro () (interactive) (print (ignore-errors (org-store-link nil gives different results depending on how it was executed. (1) M-x test-inside-kbd-macro gives "[[file:~/git/org/refile.org::*kbd%20capture][kbd capture]]" (string), but (2)(execute-kbd-macro (read-kbd-macro "M-x test-inside-kbd-macro RET")) gives ("file:~/git/org/refile.org::*kbd capture" "kbd capture") (list). Consider the last 10 lines of function org-store-link. Note that in Case (1) the value of the function test-inside-kbd-macro is created using (org-make-link-string link desc) but in Case (2) it is created by (car org-stored-links) Hence the differing results. Consequently, the following keyboard test macro, (in which C-c c is bound to M-x org-capture) (fset 'jj [?\C-c ?c ?t ?j ?j return ?\C-c ?\C-c]) which invokes this capture template definition (setq org-capture-templates '(("t" "Todo" entry (file "~/org/j.org" produces the following error message: After 0 kbd macro iterations: byte-code: Capture abort: (wrong-type-argument stringp (file:~/org/todo.org::*Tasks Tasks)) I consider this a bug because such macros which invoked the capture template did work in org v7.8.02. The org-mode configuration and backtrace for these bugs are available in the preceding stackoverflow post and also in this previous post:http://thread.gmane.org/gmane.emacs.orgmode/93890
[O] Feature Request: LaTeX export table/figure notes in float environment
Hi list, I am amazed by org-mode and baffled that I didn't find it earlier. It revolutionized my workflow which is usually quickly writing reports and exporting them to PDF via LaTeX. There is one feature that I really miss. Something to put notes below a table within the LaTeX float environment. Something that the LaTeX output looks similar to this: \begin{table}[htb] \caption \begin{tabular} \end{tabular} \label{...} Notes: some text \end{table} I am currently using a workaround by setting the option org-latex-table-caption-above to nil and putting the caption below together with the text for the notes. But in a standard document I'd prefer the caption above. Maybe it would be possible to create an option #+FLOAT_NOTES similar to #+CAPTION for capturing and placing notes. Thanks for your hard work. Best regards, Felix
[O] Feature Request: LaTeX export table/figure notes in float environment
Hi list, I am amazed by org-mode and baffled that I didn't find it earlier. It revolutionized my workflow which is usually quickly writing reports and exporting them to PDF via LaTeX. There is one feature that I really miss. Something to put notes below a table within the LaTeX float environment. Something that the LaTeX output looks similar to this: \begin{table}[htb] \caption \begin{tabular} \end{tabular} \label{...} Notes: some text \end{table} I am currently using a workaround by setting the option org-latex-table-caption-above to nil and putting the caption below together with the text for the notes. But in a standard document I'd prefer the caption above. Maybe it would be possible to create an option #+FLOAT_NOTES similar to #+CAPTION for capturing and placing notes. Thanks for your hard work. Best regards, Felix
Re: babel output seems to drop anything before % (in session)
Today I stumbed upon the same bug. Sadly I have no idea how to fix it, but thought it would be nice to post about it here so the bug doesn't get lost in the sands of time. Felix Freeman
Re: babel output seems to drop anything before % (in session)
I've been able to bypass the error by adding the following to my .emacs (require 'ob-shell) (defun org-babel-sh-strip-weird-long-prompt (string) "Remove prompt cruft from a string of shell output." (while (string-match shell-prompt-pattern string) (setq string (substring string (match-end 0 string) (setq shell-prompt-pattern "^sh-[[:digit:]].[[:digit:]]\$ ") Of course, this is is just a dirty hack not suitable for a release. It seems logical that `org-babel-sh-strip-weird-long-prompt` on `ob-shell.el` respects `shell-prompt-pattern` from `shell.el`. It's not like this on the released source code. But to be honest still the idea ripping a dynamic string from the shell output seems pretty hackish to me. I'm not really aware of the internals of `comint.el`, but I think that instead it should set the shell $PS1 to an empty value and read the thing afterwards, or - if this changes things too much - at least set $PS1 to a very unique and distinctive value in order to avoid these kind of bugs. Felix Freeman
Re: babel output seems to drop anything before % (in session)
> (setq shell-prompt-pattern "^sh-[[:digit:]].[[:digit:]]\$ ") Updated this bit for something better written for emacs and suitable for my use cases: bash and SSH over TRAMP. I'll leave it here in case anyone else needs it in the future: (setq shell-prompt-pattern "^\\(sh-[[:digit:]]\\.[[:digit:]]\\|/ssh:[^:]+:[^$]+\\)$ ") Notice it requires the patch to org-babel-sh-strip-weird-long-prompt posted earlier. I hope I got it right this time ^_^' Felix Freeman
[BUG] ob-shell: cmdline and stdin broken when used with TRAMP
When using TRAMP, ob-shell's :cmdline and :stdin header options are broken on org-babel. I've noticed that when those options are present, it takes other route on ob-shell.el, but I lack the proper background to fix or debug it further. Probably cmdline is more complicated to get working right, but stdin seems to do most things just fine (it creates the file within the remote part) but isn't able to read it when needed. I'm attaching: - A file to test the functionality: test-tramp.org - The backtrace: backtrace.el - Emacs generated "current state": current-state.el Emacs : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-27 Package: Org mode version 9.5.4 (release_9.5.4-521-g1105da.dirty @ /home/me/src/org-mode/lisp/) Felix Freeman #+name: input tramp * Works #+begin_src sh :stdin input read -r who echo "hello $who" #+end_src #+begin_src sh :dir /ssh:user@host: who=tramp echo "hello $who" #+end_src * Fails #+begin_src sh :dir /ssh:user@host: :stdin input read -r who echo "hello $who" #+end_src (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function '(closure (org-id-locations org-agenda-search-view-always-boolean org-agenda-overriding-header t) (entry) (cdr (assq :title entry))) org-persist-after-read-hook '(org-element--cache-persist-after-read) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-file-apps '(("\\.png\\'" . "setsid -w xdg-open %s") (auto-mode . emacs) (directory . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '((closure (org--rds reftex-docstruct-symbol org-element-greater-elements visual-fill-column-width org-clock-history org-agenda-current-date org-with-time org-defdecode org-def org-read-date-inactive org-ans2 org-ans1 org-columns-current-fmt-compiled org-clock-current-task org-clock-effort org-agenda-skip-function org-agenda-skip-comment-trees org-agenda-archives-mode org-end-time-was-given org-time-was-given org-log-note-extra org-log-note-purpose org-log-post-message org-last-inserted-timestamp org-last-changed-timestamp org-entry-property-inherited-from org-blocked-by-checkboxes org-state org-agenda-headline-snapshot-before-repeat org-agenda-buffer-name org-agenda-start-on-weekday org-agenda-buffer-tmp-name org-priority-regexp org-mode-abbrev-table org-mode-syntax-table org-element-use-cache org-element-cache-persistent buffer-face-mode-face org-tbl-menu org-org-menu org-struct-menu org-entities org-last-state org-id-track-globally org-clock-start-time texmathp-why remember-data-file org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist align-mode-rules-list org-emphasis-alist org-emphasis-regexp-components org-export-registered-backends org-modules crm-separator org-babel-load-languages org-id-overriding-file-name org-indent-indentation-per-level org-element--timestamp-regexp org-element-cache-map-continue-from org-element-paragraph-separate org-agenda-buffer-name org-inlinetask-min-level t) nil (add-hook 'change-major-mode-hook 'org-fold-show-all 'append 'local) ) (closure (org-src-window-setup *this* org-babel-confirm-evaluate-answer-no org-babel-tangle-uncomment-comments org-src-preserve-indentation org-src-lang-modes org-edit-src-content-indentation org-babel-library-of-babel t) nil (add-hook 'change-major-mode-hook #'org-babel-show-result-all 'append
Secrets in org-babel
New org user, fascinated by org-babel, but stumbled over something I have no good solution for: I have mostly shell blocks, and very often have to retrieve secrets from aws secretsmanager before I can do anything useful, e.g. query a database in several places. What I've been doing is to put the secret retrieval into a named block and can then inject the secret into other blocks with a parameter that calls that block. But then, the secret value is also echoed to the messages buffer, which I'd like to avoid? I'd also like to avoid repeating the secrets-retrieval code all over the place. Thanks for any tips. Felix -- Linux. The choice of a GNU generation.
Call code block via link?
I have a silenced codeblock, that I postprocess to push the result (a password) onto the kill-ring, and then returns "Password copied" (showing in the status line). This works very nicely. I'm now looking for the cherry on the cake: I'd like to render the #+CALL as a link, e.g. something like, [Copy the secret thing]. Clicking/following the link would execute the call and my password ready to paste elsewhere. Feasible? -- Linux. The choice of a GNU generation.
[BUG] org-paste-subtree inserts empty line above paste
Emacs 28.1 Orgmode 9.5.2 (but discovered already 2020-01-20) When pasting a subtree (of whichever level) with org-paste-subtree at any position (can be an empty line or a line with a header prefix, e.g. "*** "), always an empty line is inserted above the inserted subtree. I would expect no new line to be inserted, and I think this was the behaviour before I noticed this. The value of "org-blank-before-new-entry" is "((heading) (plain-list-item))".
[BUG] org-paste-subtree inserts empty line above paste
Emacs 28.1 Orgmode 9.5.2 (but discovered already 2020-01-20) When pasting a subtree (of whichever level) with org-paste-subtree at any position (can be an empty line or a line with a header prefix, e.g. "*** "), always an empty line is inserted above the inserted subtree. I would expect no new line to be inserted, and I think this was the behaviour before I noticed this. The value of "org-blank-before-new-entry" is "((heading) (plain-list-item))".
Re: [BUG] org-paste-subtree inserts empty line above paste
On 13.09.22 04:39, Ihor Radchenko wrote: Felix Wiemuth writes: Emacs 28.1 Orgmode 9.5.2 (but discovered already 2020-01-20) When pasting a subtree (of whichever level) with org-paste-subtree at any position (can be an empty line or a line with a header prefix, e.g. "*** "), always an empty line is inserted above the inserted subtree. I would expect no new line to be inserted, and I think this was the behaviour before I noticed this. I am unable to reproduce. Could you please detail what exactly you tried step by step? See https://orgmode.org/manual/Feedback.html I'm sorry, assumed it was a general issue. I actually tried it with a fresh emacs and there it does not happen. I tried it with a fresh spacemacs (development branch at commit 201d22b) and there the issue exists. Any idea what the reason could be? Could it be any configuration that leads to this? Or is it probably a bug in spacemacs and I should post the issue there? Thanks!
Concatenating results
I have a list of N source blocks, of which each produces a table, and all these tables have the same column count. What is the easiest way to now make a single table which is the result of calling all these blocks and concatenating the result? Essentially, would be also the same as N CALL together but all append to the same result instead of a result for each CALL. Btw thanks, this Org stuff is all so mind blowing. -- Linux. The choice of a GNU generation.
Re: Concatenating results
On Mon, Oct 3, 2022 at 10:44 AM Ihor Radchenko wrote: > #+name: block1 > #+begin_src emacs-lisp :results table > '((1 2) (3 4)) > #+end_src > > #+name: block2 > #+begin_src emacs-lisp :results table > '((5 6) (7 8)) > #+end_src > > > #+begin_src emacs-lisp > (append > '<> > '<>) > #+end_src > I get an error with this: executing Emacs-Lisp code block... progn: Symbol’s value as variable is void: >>
Re: Concatenating results
On Mon, Oct 3, 2022 at 11:28 AM Ihor Radchenko wrote: > > #+begin_src emacs-lisp :noweb yes > > Thank you Ihor. Felix -- Linux. The choice of a GNU generation.
Re: Call code block via link?
Eric, > > [[elisp:(some elisp sexp)][Click here to do X]] > > Neat! When I open the link I always get a message each time, "Execute ... as elisp?" Is there a way to get rid of that message? -- Linux. The choice of a GNU generation.
Get current table row data as list
When point is in a table, I can run (org-element-at-point) and get a table-row: table-row (:type standard :begin 4932 :end 5151 :contents-begin 4933 :contents-end 5150 :post-blank 0 :post-affiliated 4932 :parent (table (:begin 4546 :end 6818 :type org :tblfm nil :contents-begin 4562 :contents-end 6816 :value nil :post-blank 2 :post-affiliated 4562 :name secrets :parent nil Is there a helper or another way so that I can get the elements of that row as a list or do I have to extract the fields manually by walking over text? Thanks, Felix
Re: Get current table row data as list
Okay I found org-table-get (line column), which is already very helpful. On Wed, Oct 5, 2022 at 6:17 AM Felix Dorner wrote: > When point is in a table, I can run (org-element-at-point) and get a > table-row: > > table-row (:type standard :begin 4932 :end 5151 :contents-begin 4933 > :contents-end 5150 :post-blank 0 :post-affiliated 4932 :parent (table > (:begin 4546 :end 6818 :type org :tblfm nil :contents-begin 4562 > :contents-end 6816 :value nil :post-blank 2 :post-affiliated 4562 :name > secrets :parent nil > > Is there a helper or another way so that I can get the elements of that > row as a list or do I have to extract the fields manually by walking over > text? > > Thanks, > Felix > > -- Linux. The choice of a GNU generation.
[BUG] Folding bug using org-info.js with numbered sections [9.6.15 (release_9.6.15 @ /snap/emacs/current/usr/share/emacs/29.3/lisp/org/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See <https://orgmode.org/manual/Feedback.html#Feedback> Your bug report will be posted to the Org mailing list. Emacs : GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2024-05-10 Package: Org mode version 9.6.15 (release_9.6.15 @ /snap/emacs/current/usr/share/emacs/29.3/lisp/org/) Hi everyone, 1 Problem = I want to export an org file to HTML and include the org-info.js for the possibility of folding headings in the outputted HTML file. However, using numbered sections breaks this behavior. This problem has been addressed before but without a solution and without referring to numbered sections (<https://lists.gnu.org/archive/html/emacs-orgmode/2020-04/msg00373.html>). Here is the minimal content of an org-file producing the problem using `emacs -Q'. , | #+TITLE: Without Title there is Another Problem | #+OPTIONS: num:t | #+INFOJS_OPT: view:overview | | * First Headline | | This wants to be folded in HTML but it doesn't work | | * Second Headline | | Same here. ` In the produced HTML file it is possible to fold the table of contents (either by clicking on it or by pressing f). However, it is not possible to fold the section headings. This bug happens with the original org-info.js (<https://orgmode.org/org-info.js>) as well as with the org-info-src.js script (<https://orgmode.org/org-info-src.js>). After some investigation, I found that this problem can be solved by using `#+OPTIONS: num:nil'. Then, the folding works as expected. I pinned down the reason for this to be the id attribute of the div element that encloses the section content. When using unnumbered sections, the id attribute of the content (e.g., id="text-org123") corresponds to the headline's id attribute (e.g., id="org123"). When using numbered sections, the id attribute of the content is different (e.g., id="text-1") and the folding behavior breaks. 2 Proposed Solution === In order to use org-info.js when exporting with numbered sections, I found a working solution with the following patch applied to `ox-html.el': , | diff --git a/lisp/ox-html.el b/lisp/ox-html.el | index 3b3aad748..a4a00b4ab 100644 | --- a/lisp/ox-html.el | +++ b/lisp/ox-html.el | @@ -3643,23 +3643,24 @@ holding contextual information." | (defun org-html-section (section contents info) |"Transcode a SECTION element from Org to HTML. | CONTENTS holds the contents of the section. INFO is a plist | holding contextual information." |(let ((parent (org-element-lineage section 'headline))) | ;; Before first headline: no container, just return CONTENTS. | (if (not parent) contents |;; Get div's class and id references. |(let* ((class-num (+ (org-export-get-relative-level parent info) |(1- (plist-get info :html-toplevel-hlevel | (section-number | - (and (org-export-numbered-headline-p parent info) | + (and (not (plist-get info :html-use-infojs)) | + (org-export-numbered-headline-p parent info) |(mapconcat | #'number-to-string | (org-export-get-headline-number parent info) "-" | ;; Build return value. | (format "\n%s\n" | class-num | (or (org-element-property :CUSTOM_ID parent) | section-number | (org-export-get-reference parent info)) | (or contents "")) ` This function creates the div element for the section's content. When sections are numbered, a different id attribute is used since the variable `section-number' is not nil. This patch checks whether org-info.js is used by checking `:html-use-infojs'. If it is used, the section variable will be nil and the id attribute is set as if the sections are unnumbered. Consequently, the org-info.js folding behavior works as expected. This is a proposed solution since I do not know whether this conflicts with some other settings. After all, why is the id attribute different when numbered sections are used? All the best, /Felix Esser/
[BUG] clocktable match doesn't seem to support matching items based on parent property [9.6.15 (release_9.6.15 @ /snap/emacs/current/usr/share/emacs/29.3/lisp/org/)]
I want to create a clocktable report for all items under a specific heading, using the match keyword and the ITEM property. It appears that matching items this way won't include any subheadings, therefore not showing their times in the clocktable. My guess would be that agenda and clocktable share the same matching logic, and matching subheadings by the property of their parent does probably not make sense for the agenda. I'd argue that for clocktables, it would. Example: * Level 1 :level_1: ** Level 2 :PROPERTIES: :LEVEL: 1 :END: *** Level 3 :LOGBOOK: CLOCK: [2024-05-07 Tue 11:00]--[2024-05-07 Tue 12:00] => 1:00 :END: * Report matching the ITEM property doesn't work #+BEGIN: clocktable :scope file :match "ITEM=\"Level 1\"" #+CAPTION: Clock summary at [2024-05-07 Tue 13:00] | Headline | Time | |--+| | *Total time* | *0:00* | #+END: * Report matching an arbitrary property doesn't work #+BEGIN: clocktable :scope file :match "LEVEL=\"1\"" #+CAPTION: Clock summary at [2024-05-07 Tue 13:00] | Headline | Time | |--+| | *Total time* | *0:00* | #+END: Note that this _does_ work if ~org-use-property-inheritance~ is not ~nil~. * Report matching a tag works #+BEGIN: clocktable :scope file :maxlevel 2 :match "level_1" #+CAPTION: Clock summary at [2024-05-07 Tue 13:00] | Headline | Time | | |--++--| | *Total time* | *1:00* | | |--++--| | Level 1 | 1:00 | | | \_ Level 2 || 1:00 | #+END: Workaround: As shown above, using either a tag or a custom property on the top-level heading I want to generate the clocktable for works. For the custom property to work, org-use-property-inheritance needs to be non-nil. Emacs : GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2024-03-25 Package: Org mode version 9.6.15 (release_9.6.15 @ /snap/emacs/current/usr/share/emacs/29.3/lisp/org/)
Recursive publish bug?
I’m using version 9.4.6. See below what happens when I `org-publish` to a remote server. The subdirectory structure is not properly mapped. Is this a bug? On my system: project .dir-locals.el index.org images a.jpg subdir index.org images b.jpg Result on the server: project index.html images a.jpg b.jpg subdir index.html Contents of `.dir-locals` (manually anonymized): ((org-mode . ((org-publish-project-alist . (("pages" :html-doctype "html5" :html-html5-fancy t :html-head-include-scripts nil :html-head-include-default-style nil :base-directory "/my/local/computer/project" :base-extension "org" :recursive t :publishing-directory "/plink:u...@my-server.example.com:/remote/project/" :publishing-function org-html-publish-to-html) ("static" :base-directory "." :base-extension "css\\|txt\\|jpg\\|gif\\|png" :recursive t :publishing-directory "/plink:u...@my-server.example.com:/remote/project/" :exclude "/hires" :publishing-function org-publish-attachment) ("all" :components ("pages" "static")))
Re: Recursive publish bug?
After a recent system update, I cannot replicate the issue anymore. 😃
Re: Recursive publish bug?
"Felix E. Klee" writes: > ("static" > :base-directory "." ^ This! no bug