unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* [Windows] tex-mode: Emacs+ MiKTeX
@ 2004-10-15 16:07 Paolo Martini
  0 siblings, 0 replies; only message in thread
From: Paolo Martini @ 2004-10-15 16:07 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I found a problem of interoperability between emacs's tex-mode and
MiKTeX's DVI viewer, but i think it's applicable to other applications
called from emacs as well.

1) Set tex-dvi-view-command to "C:\path\to\miktex\bin\yap.exe"
2) Create a .tex file and save it in a path containing spaces (e.g.
C:\Documents and Settings\User\Documents\foobar.tex)
3) C-c C-f (TeX File)
4) C-c C-v (TeX View)

the tex-shell tells that emacs is calling something like:
C:\MiKTeX\Main\miktex\bin\yap.exe c:/Documents and
Settings/Paolo/Documenti/Chimica/esp1.dvi&

that is wrong, it should call yap this way:
C:\MiKTeX\Main\miktex\bin\yap.exe "c:\Documents and
Settings\Paolo\Documenti\Chimica\esp1.dvi"&

I made a simple workaround:

(defun tex-send-command (command &optional file background)
~  "Send COMMAND to TeX shell process, substituting optional FILE for *.
Do this in background if optional BACKGROUND is t.  If COMMAND has no *,
FILE will be appended, preceded by a blank, to COMMAND.  If FILE is nil, no
substitution will be made in COMMAND.  COMMAND can be any expression that
evaluates to a command string.

Return the process in which TeX is running."
~  (when file
~    (setf file (shell-quote-argument  (substitute ?\\ ?/ file))))
~  ..snip..

It's incomplete, but it works on my system, maybe it would be ok to have
an auto-quoting tex-send-command function that understands how to di it
by itself, but i don't know elisp and i cannot do it and propose.

Regards, Paolo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBb/XQhW78UdvgTikRApe8AJwNyDjapcJvo0Y8JXMy2/RYozAUjwCfXTdz
rd9UYoaHGqcm78MpaeHyMrQ=
=qn/e
-----END PGP SIGNATURE-----
--------------------------------------------------------------------
L'utente che ti ha inviato questa email ha a disposizione:

Spazio illimitato, Webmail, accesso Imap, Pop3 e Smtp, 
4 differenti domini email, protezione antispam e filtro mime,
dimensione massima allegati 200mb. 

Tutto totalmente gratuito, la tua email ha queste funzionalità ?
Puoi registrarti all'indirizzo: http://www.nectarine.it

Questo messaggio pubblicitario viene aggiunto in maniera 
automatica, segnalazione abusi: support@nectarine.info
--------------------------------------------------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-15 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15 16:07 [Windows] tex-mode: Emacs+ MiKTeX Paolo Martini

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).