auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] [PATCH] Add support for SumatraPDF viewer


From: Fabrice Popineau
Subject: Re: [AUCTeX-devel] [PATCH] Add support for SumatraPDF viewer
Date: Tue, 9 Feb 2016 11:37:34 +0100



2016-02-09 11:00 GMT+01:00 Mosè Giordano <address@hidden>:
Hi Fabrice,

2016-02-09 10:51 GMT+01:00 Fabrice Popineau <address@hidden>:
>
>
> 2016-02-09 10:14 GMT+01:00 Mosè Giordano <address@hidden>:
>>
>> Hi Arash and Rasmus,
>>
>> 2016-02-08 21:37 GMT+01:00 Arash Esbati <address@hidden>:
>> > Hi all,
>> >
>> > following Mosč adding support for Zathura, it occured to me that on
>> > Windows, SumatraPDF is missing.  Please find attached a patch adding
>> > support for this viewer.
>>
>> Patch applied, thanks!
>>
>> Rasmus, regarding the problem with PATH, what prevents you from adding
>> the path of Sumatra to your PATH environment variable?  I don't see
>> how hard-coding a path in `TeX-view-program-list-builtin' would be a
>> better solution.
>>
>
> From experience, under Windows, the vast majority of users don't know how to
> change their PATH.

I see your point, but is it possible or usual to install a program
under a path different from the default one?  Is it different for,
say, 32- or 64-bit programs?

I tend to install stuff like SumatraPDF (Gnuplot, Graphviz, etc) in c:\Local .
It is so much easier not to mess with Windows directories when playing with Emacs.

The thing with SumatraPDF is that there is the portable version and the installable one.
If you use the installer, you will get different locations whether you use the 32bits or the 64bits.
If you use the portable one, you are on your own to change your PATH or whatever you
want to use the viewer.
 

> So either assume the installer did change their PATH for them or let them
> hardcode the SumatraPDF location
> into some emacs configuration file.

We have other default viewers for Windows, none of them has an
hard-coded path, how do they work, if they work at all?

SumatraPDF is the only one I have used. Acrobat is a PIA because it locks the PDF file, so you need to 
kill it before recompiling (but surely you know that).

 
> BTW, I do the later for myself.
> I hate to surcharge my PATH with too many locations. I overwrite my own
> default Windows PATH
> from emacs init.el with the minimum vital locations to run/work with emacs.

I see, but instead of adding directories to PATH you have to manually
specify paths to your programs anyway.  Of course, the problem is not
you, but the way Windows works.

Windows works by expecting to find an icon to click on somewhere on your desktop.
And/or by assuming an installer has done what's right : adding file associations to the registry, 
changing your PATH, etc. so that things work smoothly. And they do.
Chose SumatraPDF as the default viewer for PDF files, and it will fire up anytime you try
to open one such file. Or with the 'start' command from the command line.

The actual problem is that emacs/auctex should ask Windows (look into the registry) where
is the default viewer for pdf files and not assume that this exe is in the PATH. This is not the 
way things run usually under Unix.

Given that emacs is somewhat alien to the Windows world, I think it is simpler not to 
try to integrate them too tightly. Specifying the locations emacs need to access is not much more
complex than writing your usual .bashrc .

I don't say that my options are the only ones or even better than any other.
But I know for a long time into what kind of mess people using Unix stuff under Windows can fall into
only because what is considered simple and normal under Unix is unknown to most Windows users.


Best regards,

Fabrice



 

Bye,
Mosè



--
Fabrice Popineau
-----------------------------
CentraleSupelec
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------


reply via email to

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