From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Reeder Newsgroups: gmane.emacs.help Subject: Re: key binding question Date: Tue, 08 Apr 2003 04:09:44 GMT Organization: AT&T Broadband 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=iso885915 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1049775093 2556 80.91.224.249 (8 Apr 2003 04:11:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2003 04:11:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 08 06:11:31 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 192kSI-0000ex-00 for ; Tue, 08 Apr 2003 06:11:30 +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 192kRT-0004L6-02 for gnu-help-gnu-emacs@m.gmane.org; Tue, 08 Apr 2003 00:10:39 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn14feed!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Pan/0.11.2 (Unix) X-Comment-To: "Jerome Besnard" Original-Lines: 22 Original-NNTP-Posting-Host: 12.211.78.13 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: rwcrnsc52.ops.asp.att.net 1049774984 12.211.78.13 (Tue, 08 Apr 2003 04:09:44 GMT) Original-NNTP-Posting-Date: Tue, 08 Apr 2003 04:09:44 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:111763 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:8264 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8264 On Mon, 07 Apr 2003 03:10:36 -0700, Jerome Besnard wrote: >> 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. I'll try C-up/down and add make the change to my init file later if necessary. It's second nature to hit up or down when I'm using the shell, but adding the C- shouldn't take much getting used to. Thanks. Kevin