emacs-devel
[Top][All Lists]
Advanced

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

RE: make `occur' use word at point as default


From: Drew Adams
Subject: RE: make `occur' use word at point as default
Date: Mon, 29 Aug 2005 12:33:32 -0700

    >     The command `occur' currently uses the last item in the regexp
    >     history as the default value.
    > Please do not change that.  Peopel are accustomed to just typing RET
    > to search for the same thing again.

    That's a good point.
    But the problem remains: too often I have to first mark a word
    or symbol, copy the region, start a command..., paste it, press
    <enter>.  That's three keystrokes too many. How do other people
    accomplish this?
    I think something like isearch's "C-w" and friends extended to other
    commands which read from the minibuffer would be useful.
    Opinions?

FWIW (since you asked), here is my (singleton, heretical) opinion (again):

1. I prefer to access previous values ("search for the same thing again")
via the history list - only. That's not what the default value is for, IMO.
I agree with Emilio that the default value in the `occur' case should
reflect the current word/symbol, not the last-used value. It's not hard to
hit `M-p' to "search again".

2. I prefer to have the default value placed in the minibuffer
automatically, as input - that is, as INIT-VALUE. Yes, that means that I
must empty the minibuffer (one keystroke), if the default value is not
something I want to use. More often than not, however, I do use it, perhaps
modifying it first.

3. I also cycle among the other `completing-read' "default" values, using
the arrow keys, treating them the same way as the default value (possibly
editing, re-completing, etc.). I use a library that lets me cycle, match,
and complete such values either by prefix (normal completion) or by regexp.





reply via email to

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