From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Maurizio Vitale Newsgroups: gmane.emacs.help Subject: Re: Help: execute scripts form emacs Date: Tue, 13 Oct 2009 16:49:51 -0400 Organization: Polymath Solutions, Inc. Message-ID: <87pr8r9fyo.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me> References: <25853628.post@talk.nabble.com> Reply-To: maurizio.vitale@polymath-solutions.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255467564 19107 80.91.229.12 (13 Oct 2009 20:59:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2009 20:59:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 13 22:59:14 2009 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 1MxoSM-0006xG-Ka for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Oct 2009 22:58:54 +0200 Original-Received: from localhost ([127.0.0.1]:42766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxoSM-0002j7-0d for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Oct 2009 16:58:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxoGi-00012l-4J for help-gnu-emacs@gnu.org; Tue, 13 Oct 2009 16:46:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxoGd-0000wD-82 for help-gnu-emacs@gnu.org; Tue, 13 Oct 2009 16:46:51 -0400 Original-Received: from [199.232.76.173] (port=51976 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxoGd-0000vz-2j for help-gnu-emacs@gnu.org; Tue, 13 Oct 2009 16:46:47 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:38241) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MxoGc-0003gG-DT for help-gnu-emacs@gnu.org; Tue, 13 Oct 2009 16:46:46 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MxoGY-0000hj-86 for help-gnu-emacs@gnu.org; Tue, 13 Oct 2009 22:46:42 +0200 Original-Received: from pool-72-95-245-39.pitbpa.east.verizon.net ([72.95.245.39]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Oct 2009 22:46:42 +0200 Original-Received: from maurizio.vitale by pool-72-95-245-39.pitbpa.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Oct 2009 22:46:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-72-95-245-39.pitbpa.east.verizon.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:lRMlaGbSpAKormdoOuLFPiwPWF8= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:68928 Archived-At: >>>>> "wdysun" == wdysun writes: wdysun> Hello dears, wdysun> suppose I have a script in /bin, let us assume it is called wdysun> mytex. Suppose I am editing a file called filename.tex. wdysun> If I run the following command from the console: wdysun> $ mytex filename wdysun> this will do several things (tex the filename with several wdysun> options, then convert the dvi to pdf and it deletes all aux wdysun> files I don't need). wdysun> There is a way to launch the script from emacs or even to wdysun> build a function so that I can run the command just with M - wdysun> something? You can do two things: - in a buffer local variable set the compile command to mytex filename and then use M-x compile - but if your script is only for running latex as much as needed, then bibtex, then latex again (and maybe switch between the dvi and pdf path), do yourself a favour and use AUCTeX (http://www.gnu.org/software/auctex/). You won't look back. OTH, Maurizio