emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Question about reftex mode in org-mode
@ 2013-04-04 18:21 Robert P. Goldman
  2013-04-05 23:10 ` Bastien
  2013-04-06 21:55 ` Rasmus
  0 siblings, 2 replies; 3+ messages in thread
From: Robert P. Goldman @ 2013-04-04 18:21 UTC (permalink / raw)
  To: Org Mode

Quite some time ago, I incorporated reftex into my use of org mode, per
a suggestion on Worg:

;;;---------------------------------------------------------------------------
;;; Use reftex with org-mode, per Worg
;;;---------------------------------------------------------------------------

(autoload 'turn-on-reftx "reftex"   "Turn on RefTeX mode." t)
(defun org-mode-reftex-setup ()
  (turn-on-reftex))
(add-hook 'org-mode-hook 'org-mode-reftex-setup)

Now I find that this has a bad behavior at least with Aquamacs:  it can
cause attempts to use the menu bar to be interrupted by a cryptic popup
file selector that says "Master file:"

This seems to be reftex trying to set a value for TeX-master.

So maybe reftex is unhappy when it's not invoked inside of AucTeX (where
TeX-master is defined and set).

Anyone else seen this?  Have a solution (e.g., have org files assume
that TeX-master is t)?

Thanks!
r

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

* Re: Question about reftex mode in org-mode
  2013-04-04 18:21 Question about reftex mode in org-mode Robert P. Goldman
@ 2013-04-05 23:10 ` Bastien
  2013-04-06 21:55 ` Rasmus
  1 sibling, 0 replies; 3+ messages in thread
From: Bastien @ 2013-04-05 23:10 UTC (permalink / raw)
  To: Robert P. Goldman; +Cc: Org Mode

Hi Robert,

"Robert P. Goldman" <rpgoldman@sift.info> writes:

> Anyone else seen this?  Have a solution (e.g., have org files assume
> that TeX-master is t)?

Maybe setting TeX-master to t as a local file variable would do?

-- 
 Bastien

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

* Re: Question about reftex mode in org-mode
  2013-04-04 18:21 Question about reftex mode in org-mode Robert P. Goldman
  2013-04-05 23:10 ` Bastien
@ 2013-04-06 21:55 ` Rasmus
  1 sibling, 0 replies; 3+ messages in thread
From: Rasmus @ 2013-04-06 21:55 UTC (permalink / raw)
  To: emacs-orgmode

"Robert P. Goldman" <rpgoldman@sift.info> writes:

> Quite some time ago, I incorporated reftex into my use of org mode, per
> a suggestion on Worg:
>
> ;;;---------------------------------------------------------------------------
> ;;; Use reftex with org-mode, per Worg
> ;;;---------------------------------------------------------------------------
>
> (autoload 'turn-on-reftx "reftex"   "Turn on RefTeX mode." t)
> (defun org-mode-reftex-setup ()
>   (turn-on-reftex))
> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>
> Now I find that this has a bad behavior at least with Aquamacs:  it can
> cause attempts to use the menu bar to be interrupted by a cryptic popup
> file selector that says "Master file:"
>
> This seems to be reftex trying to set a value for TeX-master.
>
> So maybe reftex is unhappy when it's not invoked inside of AucTeX (where
> TeX-master is defined and set).
>
> Anyone else seen this?  Have a solution (e.g., have org files assume
> that TeX-master is t)?


I haven't seen it.  This is my setup: 

#+begin_src emacs-lisp

  (setq reftex-default-bibliography
  (quote ("~/documents/literature/lit.bib")))       

  (defun org-mode-reftex-setup ()
    (load-library "reftex")
    (and (buffer-file-name)
         (file-exists-p (buffer-file-name))
         (reftex-parse-all))
    (make-local-variable 'reftex-cite-format)
    (setq reftex-cite-format 'org)
    (define-key org-mode-map (kbd "C-c )") 'reftex-citation))

  (add-hook 'org-mode-hook 'org-mode-reftex-setup)


  (eval-after-load 'reftex-vars
    '(progn
       (add-to-list 'reftex-cite-format-builtin
                    '(org "Org-mode citation"
                          ((?\C-m . "[[cite:%l]]")
                           (?t . "[[textcite:%l]]")
                           (?p . "[[parencite:%l]]")
                           (?s . "[[citepos:%l]]")
                           (?a . "[[citeauthor:%l]]")
                           (?y . "[[citeyear:%l]]")
                           (?n . "%l")
                           ;; the following depends on org-link-search-must-match-exact-headline
                           (?o . "[[file:~/documents/literature/lit.org::*%t][%2a (%y). %T]]"))))))

#+end_src


-- 
A page of history is worth a volume of logic

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

end of thread, other threads:[~2013-04-06 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 18:21 Question about reftex mode in org-mode Robert P. Goldman
2013-04-05 23:10 ` Bastien
2013-04-06 21:55 ` Rasmus

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