help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: repeat the last single shell command


From: Barry Margolin
Subject: Re: repeat the last single shell command
Date: Thu, 18 Jul 2013 15:07:43 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.1343.1374163702.12400.help-gnu-emacs@gnu.org>,
 Yuri Khan <yuri.v.khan@gmail.com> wrote:

> On Thu, Jul 18, 2013 at 9:18 PM, Tassilo Horn <tsdh@gnu.org> 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 ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]