emacs-devel
[Top][All Lists]
Advanced

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

Re: A smarter command history


From: Tom
Subject: Re: A smarter command history
Date: Sun, 26 Jan 2014 19:13:02 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Drew Adams <drew.adams <at> oracle.com> writes:

> 
> Sounds like a reason _not_ to implement what you asked for:
> YAGNI, if you typically run the same grep query in the same dir.
> 

Yes, in the same directory where I ran that grep was previously.
I do a grep, check something, then do other things, then later
I want to check that grep result again (when the grep buffer
may already be gone and I'm in a different directory).

> Your reason for the request was that it is a nuisance to change
> directory:


Yes, because it's two operations then:

First, I change to that directory (usually by visiting a file
in that directory or visiting the directory). Then I retrieve
the previous grep command with C-x ESC ESC.

My point is that the directory where grep was run belongs
to the context of that operation (grep implicitly uses the
default directory when run), so if we store this operation
in the history then that important context info should be
stored as well.

This way rerunning the previous grep is simply a matter of
C-x ESC ESC. There is no need to visit a file in that 
directory first. So it's one operation instead of two.

And if I want to run that specific grep in an other directory
(not usual) then it's easy to delete the 
(let ((default-directory ...  part from the history item.




reply via email to

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