[OS X TeX] Emacs 22.92, %! and TeXShop

Thomas Kiffe tom at kiffe.com
Fri Jan 26 21:02:39 EST 2007


On Jan 26, 2007, at 5:34 PM, Charilaos Skiadas wrote:

>
> On Jan 26, 2007, at 5:25 PM, Herbert Schulz wrote:
>
>>
>> The PostScript Language Reference Manual (I've got the old 1985  
>> edition) and it says
>>
>> ``The very first line of every PostScript program (whether it is  
>> conforming or nonconforming) should be a comment that begins with  
>> the characters `%!'.''
>>
>> and, in the next paragraph, further says
>>
>> ``If the PostScript program is conforming, the remainder of the  
>> first line (after the `%!') should be a version identifier for the  
>> structuring conventions that the file obeys. ... (i.e., the first  
>> 11 characters of the program ar `%!PS-Adobe-') ...''
>>
>> So everyone is correct. Of course all the logic I've seen  
>> presented is still wrong: just because all PostScript files should  
>> start with `%!' (maybe `%!PS...') doesn't mean that all files that  
>> start with `%!' (or even `%!PS...') must be PostScript files.
>
> In TextMate we check for %!PS, but of course that's neither here  
> nor there in this discussion ;). In any case, TextMate obeys  
> extensions over first line matches, so a file with extension tex is  
> a LaTeX file, end of story.
>
> Isn't there a way to tell emacs to treat all files with extension  
> "tex" as tex files too?
>

The issue here is that TeXshop's use of %! can make some of its  
source files incompatible with at least
emacs. This is not a new issue. Several years back TeXShop used %&,  
which made TeXShop incompatible
with tex itself. Fortunately TeXShop was changed to remove this problem.

The question now is which program should be modified. Emacs has been  
in use a lot longer than TeXshop and
it uses conventions established long ago for recognizing a Postscript  
file. It is TeXShop which insists
on doing things its own way and expecting everyone else to follow its  
conventions. Why can't TeXShop
use something like %x, where x is not ! or &. Surely some other  
letter could be chosen that wouldn't
introduce incompatibilities.

Tom


------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list