[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use region as initial search regexp
From: |
Basil L. Contovounesios |
Subject: |
Re: Use region as initial search regexp |
Date: |
Fri, 24 May 2019 18:16:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Roland Winkler <address@hidden> writes:
> On Thu May 23 2019 Marco Wahl wrote:
>> What do you think about using the region as initial value for
>> bbdb-search-read? See the (small amount of) code below.
>
> Minor point: the 2nd arg INITIAL-INPUT of read-string is
> depreciated. New code should use instead DEFAULT-VALUE, see the
> docstring of read-string. (I believe the reason for this policy
> change has been that some people find a non-nil INITIAL-INPUT too
> obtrusive.) However, using the region as DEFAULT-VALUE wouldn't
> allow one to edit this string as an argument for bbdb-search-read.
> So in other code I have copied the value of the region to the input
> history (provided the region is active). Then you can step through
> the input history with C-p and C-n in the usual way.
FWIW, DEFAULT-VALUE is made available for editing via M-n
(next-history-element).
> One can even in the end again remove the region from the input history
> if the user decided to use a modified string or she did something
> completely different (so that the input history is not getting
> populated with anything irrelvant).
Thanks,
--
Basil
- Use region as initial search regexp, Marco Wahl, 2019/05/23
- Re: Use region as initial search regexp, Roland Winkler, 2019/05/24
- Re: Use region as initial search regexp,
Basil L. Contovounesios <=
- Re: Use region as initial search regexp, Roland Winkler, 2019/05/24
- Re: Use region as initial search regexp, Marco Wahl, 2019/05/25
- Re: Use region as initial search regexp, Roland Winkler, 2019/05/26
- Re: Use region as initial search regexp, Roland Winkler, 2019/05/26
- Re: Use region as initial search regexp, Marco Wahl, 2019/05/26
- Re: Use region as initial search regexp, Roland Winkler, 2019/05/26
- Re: Use region as initial search regexp, Marco Wahl, 2019/05/26