From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
Newsgroups: gmane.emacs.help
Subject: Re: Temporarily Key-binding to A Script
Date: Sat, 24 Oct 2009 08:29:42 -0600
Message-ID: <hbv30l$i0$1@ger.gmane.org>
References: <1256392650.6852.3.camel@beauty11.cs.concordia.ca>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: ger.gmane.org 1256394654 900 80.91.229.12 (24 Oct 2009 14:30:54 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 24 Oct 2009 14:30:54 +0000 (UTC)
To: help-gnu-emacs@gnu.org
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 24 16:30:47 2009
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>
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 1N1hdk-0008Q6-Jn
	for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Oct 2009 16:30:44 +0200
Original-Received: from localhost ([127.0.0.1]:38342 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1N1hdj-0006pn-VU
	for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Oct 2009 10:30:44 -0400
Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N1hdF-0006op-Ns
	for help-gnu-emacs@gnu.org; Sat, 24 Oct 2009 10:30:13 -0400
Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N1hdA-0006kA-R4
	for help-gnu-emacs@gnu.org; Sat, 24 Oct 2009 10:30:12 -0400
Original-Received: from [199.232.76.173] (port=52848 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N1hdA-0006k7-L2
	for help-gnu-emacs@gnu.org; Sat, 24 Oct 2009 10:30:08 -0400
Original-Received: from lo.gmane.org ([80.91.229.12]:48330)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <geh-help-gnu-emacs@m.gmane.org>)
	id 1N1hdA-0006at-7s
	for help-gnu-emacs@gnu.org; Sat, 24 Oct 2009 10:30:08 -0400
Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1N1hd6-00088t-Ni
	for help-gnu-emacs@gnu.org; Sat, 24 Oct 2009 16:30:04 +0200
Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <help-gnu-emacs@gnu.org>; Sat, 24 Oct 2009 16:30:04 +0200
Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with
	local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <help-gnu-emacs@gnu.org>; Sat, 24 Oct 2009 16:30:04 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 12
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
In-Reply-To: <1256392650.6852.3.camel@beauty11.cs.concordia.ca>
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 <help-gnu-emacs.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=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:69207
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/69207>

Wu, Kejia wrote:
> I have a script, foo.py. How should I define temporarily key-binding to
> the script only for current session?

See the "Specifying File Variables" node of the Emacs manual, especially
the `eval' pseudo-variable.

eval: (global-set-key (kbd "C-c z") (lambda () (shell-command "/path/to/foo.py")))

-- 
Kevin Rodgers
Denver, Colorado, USA