From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: Run shell command from latex? Date: Thu, 10 Apr 2008 08:48:11 +0200 Organization: disorganized Message-ID: <87ve2q2ok4.fsf@localhorst.mine.nu> References: <47fd14c5$0$90263$14726298@news.sunsite.dk> <47fd2948$0$90264$14726298@news.sunsite.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207810443 1748 80.91.229.12 (10 Apr 2008 06:54:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Apr 2008 06:54: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 Thu Apr 10 08:54:36 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 1Jjqfy-0003o0-5y for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Apr 2008 08:54:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjqfK-0001Va-6p for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Apr 2008 02:53:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jjqf3-0001VI-Jc for help-gnu-emacs@gnu.org; Thu, 10 Apr 2008 02:53:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jjqf2-0001UZ-7z for help-gnu-emacs@gnu.org; Thu, 10 Apr 2008 02:53:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jjqf2-0001UW-3c for help-gnu-emacs@gnu.org; Thu, 10 Apr 2008 02:53:28 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jjqf1-00055r-KW for help-gnu-emacs@gnu.org; Thu, 10 Apr 2008 02:53:27 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jjqf0-00046w-Pt for help-gnu-emacs@gnu.org; Thu, 10 Apr 2008 02:53:27 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jjqet-0006RD-H6 for help-gnu-emacs@gnu.org; Thu, 10 Apr 2008 06:53:19 +0000 Original-Received: from e178031073.adsl.alicedsl.de ([85.178.31.73]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Apr 2008 06:53:19 +0000 Original-Received: from david.hansen by e178031073.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Apr 2008 06:53:19 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178031073.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:SvUh3At9HroIkoMNexBjy8cai2Y= X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:53218 Archived-At: On Wed, 09 Apr 2008 22:39:03 +0200 saneman wrote: > I know but I don't want to type 'make' each time. Instead I would like > to define a short key in my .emacs file that executes the script. > > Something like: > > (global-set-key "\C-r" 'myscript) (defun do-myscript () (interactive) (shell-command "myscript")) (global-set-key (kbd "C-r") #'do-myscript) Anyway, compile mode is far more convenient if it understands your error messages. You could e.g. (global-set-key (kbd "C-c c") #'compile) if you don't like to type M-x compile every time. But in case of latex files it's probably a better idea to look how to manipulate the external programs used by auctex (don't know if compile-mode understands latexs error messages). David