help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Changing default dvi viewer.


From: Thierry Volpiatto
Subject: Re: Changing default dvi viewer.
Date: Fri, 08 Feb 2008 15:11:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

David <dpleydel@univ-fcomte.fr> writes:

>> 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 &
>
> or 
>
> funkyPrompt$ vs someFileName.ps &
>
> or 
>
> 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.

To add an alias to eshell, you just have to set it in eshell like that:

alias ls 'ls -all'

to unset it:

alias ls

 
>
> 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.
>
> cheers
> Dave
>
>
>
>

-- 
A + Thierry
Pub key: http://pgp.mit.edu




reply via email to

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