auctex
[Top][All Lists]
Advanced

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

[AUCTeX] Re: Want help in the latest auctex


From: Dr. Sethuraman
Subject: [AUCTeX] Re: Want help in the latest auctex
Date: Wed, 30 Jul 2008 22:45:34 -0400 (Eastern Daylight Time)

I have  always enjoyed emacs with auctex to type my LaTeX files
and process them. However I also create files with names like myfile.dn
to type Sanskrit using the Velthius' preprocessor devnag to type
Sanskrit in LaTeX. Thus

devnag myfile.dn or the command devnag myfile (without the extension)
will create a file called myfile.tex from myfile.dn

Then one can run latex myfile.tex (or latex myfile) to get
myfile.dvi and xdvi myfile.dvi to see a Sanskrit output.

These  can be done inside a terminal outside of emacs. The purpose
of this email is to ask your help to do this inside of emacs
using the command ctrl-c ctrl-c.

My solution to this problem, which was working in an older
version of auctex was as follows:

In my .emacs file, I added a line

(setq auto-mode-alist(append '(("\\.dn$" . LaTeX-mode)) auto-mode-alist))

which makes emacs think that it is in LaTeX-mode when editing
myfile.dn.

I now want the command ctrl-c ctrl-c in emacs to use auctex to
give me the commands

devnag myfile
latex myfile
xdvi myfile

Note that the emacs buffer is holding myfile.ptx and I want these
commands to be without the filename extension. I can get the last
two commands as latex myfile.dn and xdvi myfile.dn using ctrl-c
ctrl-c, which is exactly what I do not want.

How do I change texsite.el in ~/emacs/site-lisp and tex.el in
~/emacs/site-lisp/auctex to accomplish this in the latest
auctex-11.85?

I was able to do just that in earlier versions of auctex with the
help of a friend who is not here anymore.

For this, I inserted lines like

(list "devnag" "devnag %z" 'TeX-run_command nil t)
(list "zlatex" "latex %z" 'TeX-run_command nil t)
(list "zxdvi" "xdvi %z" 'TeX-run_command nil t)

inside (defvar TeX-command-list

in tex.el

and

inserted the line

(list "%z" 'file "" t)

inside

defcustom expand list

in file tex.el

I was told that %z was stripping the filename extension from the
name of the file in the buffer. This was working for me. I do not
know any lisp programming, but some friend helped me to do this a
long time ago. He is not available anymore. I have upgraded to
emacs 22 and auctex 11.85 and now I find that the files
tex-site.el and tex.el are very different from the old versions
and I do not know how to do what I want. Ofcourse, I can type the
commands in a terminal and run devnag. I usually mistype the file
name and get frustrated. It will be nice to do all this inside
emacs with auctex's help.

I also want ctrl-c ctrl-c devnag to ask me whether I want to save
the buffer before running "devnag myfile", just as ctrl-c ctrl-c
latex will ask me if I want to save the buffer before running
"latex myfile". This is my last wish.

Can you give me some advice to real novice like me?


Jayaram Sethuraman





reply via email to

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