From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jerome Besnard Newsgroups: gmane.emacs.help Subject: Re: key binding question Date: 07 Apr 2003 12:10:36 +0200 Organization: Service Palace Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <6AOja.383118$sf5.707842@rwcrnsc52.ops.asp.att.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049710569 1037 80.91.224.249 (7 Apr 2003 10:16:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Apr 2003 10:16:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 07 12:16:08 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 192Tfb-0000Ga-00 for ; Mon, 07 Apr 2003 12:16:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192Tf9-00005U-01 for gnu-help-gnu-emacs@m.gmane.org; Mon, 07 Apr 2003 06:15:39 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!host.194.193.23.62.rev.coltfrance.COM!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 15 Original-NNTP-Posting-Host: host.194.193.23.62.rev.coltfrance.com (62.23.193.194) Original-X-Trace: fu-berlin.de 1049710261 8571441 62.23.193.194 (16 [136842]) Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:111736 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8237 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8237 > When using the python interpreter within emacs, I'd like to have the > up/down arrows echo previous commands. Can anyone give me the code for > this? The pyhton shell uses comint-mode (for input-output in shell-like modes). In comint mode, previous commands are echoed via C-up and C-down. But if you really prefer to have these with up/down arrows, you should set comint-previous-command and comint-next-command to up/down. Something (untested) like: (define-key comint-mode-map [up] 'comint-previous-command) (define-key comint-mode-map [down] 'comint-next-command) should do the trick. -- Jerome