From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Roger Levy Newsgroups: gmane.emacs.help Subject: Re: binding emacs key combination to external program? Date: Tue, 11 Sep 2007 10:42:38 -0000 Organization: http://groups.google.com Message-ID: <1189507358.860005.223160@r29g2000hsg.googlegroups.com> References: <1189455656.243011.125810@50g2000hsm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1189510849 338 80.91.229.12 (11 Sep 2007 11:40:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2007 11:40:49 +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 Sep 11 21:40:33 2007 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 1IVBb4-0002eP-T7 for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Sep 2007 21:40:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IV46m-0006cO-GT for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Sep 2007 07:40:44 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!r29g2000hsg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: 137.110.192.8 Original-X-Trace: posting.google.com 1189507359 23854 127.0.0.1 (11 Sep 2007 10:42:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 11 Sep 2007 10:42:39 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: r29g2000hsg.googlegroups.com; posting-host=137.110.192.8; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:151968 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:47478 Archived-At: On Sep 10, 1:59 pm, Joost Kremers wrote: > Roger Levy wrote: > > I use a shell script to compile my LaTeX files from the command line > > and turn them into PDFs in one go-around (using ps2pdf rather than > > pdflatex), and I would like to bind an Emacs key combination to the > > execution of this script on the buffer. How can I do this? I'm > > having a hard time figuring it out from the manual. > > you need to define a lisp function that calls your shell script on the > current buffer, and then bind your desired key combo to this function. > > but more likely you should consider using AUCTeX (google for it). AUCTeX > can be customised to call your script. plus it has a gazillion other > benefits when writing latex documents. Many thanks -- I do use AUCTeX but wasn't aware you can customize it this way. Would the best way to be to edit the TeX-command-list variable? Roger