From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Changing default dvi viewer. Date: Fri, 08 Feb 2008 15:20:45 +0100 Message-ID: <87k5lfzg02.fsf@thievol.homelinux.org> 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> <20080208133925.GA10741@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 1202479898 31100 80.91.229.12 (8 Feb 2008 14:11:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2008 14:11:38 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: dpleydel@univ-fcomte.fr Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 08 15:12:00 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 1JNTxI-0000o0-G7 for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Feb 2008 15:11:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNTwo-0005Os-Rs for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Feb 2008 09:11:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JNTwZ-0005On-1X for help-gnu-emacs@gnu.org; Fri, 08 Feb 2008 09:11:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JNTwV-0005OX-0O for help-gnu-emacs@gnu.org; Fri, 08 Feb 2008 09:11:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNTwU-0005OU-MY for help-gnu-emacs@gnu.org; Fri, 08 Feb 2008 09:11:02 -0500 Original-Received: from fk-out-0910.google.com ([209.85.128.185]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JNTwU-0005lq-CU for help-gnu-emacs@gnu.org; Fri, 08 Feb 2008 09:11:02 -0500 Original-Received: by fk-out-0910.google.com with SMTP id 26so3566629fkx.10 for ; Fri, 08 Feb 2008 06:11:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=LS+TQU0lW6TtZYKnh98EIfOUx6uLazqaWIrqdSHHKFU=; b=roUJjMUbFZ34oSuHYUAsJ4U9CfG9m8iFuTnyxceeNOUQlE+EzCDBHCb16zNvgxhunhhMIxSFp+nJJFGCSTwa42rka4NyZ1EMAvQC/Evidbwg1Es29MWsnCfcrkI3+4wR0zUthNxc68aOZsJ62qFL4EYWMuq66QoU0B+ONLXiSOI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=MxYPC/Fxue+aqtps0MOHmkuF+h0gYbLKMXt4wbV5KwnOjz/69yAaTADAGKjP8Cfp7kAPg4E/WwgZBbXLLWX6qEo1NewhWWulASIuz15K9413MVA1zivMu1Ui7tBhkiHbwvkNLOom5uAe9cJbrswLFK4AbDOI5p5ThBldN9Lt0zk= Original-Received: by 10.82.161.19 with SMTP id j19mr23085740bue.25.1202479860887; Fri, 08 Feb 2008 06:11:00 -0800 (PST) Original-Received: from thievol.homelinux.org ( [78.114.15.25]) by mx.google.com with ESMTPS id 28sm8007159fkx.11.2008.02.08.06.10.58 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Feb 2008 06:11:00 -0800 (PST) In-Reply-To: <20080208133925.GA10741@univ-fcomte.fr> (David's message of "Fri, 8 Feb 2008 14:39:26 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:51330 Archived-At: David 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. > > > 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. Did you try, instead of creting an alias, writing a function in .bashrc: Some thing like that (not tested, not sure it work) function vs { texdoc -v $PWD/$1 } > cheers > Dave > > > > -- A + Thierry Pub key: http://pgp.mit.edu