From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: cplum987@gmail.com Newsgroups: gmane.emacs.help Subject: Re: editing previous command in the *shell* buffer Date: Wed, 29 Apr 2015 13:14:39 -0700 (PDT) Message-ID: <35be0419-c45d-473f-a4a2-f476c5524aa8@googlegroups.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1430338519 17643 80.91.229.3 (29 Apr 2015 20:15:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Apr 2015 20:15:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 29 22:15:19 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YnYO5-0007NB-TZ for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 22:15:18 +0200 Original-Received: from localhost ([::1]:40900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnYO5-0007RO-8c for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 16:15:17 -0400 X-Received: by 10.182.87.100 with SMTP id w4mr1318099obz.20.1430338479325; Wed, 29 Apr 2015 13:14:39 -0700 (PDT) X-Received: by 10.182.98.227 with SMTP id el3mr10889obb.3.1430338479304; Wed, 29 Apr 2015 13:14:39 -0700 (PDT) Original-Path: usenet.stanford.edu!m20no7239590iga.0!news-out.google.com!n7ni20552igk.0!nntp.google.com!l13no11791739iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=148.87.19.210; posting-account=rIGGBgoAAAAEMg3u-3XZX2iW8W_yvSoQ Original-NNTP-Posting-Host: 148.87.19.210 User-Agent: G2/1.0 Injection-Date: Wed, 29 Apr 2015 20:14:39 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:211796 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104079 Archived-At: On Wednesday, April 29, 2015 at 4:57:34 AM UTC-7, Steve Perry wrote: > > How can I do one or both of the following: > > > > ... > > > > (2) type the first part of the command, and have M-p search for the > > previous occurrence of the command that starts with the same pattern > > I've typed in. This is an xemacs feature I sorely miss. C-s just > > isn't the same. If often finds all sorts of other cruft you have to > > skip over. > > thanks, > > I bind M-p and M-n to comint-previous-matching-input-from-input and > comint-next-matching-input-from-input respectively which I think does > what you want... That's real close, but after typing the first few characters of the command, I then have to select them in order to get the matching to work. Otherwise it just works as M-p does by default.