[Top][All Lists]

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

Re: Changing default dvi viewer.

From: David
Subject: Re: Changing default dvi viewer.
Date: Fri, 8 Feb 2008 14:39:26 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

> Again, think of using a customised texdoc as viewer not only for TeX  
> documents, but also TXT, PS, PDF, DVI ??? *one* tool name instead of  
> four. And once your taste changes, you won't need to customise AUCTeX  
> again!

OK, so finally I get it!! I have added these lines to my .bashrc

## Set defaults for texdoc
export TEXDOCVIEW_html="mozilla %s"
export TEXDOCVIEW_pdf="xpdf %s"
export TEXDOCVIEW_ps="gv %s"
export TEXDOCVIEW_dvi="kdvi %s"
export TEXDOCVIEW_txt="emacs %s"

## Create alias for texdoc. I wanted "view" as my alias name, but that
## alrady existed. So I thought about "vyew" instead. This made me
## think "vitual sheep". So the alias name is now "vs".
alias vs='texdoc -v'

Now at the shell prompt I can just type

funkyPrompt$ vs someFileName.dvi &


funkyPrompt$ vs &


funkyPrompt$ vs someFileName.pdf &

and the right program is chosen for the job. Pretty cool. There are a
few points I still need to straighten out.

1) C-c C-c doesn't refer to texdoc. I'll have to find how to redirect
it. No no no, I got it!!! I just need to edit the entries in "tex
output view style" from the customise autex library (and hit the
"state" button). Horrah! Ah now the funny thing is I changed one of
the lines in the raised button customisation buffer to "%(o?)texdoc
%dS %d ## %(o?)xdvi %dS %d" but the environmental variable
TEXDOCVIEW_dvi as specified in .bashrc is not being used and a default
xdvi has been used instead. Doooh! Of course .bashrc has no effect on
emacs behaviour, I should think about .emacs instead right. Now with
(setenv "TEXDOCVIEW_dvi" "kdvi %s") added to .emacs C-c C-c is calling
texdoc which redirects it to kdvi!  Wola wola wola!

2) M-x *eshell* doesn't appear to read my .bashrc so the aliases and
environmental variables don't work in that shell. Well of course this
is the emacs shell and not a bash shell, but I cannot find online how
to set aliases for the eshell.

3) With M-x shell, say I forget the & I cannot use C-z followed by bg
to background the process as I could in M-x term. For a reader this
isn't a big issue, but for other applications it might be. So ...

3a) How do I get something like a terminal's C-z within *shell*?

3b) Is it possible to edit the alias I have in .bashrc such that the &
is added automatically - I tried a few things but nothing I came up
with worked.


reply via email to

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