From: Adam Jackson <a.j.jackson@physics.org>
To: emacs-orgmode@gnu.org
Subject: Bug: reftex breaking after org-mode export [8.2.10 (8.2.10-35-g19a7d6-elpa @ /Users/adamjackson/.emacs.d/elpa/org-20150323/)]
Date: Mon, 23 Mar 2015 11:58:21 +0000 [thread overview]
Message-ID: <1EAD2758-E620-4D07-9622-16E636B2EBE0@physics.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 8251 bytes --]
Hi,
I've been struggling with Reftex in org-mode. Initially things are fine,
then after exporting the document to LaTeX and continuing to work with
org-mode, using most of the reftex features (e.g. reftex-toc or trying to
insert a reference) produces a "Wrong type argument: stringp, nil" error
message.
The code in my init file to set up reftex:
;; Reftex
(require 'reftex)
(defun org-mode-reftex-setup ()
(load-library "reftex")
(and (buffer-file-name) (file-exists-p (buffer-file-name))
;enable auto-revert-mode to update reftex when bibtex file changes on disk
(global-auto-revert-mode t)
(reftex-parse-all)
(define-key org-mode-map (kbd "C-c [") 'reftex-citation)
;add a custom reftex cite format to insert links
;; (reftex-set-cite-format "** [[papers:%l][%l]]: %t \n")
)
)
(add-hook 'org-mode-hook 'org-mode-reftex-setup)
At the moment I still enter reftex-mode on demand with "M-x reftex-mode".
Here is the backtrace for the error:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
re-search-forward(nil 10001 t)
tex-main-file()
reftex-TeX-master-file()
reftex-insert-docstruct(#<buffer paper.org> t "e" nil nil t nil nil ("SEC:lagrange_gibbs_proof" "s" "We define the molar Gibbs free energy in a molecular gas mixture as \\begin{align} \\h" "/my/path/to/the/paper.org" nil) "" nil)
byte-code("\306 \x18\307\216\310 \210 \x12\311 \x13\f\203\x1f\0\312r q\210\313
!)!\210\202&\0\312\314!\210\315 \210\x0e@\316=\2040\0\316 \210\317\320p\"\210\321\x16A\322\323\324\325\326\x0eB\327\330\331\332\333\257\v\x16C\334 \335U\203v\0\336\x1eD\337\340!\210\341 \x0eE
\336\x0eF\x0eG\x0eH\x0eI\x0eJ\206k\0\x0eK\x0eL\336&\v\x16K)\202\211\0\x0eJ\203\206\0\342 \x0eJ
#\x16K\202\211\0\321\x16K\321\x16D\x0eK\206\222\0\321\x16K\336\x16J\343\x0eM\x0eN\x0eO\x0eK\344\x0eP&\x06\211\x16Q@\x16R\x0eQA@\x16S\345\x0eQ8\x16T\321\x16K\x0eR\204\304\0\346\347\336\"\210\x0eR\350=\203\321\0\315 \210\202 \x02\x0eR\351=\204\337\0\x0eR\352=\203\365\0\x0eU\203\347\0\352\x16R\315 \210\353 \x0eT\x0eR#\210\202 \x02\x0eR\354=\203\a\x01\315 \210\x0eG?\x16G\202 \x02\x0eR\355=\203\x18\x01\x0eV\x16J\356 \x15\202 \x02\x0eR\357=\2038\x01\315 \210\x0eU\2030\x01\360\x0eU!\x16W\202 \x02\x0eE?\x16E\202 \x02\x0eR\361=\203J\x01\315 \210\x0eF?\x16F\202 \x02\x0eR\362=\203\\\x01\315 \210\x0eH?\x16H\202 \x02\x0eR\363=\203n\x01\315 \210\x0eI?\x16I\202 \x02\x0eR\364=\203\201\x01\x0eX\x16Y\346\347\321\"\210\202 \x02\x0eR\365=\203\264\x01\366\x0eZ\x0e[\"\x16[\367\x0e[\x0eZ8A!\206\236\x01\370\371!\x11\x0e[\x0eZ8@\206\251\x01\372\x16L q\210\373 \210\202 \x02\x0eR;\203\324\x01\374\x0eR\x0e\\J\"\206\310\x01\x0eR
DCC\x16Y\346\347\321\"\210\202 \x02\x0eR\375>\203\x1a\x02\x0e]\203\350\x01\x0e]\237\x16Y\202\371\x01\x0eS\203\366\x01\x0eSCC\x16Y\202\371\x01\336\x16Y\x0eY\203\x0f\x02\x0eR\376\232\203\v\x02\377\x0eYB\x16Y\x0eY\x16X q\210\346\347\321\"\210\202 \x02\370\201^\0!\210*\202\0\0" [wconfig buf reftex-call-back-to-this-buffer reftex-latex-syntax-table reftex-use-multiple-selection-buffers typekey current-window-configuration ((set-window-configuration wconfig)) delete-other-windows syntax-table switch-to-buffer-other-window reftex-make-selection-buffer-name "*RefTeX Select*" reftex-erase-buffer reftex-select-label-mode add-to-list selection-buffers t "---- " mode-line-buffer-identification " " global-mode-string " (" ")" " S<" reftex-refstyle ">" " -%-" buffer-size 0 nil message "Creating Selection Buffer..." reftex-insert-docstruct reftex-get-offset reftex-select-item reftex-show-label-location 2 throw exit 103 114 82 reftex-reparse-document 99 115 reftex-query-label-type 116 prefix-numeric-value 70 ...] 13)
reftex-offer-label-menu("e")
reftex-reference()
call-interactively(reftex-reference nil nil)
Many thanks,
Adam
Emacs : GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2013-03-13 on bob.porkrind.org
Package: Org-mode version 8.2.10 (8.2.10-35-g19a7d6-elpa @ /Users/adamjackson/.emacs.d/elpa/org-20150323/)
current state:
==============
(setq
org-export-backends '(latex md ascii html icalendar beamer)
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-latex-classes '(("beamer" "\\documentclass[presentation]{beamer}" ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
)
org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-html-format-drawer-function '(lambda (name contents) contents)
org-log-done 'time
org-latex-format-inlinetask-function 'ignore
org-confirm-shell-link-function 'yes-or-no-p
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-agenda-custom-commands '(("h" "\"home\": Agenda and unscheduled non-work TODOs"
((agenda "" nil) (tags-todo "-work-SCHEDULED={.+}" nil)) nil nil)
("H" "\"Home\": Non-work unscheduled TODOs" tags "-work-SCHEDULED={.+}" nil)
("w" "Unscheduled :work:" tags "work-SCHEDULED={.+}" nil)
("n" "Agenda and all TODOs" ((agenda "" nil) (alltodo "" nil)) nil))
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-latex-format-drawer-function '(lambda (name contents) contents)
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-agenda-dim-blocked-tasks 'invisible
org-mode-hook '((lambda nil
(org-add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append)
(quote local))
)
(lambda nil
(org-add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append)
(quote local))
)
#[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 org-mode-reftex-setup)
org-ascii-format-drawer-function '(lambda (name contents width) contents)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-directory "~/Dropbox/org"
org-enforce-todo-dependencies t
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-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el"))
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
org-html-format-headline-function 'ignore
org-babel-load-languages '((python . t))
org-html-format-inlinetask-function 'ignore
org-agenda-files '("~/Dropbox/org/todo.org" "~/Dropbox/org/shopping.org")
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
)
[-- Attachment #2: Type: text/html, Size: 15451 bytes --]
next reply other threads:[~2015-03-23 11:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 11:58 Adam Jackson [this message]
2015-03-25 13:29 ` Bug: reftex breaking after org-mode export [8.2.10 (8.2.10-35-g19a7d6-elpa @ /Users/adamjackson/.emacs.d/elpa/org-20150323/)] John Kitchin
2015-03-25 13:58 ` Adam Jackson
2015-03-25 15:38 ` John Kitchin
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=1EAD2758-E620-4D07-9622-16E636B2EBE0@physics.org \
--to=a.j.jackson@physics.org \
--cc=emacs-orgmode@gnu.org \
/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).