From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: repeat the last single shell command Date: Thu, 18 Jul 2013 15:07:43 -0400 Organization: A noiseless patient Spider Message-ID: References: <87fvvcxcn1.fsf@yahoo.fr> <874nbst2zs.fsf@thinkpad.tsdh.de> <877ggox9e9.fsf@yahoo.fr> <87vc48rlwt.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1374174623 26582 80.91.229.3 (18 Jul 2013 19:10:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Jul 2013 19:10:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 18 21:10:22 2013 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 1Uztai-0007Or-UC for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jul 2013 21:10:17 +0200 Original-Received: from localhost ([::1]:42538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uztai-0000KA-9a for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jul 2013 15:10:16 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="7210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18W3sMVy1EW663x4PajFsUN" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:xmmDD+yWtYUY/OrY4Rg7BkB8SvI= Original-Xref: usenet.stanford.edu gnu.emacs.help:199973 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:92239 Archived-At: In article , Yuri Khan wrote: > On Thu, Jul 18, 2013 at 9:18 PM, Tassilo Horn wrote: > > > That ties it to `shell-command'. You could bind the other version also > > in `minibuffer-local-map', and then `M-: !' would reevaluate the last > > lisp expression, `M-! !' would reexecute the last shell command, `M-x !' > > would execute the last complex command, `C-x C-f !' would find the last > > found file, `C-x b !' would switch to the last switched to buffer, etc. > > That kind of misses the point, which for M-! ! is the fact that it’s > easy to type — because of finger position caching. (I’d maybe even go > as far as making it M-! M-!.) After M-: or M-x, ! is not in the cache. M-! M-! makes quite a bit of sense, and avoids the problem someone else mentioned about making it hard to use ! in a command. I could see generalizing this: M-x M-x should recall the last extended command, M-: M-: should recall the last eval-expression, etc. This assumes you're typing the commands with a real Meta key, since it's easier to keep your finger on it while you repeat the character. If you're using an ESC prefix to emulate Meta, ESC ! ! would be more intuitive, I think. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***