[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use region as initial search regexp
From: |
Roland Winkler |
Subject: |
Re: Use region as initial search regexp |
Date: |
Fri, 24 May 2019 10:31:55 -0500 |
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. 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).
Roland
- Use region as initial search regexp, Marco Wahl, 2019/05/23
- Re: Use region as initial search regexp,
Roland Winkler <=
- Re: Use region as initial search regexp, Basil L. Contovounesios, 2019/05/24
- 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