[tex-live] Bug#433455: /usr/bin/pdftex: $TEXEDIT default doesn't cope with spaces in filenames

Frank Küster frank at kuesterei.ch
Tue Jul 17 17:00:41 CEST 2007


Hi,

a Debian user has found that the compile-time default for TEXEDIT, the
command used when pressing `e' (for edit) when (pdf)tex presents an
error message in interactive mode, does not work with filenames which
contain spaces.  The fix is easy, `%s' must be enclosed in double
quotes, but where should it be applied?


Johannes Berg <johannes at sipsolutions.net> wrote:

> On Tue, 2007-07-17 at 14:27 +0200, Frank Küster wrote:
>
>> That's correct.  However - I have no idea where the TEXEDIT default is
>> set:
>> 
>> $ grep TEXEDIT src/Packages/texlive-new/texlive-bin-2007/build/source/texk/web2c/pdftexdir/*
>> $ grep TEXEDIT src/Packages/texlive-new/texlive-bin-2007/build/source/texk/web2c/*
>> $ grep TEXEDIT /etc/texmf/texmf.d/*
>> $ 
>
> Heh. Good question, the book where I found this was in "TeX for the
> impatient" and it says it's set during compilation, but no more.

Hm, it's at least mentioned in texk/web2c/libs/texmfmp.c, but I can't
find where it's set.  Can anyone help me?

Of course it works to set it in texmf.cnf, the following patch should
do.  It's against Debian's /etc/texmf/texmf.d/95NonPath.cnf, so for
texmf.cnf in TL the line numbers will be far off:

--- /etc/texmf/texmf.d/95NonPath.cnf	2007-07-17 16:53:06.000000000 +0200
+++ /home/frank/src/Packages/tex-common/trunk/conf/texmf.d/95NonPath.cnf	2007-04-23 14:39:17.000000000 +0200
@@ -79,13 +79,6 @@
 % expecting DVI, and not "tex" because we want first line parsing.
 TEX = etex
 
-% TEXEDIT: editor command, used when TeX presents an error in
-% interactive mode, and the user presses `e' to start editing.
-%
-% The string %d is expanded to the line number of the error
-% The string %s is expanded to the filename
-TEXEDIT = vi +%d "%s"
-
 
 % 
    Part 3: Array and other sizes for TeX (and Metafont and MetaPost).
 % 


By the way, does variable expansion work in this case?  In other words,
would

TEXEDIT = ${EDITOR:-vi} +%d "%s"

work and respect the EDITOR environment variable?

Regards, Frank


-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)


More information about the tex-live mailing list