Package: emacs21 Version: 21.4a-1 Severity: minor File: /usr/bin/emacs21-x Tags: patch
I have my dissertation set up as one main latex file in the parent directory with and a bunch of supporting tex files with the actual content for individual chapters in subdirectories (along with supporting figures, etc.). In the supporting files, I want to include a "tex-main-file" variable that points to the main tex file, "../jvr-dissertation.tex". I need to use relative paths, because I want to be able to version control it and work on it on different machines. When I tried to do this, and I ran "tex-file" (ctrl-c, ctrl-f), emacs would open up a "tex-shell" window, change to the parent directory and then try to run "latex \\nonstopmode\\input ../jvr-dissertation.tex". (That is, it used ".." in the filename even though it had already chagned the current directory to "..".) The included patch to /usr/share/emacs/21.4/lisp/textmodes/tex-mode.el fixes this problem by extracting just the file name part of tex-main-file and passing using that on the latex command line. -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing'), (50, 'unstable') Architecture: powerpc (ppc) Kernel: Linux 2.6.12-rc3-pattertwig Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages emacs21 depends on: ii emacs21-bin-common 21.4a-1 The GNU Emacs editor's shared, arc ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libice6 4.3.0.dfsg.1-13 Inter-Client Exchange library ii libjpeg62 6b-10 The Independent JPEG Group's JPEG ii libncurses5 5.4-4 Shared libraries for terminal hand ii libpng12-0 1.2.8rel-1 PNG library - runtime ii libsm6 4.3.0.dfsg.1-13 X Window System Session Management ii libtiff4 3.7.2-3 Tag Image File Format (TIFF) libra ii libungif4g 4.1.3-2 shared library for GIF images (run ii libx11-6 4.3.0.dfsg.1-13 X Window System protocol client li ii libxext6 4.3.0.dfsg.1-13 X Window System miscellaneous exte ii libxmu6 4.3.0.dfsg.1-13 X Window System miscellaneous util ii libxpm4 4.3.0.dfsg.1-13 X pixmap library ii libxt6 4.3.0.dfsg.1-13 X Toolkit Intrinsics ii xaw3dg 1.5+E-8 Xaw3d widget set ii xlibs 4.3.0.dfsg.1-13 X Keyboard Extension (XKB) configu ii zlib1g 1:1.2.2-4 compression library - runtime -- no debconf information
--- tex-mode.el.orig 2005-06-04 19:56:43.000000000 -0700 +++ tex-mode.el 2005-06-04 20:02:42.000000000 -0700 @@ -1662,8 +1662,8 @@ This function is more useful than \\[tex-buffer] when you need the `.aux' file of LaTeX to have the correct name." (interactive) - (let* ((source-file (tex-main-file)) - (file-dir (file-name-directory (expand-file-name source-file)))) + (let* ((source-file (file-name-nondirectory (tex-main-file))) + (file-dir (file-name-directory (expand-file-name (tex-main-file))))) (if tex-offer-save (save-some-buffers)) (if (tex-shell-running)