bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5969: 23.1; tex-bibtex-file incorrect dir issue


From: Barak A. Pearlmutter
Subject: bug#5969: 23.1; tex-bibtex-file incorrect dir issue
Date: Sun, 18 Apr 2010 15:18:12 +0100

When visiting a LaTeX file foo.tex not in one's home directory,
tex-file (C-c C-f) works fine, but tex-bibtex-file (C-c TAB) switches
to the home directory before running bibtex, causing a fatal bibtex
error.

This is because the Emacs 21 line

        (file-dir (file-name-directory (buffer-file-name)))

was changed in Emacs 23 to

        (source-file (tex-main-file))
        (file-dir (file-name-directory source-file))

and (tex-main-file) is documented to: "return the relative name of the
main file."  So a simple fix would be

        (file-dir (file-name-directory (expand-file-name source-file)))

Cheers,
--
Barak A. Pearlmutter <address@hidden>
 Hamilton Institute & Dept Comp Sci, NUI Maynooth, Co. Kildare, Ireland
 http://www.bcl.hamilton.ie/~barak/

----------------------------------------------------------------

In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.12.12)
 of 2009-10-19 on debian-build.int-office-er.priv, modified by Debian
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' 
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' 
'--localstatedir=/var/lib' '--infodir=/usr/share/info' 
'--mandir=/usr/share/man' '--with-pop=yes' 
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim'
 '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g 
-O2' 'LDFLAGS=-g' 'CPPFLAGS=''







reply via email to

[Prev in Thread] Current Thread [Next in Thread]