emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org mode and reftex
@ 2007-07-12 14:34 francois
  2007-07-12 19:26 ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: francois @ 2007-07-12 14:34 UTC (permalink / raw)
  To: emacs-orgmode

hello,

I use org 5.02/GNU Emacs 22.0.91.1

I configured reftex to handle my biblio. It inserts a citation in this way
[[bib:myKey]]
where
#+LINK: bib file:~/mydocs/mybib.bib::%s

To customize this citation I have defined in my .emacs
(defun my-org-mode-setup ()
  (load-library "reftex")
  (reftex-parse-all) ; to make reftex aware of the biblio
                     ; # \bibliography{biblio}
   (reftex-set-cite-format
     '((?b . "[[bib::%l]]")
       (?n . "[[note::%l]]")
       (?c . "\\cite{%l}")))
    (define-key org-mode-map "\C-c\C-g" 'reftex-citation)
)

everything works fine.

but when I export my file to any format, some reftex functions appear 
to be triggered and returns me this message:

Loading reftex...done
reftex-TeX-master-file: Need a filename for this buffer,  please save it first

any idea? I do not know if this problem concerns more org than reftex..

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

* Re: org mode and reftex
  2007-07-12 14:34 org mode and reftex francois
@ 2007-07-12 19:26 ` Carsten Dominik
  2007-07-13  7:18   ` francois
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2007-07-12 19:26 UTC (permalink / raw)
  To: francois; +Cc: emacs-orgmode


On Jul 12, 2007, at 16:34, francois wrote:

> hello,
>
> I use org 5.02/GNU Emacs 22.0.91.1
>
> I configured reftex to handle my biblio. It inserts a citation in this 
> way
> [[bib:myKey]]
> where
> #+LINK: bib file:~/mydocs/mybib.bib::%s
>
> To customize this citation I have defined in my .emacs
> (defun my-org-mode-setup ()


Are you adding this function to org-mode-hook?

I guess the problem is this:  When Org-mode exports,
it create a temporary buffer that is also in Org-mode,
but that does not have a file.  The function reftex-parse-all
assumes that a file it associated with it.

You might be able to get away with the following work-around:

Change

>   (reftex-parse-all) ; to make reftex aware of the biblio
>                      ; # \bibliography{biblio}


to this:

    (if (buffer-file-name) (reftex-parse-all))

- Carsten

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

* Re: org mode and reftex
  2007-07-12 19:26 ` Carsten Dominik
@ 2007-07-13  7:18   ` francois
  2007-07-13 10:36     ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: francois @ 2007-07-13  7:18 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <dominik <at> science.uva.nl> writes:

thanks for your prompt reply.
 
> > To customize this citation I have defined in my .emacs
> > (defun my-org-mode-setup ()
> Are you adding this function to org-mode-hook?
yes

> Change
> >   (reftex-parse-all) ; to make reftex aware of the biblio
> >                      ; # \bibliography{biblio}
> to this:
> 
>     (if (buffer-file-name) (reftex-parse-all))

I have just tried, but it didn't change anything. 
The reftex-parse-all seems to be still called.

Hoevewer I would really appreciate to use this feature...

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

* Re: Re: org mode and reftex
  2007-07-13  7:18   ` francois
@ 2007-07-13 10:36     ` Carsten Dominik
  2007-07-13 11:16       ` francois
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2007-07-13 10:36 UTC (permalink / raw)
  To: francois; +Cc: emacs-orgmode


On Jul 13, 2007, at 9:18, francois wrote:

> Carsten Dominik <dominik <at> science.uva.nl> writes:
>
> thanks for your prompt reply.
>
>>> To customize this citation I have defined in my .emacs
>>> (defun my-org-mode-setup ()
>> Are you adding this function to org-mode-hook?
> yes
>
>> Change
>>>   (reftex-parse-all) ; to make reftex aware of the biblio
>>>                      ; # \bibliography{biblio}
>> to this:
>>
>>     (if (buffer-file-name) (reftex-parse-all))
>
> I have just tried, but it didn't change anything.
> The reftex-parse-all seems to be still called.

How about

    (and (buffer-file-name)
         (file-exists-p (buffer-file-name))
         (reftex-parse-all))

?

- Carsten



--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

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

* Re: org mode and reftex
  2007-07-13 10:36     ` Carsten Dominik
@ 2007-07-13 11:16       ` francois
  2007-07-13 11:42         ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: francois @ 2007-07-13 11:16 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <dominik <at> science.uva.nl> writes:


> How about
>     (and (buffer-file-name)
>          (file-exists-p (buffer-file-name))
>          (reftex-parse-all))


hi,

I have still the same error. It seems that the cause is not reftex-parse-all.
Even removed, i am facing with same problem. Here is my minimalist
org-mode-setup hook.

(defun my-org-mode-setup ()
  (load-library "reftex")
  (reftex-set-cite-format
     '((?b . "[[bib::%l]]")
       (?n . "[[note::%l]]")
       (?c . "\\cite{%l}")))
   (define-key org-mode-map "\C-c\C-g" 'reftex-citation)
   (flyspell-mode)
)

did I do something wrong?

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

* Re: Re: org mode and reftex
  2007-07-13 11:16       ` francois
@ 2007-07-13 11:42         ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2007-07-13 11:42 UTC (permalink / raw)
  To: francois; +Cc: emacs-orgmode

Please try to make a backtrace of the bug, check the Org-mode
manual on how to produce one.  Thanks.

- Carsten

On Jul 13, 2007, at 13:16, francois wrote:

> Carsten Dominik <dominik <at> science.uva.nl> writes:
>
>
>> How about
>>     (and (buffer-file-name)
>>          (file-exists-p (buffer-file-name))
>>          (reftex-parse-all))
>
>
> hi,
>
> I have still the same error. It seems that the cause is not 
> reftex-parse-all.
> Even removed, i am facing with same problem. Here is my minimalist
> org-mode-setup hook.
>
> (defun my-org-mode-setup ()
>   (load-library "reftex")
>   (reftex-set-cite-format
>      '((?b . "[[bib::%l]]")
>        (?n . "[[note::%l]]")
>        (?c . "\\cite{%l}")))
>    (define-key org-mode-map "\C-c\C-g" 'reftex-citation)
>    (flyspell-mode)
> )
>
> did I do something wrong?
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

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

end of thread, other threads:[~2007-07-13 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-12 14:34 org mode and reftex francois
2007-07-12 19:26 ` Carsten Dominik
2007-07-13  7:18   ` francois
2007-07-13 10:36     ` Carsten Dominik
2007-07-13 11:16       ` francois
2007-07-13 11:42         ` Carsten Dominik

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