From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Newsgroups: gmane.emacs.help Subject: Re: Changing default dvi viewer. Date: Fri, 8 Feb 2008 14:39:26 +0100 Message-ID: <20080208133925.GA10741@univ-fcomte.fr> References: <20080205170541.675151BC01F@ufc.univ-fcomte.fr> <20080207112820.GA6553@univ-fcomte.fr> <1F9F9377-2D8A-4635-A2DB-3F56871B087A@Web.DE> <20080207153042.GC6571@univ-fcomte.fr> <868AB564-4DEC-4458-B3EB-FEEB6590222F@Web.DE> <20080207162645.GA7411@univ-fcomte.fr> <3E44A43B-0C05-4E52-9439-55E28230FEE0@Web.DE> Reply-To: dpleydel@univ-fcomte.fr NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202478003 24289 80.91.229.12 (8 Feb 2008 13:40:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2008 13:40:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 08 14:40:25 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JNTSp-0006q0-71 for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Feb 2008 14:40:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNTSL-0004v8-SN for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Feb 2008 08:39:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JNTS0-0004tF-Di for help-gnu-emacs@gnu.org; Fri, 08 Feb 2008 08:39:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JNTRw-0004o7-Gv for help-gnu-emacs@gnu.org; Fri, 08 Feb 2008 08:39:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNTRw-0004o0-Df for help-gnu-emacs@gnu.org; Fri, 08 Feb 2008 08:39:28 -0500 Original-Received: from ufc.univ-fcomte.fr ([194.57.91.200]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JNTRv-0006Ta-UJ for help-gnu-emacs@gnu.org; Fri, 08 Feb 2008 08:39:28 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ufc.univ-fcomte.fr (Postfix) with ESMTP id 8A8B29E8B74 for ; Fri, 8 Feb 2008 14:39:25 +0100 (CET) Original-Received: from ufc.univ-fcomte.fr ([127.0.0.1]) by localhost (ufc.univ-fcomte.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00664-05 for ; Fri, 8 Feb 2008 14:39:24 +0100 (CET) Original-Received: from ufc204.univ-fcomte.fr (ufc204.univ-fcomte.fr [194.57.91.204]) by ufc.univ-fcomte.fr (Postfix) with ESMTP id 5AFC89E8A79 for ; Fri, 8 Feb 2008 14:39:24 +0100 (CET) Original-Received: from dell-1 (localhost.localdomain [127.0.0.1]) by ufc204.univ-fcomte.fr (Postfix) with SMTP id 480AA3C28F4 for ; Fri, 8 Feb 2008 14:39:23 +0100 (CET) Original-Received: by dell-1 (sSMTP sendmail emulation); Fri, 08 Feb 2008 14:39:26 +0100 Content-Disposition: inline In-Reply-To: <3E44A43B-0C05-4E52-9439-55E28230FEE0@Web.DE> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: amavisd-new at univ-fcomte.fr X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51325 Archived-At: > 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. 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