From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@jurta.org>
Cc: 14742@debbugs.gnu.org
Subject: bug#14742: 24.3.50; enhancement request: be able to prepend stuff from buffer when search backward
Date: Tue, 2 Jul 2013 22:40:27 -0700 (PDT) [thread overview]
Message-ID: <cf8e54e1-6ff2-460e-bfa0-d8d5465d5b99@default> (raw)
In-Reply-To: <a2624d13-5fa3-4620-bced-f4170dbd2da8@default>
Oops. It just occurred to me what you might be up to, which I did not
understand. I haven't seen your description of what you have in mind.
But if it is what I imagine now, then I think it sounds truly elegant.
Is this the idea: cursor movements would extend isearch by yanking the
text the cursor would move over in the buffer, starting from `point'
(where isearch starts)?
E.g., for forward search C-f, M-f, C-M-f, C-e, etc. would yank the next
char, word, symbol, line etc. to the end of the search string. And for
reverse search C-b, M-b, C-M-b, C-a, etc. would yank the previous (next
going backward) char, word, symbol, line etc. to the beginning of the
search string.
And presumably backward cursor movements when searching forward (e.g.,
C-b, M-b, C-M-b, C-a) would undo, in the sense of removing yanked text
(but only yanked text, presumably) from the end. And forward cursor
movements when searching backward would remove yanked text from the
beginning.
Is that the idea? If so, bravo; I'm a supporter, a priori. And yes,
IMO that would be quite natural.
I imagine it should be optional, though (even if it could perhaps
be/become the default), since some people might object to things like
C-M-f not ending isearch. My guess is that most people would want this
behavior immediately - cursor movement does not currently do anything
except exit isearch (and there are plenty of other ways to do that).
TBD would be what to do with the equivalent of the combination yanks that
exist today, e.g., C-w for word-or-char. Did you have another idea in
that area also, or did you intend to just leave them as is? Perhaps you
were thinking of having things like C-f/right/C-b/left doing what C-w does?
If so, I'm guessing it would be better to just have them yank a char at a
time (easy enough to hold them pressed, or change to M-f/M-b etc.), in
order to keep the parallel with cursor movements.
Do you have this working already? Have you described what you have in
mind somewhere? Did you bring this up in emacs-devel? If not, please
consider it - that is the best place to toss such an idea around.
Another possibility (an extension) just occurred to me: There is only one
starting position: `point' where isearch is started. But it might be
useful to be able to toggle off the yanking, perform some more cursor
movements without yanking to, in effect, move the yanking position in the
buffer, then toggle yanking back on and resume yanking from the new
position.
Even if we made no provision (at least at first) for showing the yank
position in the buffer, I think it would be clear enough, just from the
result of yanking a char, say, (and then unyanking it if it was yanked
just to check where the yank position is). And being able to move the
yank position using cursor movements would also be helpful when
combined with other yanking operations (e.g., combo's like C-w).
Dunno whether I am clear in these last two paragraphs, or whether you
have already considered something like this. Anyway, bravo - great
idea to play with, and likely a real improvement to isearch.
next prev parent reply other threads:[~2013-07-03 5:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 18:17 bug#14742: 24.3.50; enhancement request: be able to prepend stuff from buffer when search backward Drew Adams
2013-06-28 21:43 ` Juri Linkov
2013-06-28 22:00 ` Drew Adams
2013-06-29 21:50 ` Juri Linkov
2013-06-29 23:02 ` Drew Adams
2013-07-02 22:39 ` Juri Linkov
2013-07-02 23:42 ` Drew Adams
2013-07-02 23:53 ` Juri Linkov
2013-07-03 1:07 ` Drew Adams
2013-07-03 5:40 ` Drew Adams [this message]
2013-07-03 22:57 ` Juri Linkov
2013-07-04 0:17 ` Drew Adams
2013-07-04 23:34 ` Juri Linkov
2013-07-05 10:37 ` Stefan Monnier
2013-07-05 22:28 ` Juri Linkov
2013-07-05 22:59 ` Stefan Monnier
2013-07-05 23:17 ` Juri Linkov
2013-07-06 0:40 ` Stefan Monnier
2020-09-18 14:30 ` Lars Ingebrigtsen
2020-09-18 16:11 ` Drew Adams
2020-09-21 19:07 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf8e54e1-6ff2-460e-bfa0-d8d5465d5b99@default \
--to=drew.adams@oracle.com \
--cc=14742@debbugs.gnu.org \
--cc=juri@jurta.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).