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: Tue, 28 Apr 2015 12:23:36 -0700 (PDT) Message-ID: <7b3976ca-751d-46da-bec4-0a8da5bc8f58@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 1430249122 23274 80.91.229.3 (28 Apr 2015 19:25:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2015 19:25:22 +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 Apr 28 21:25:22 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 1YnB8B-0004ru-So for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Apr 2015 21:25:20 +0200 Original-Received: from localhost ([::1]:35582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnB8B-00018r-A6 for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Apr 2015 15:25:19 -0400 X-Received: by 10.52.30.129 with SMTP id s1mr30674895vdh.3.1430249016190; Tue, 28 Apr 2015 12:23:36 -0700 (PDT) X-Received: by 10.182.138.9 with SMTP id qm9mr86066obb.34.1430249016153; Tue, 28 Apr 2015 12:23:36 -0700 (PDT) Original-Path: usenet.stanford.edu!z60no4195997qgd.0!news-out.google.com!n7ni19602igk.0!nntp.google.com!l13no11302975iga.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.218; posting-account=rIGGBgoAAAAEMg3u-3XZX2iW8W_yvSoQ Original-NNTP-Posting-Host: 148.87.19.218 User-Agent: G2/1.0 Injection-Date: Tue, 28 Apr 2015 19:23:36 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:211766 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:104048 Archived-At: On Tuesday, April 28, 2015 at 7:18:52 AM UTC-7, Doug Lewan wrote: > > -----Original Message----- > > On > > Behalf Of cplum987 > > Subject: editing previous command in the *shell* buffer > > > > How can I do one or both of the following: > > > > (1) Find a previous command in the *shell* buffer via search C-s, and > > have pressing enter insert the command as the current command, but > > without execution. This would allow me to edit the command before > > executing it, but not have to modify the command as it previously > > exists in the *shell* buffer. > > I agree. This is a bit of a hole. I copy and paste and edit all the time. > It doesn't seem like it would be too hard to build, > but it's probably too little to bother getting permission from my employer > to give away. :( > > > > > (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. > > This sounds like it would be a good addition. I use M-/ to do such a thing, > but that does get a little tedious. Looks like M-/ iterates through the command history just like M-p, but only includes the root command, not the arguments. > Does the xemacs lisp port to GNU emacs? I have no idea. Beyond my abilities for sure.