From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Juri Linkov <juri@jurta.org>,
Deniz Dogan <deniz.a.m.dogan@gmail.com>,
Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: [PATCH] (Or "question"...) isearch-kill-found
Date: Mon, 31 May 2010 11:54:38 -0400 [thread overview]
Message-ID: <jwveigsytcs.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87vda45euq.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 31 May 2010 10:24:13 -0400")
>> A command to delete the current match without exiting isearch
>> would be more useful. It will allow to continue searching for the
>> next matches and delete them too:
>> (define-key isearch-mode-map [delete] 'isearch-delete-current-match)
>> (defun isearch-delete-current-match ()
>> "Kills the region that isearch has found."
>> (interactive)
>> (kill-region isearch-other-end (point)))
> I think this is a good idea, since [delete] isn't currently used. Maybe
> add C-d also.
Every new key we use tends to collide with its current use of "exit
isearch and run the command globally bound to that key". I.e. people
who currently expect C-d/delete to exit isearch and delete the next char
will be badly surprised.
Now, I haven't heard a proposal yet that doesn't suffer from this kind
of problem, but I think that using a new key should only be done if
there's a good chance that it's very rarely used (C-d might not be very
frequently used to exit isearch, but there's no reason to think it's
rarely used either) *and* if the new functionality is
sufficiently important. In my experience deleting the matched text is
not that frequent a need. Yes, I also do it every once in a while, but
I also often want to delete something slightly different. Or I want to
do something else with it.
So I'd much rather see an "exit and set the mark at isearch-other-end"
command, after which you can do C-w if you want to delete that text (I
could also imagine a "set the mark isearch-other-end but don't exit",
but then deleting the text would require RET C-w instead).
Richard thinks that C-SPC C-r C-r works as well, but for regexp-patterns
it won't always match the same text, and I must say that C-SPC C-r C-r
RET C-w is pretty long winded. Still, if we want a new
isearch-set-mark-and-exit, we'll need to find a good keybinding for it.
I'm not sure C-SPC is a good choice (OT1H it's pretty common to use
C-SPC to exit isearch, so many uses will be affected, OTOH it will
behave in a similar way, just pushing the mark at the other end of the
search). Of course, we could provide the command without binding it,
like we've done with isearch-toggle-case-fold, isearch-toggle-regexp and
a few others.
Stefan
next prev parent reply other threads:[~2010-05-31 15:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-30 12:37 [PATCH] (Or "question"...) isearch-kill-found Deniz Dogan
2010-05-30 14:05 ` Johan Bockgård
2010-05-30 14:11 ` Deniz Dogan
2010-05-30 15:25 ` Drew Adams
2010-05-30 22:19 ` Christoph
2010-05-30 22:40 ` Lennart Borgman
2010-05-31 0:28 ` Drew Adams
2010-05-31 3:30 ` Michael Welsh Duggan
2010-05-31 15:32 ` Lennart Borgman
2010-05-31 0:48 ` Drew Adams
2010-05-30 18:36 ` Juri Linkov
2010-05-31 14:24 ` Chong Yidong
2010-05-31 15:38 ` Lennart Borgman
2010-05-31 15:54 ` Stefan Monnier [this message]
2010-05-31 16:50 ` Lennart Borgman
2010-05-31 19:14 ` Drew Adams
2010-05-31 19:50 ` Stefan Monnier
2010-05-31 20:04 ` Drew Adams
2010-06-01 3:10 ` Stefan Monnier
2010-06-01 4:43 ` Drew Adams
2010-06-01 12:56 ` Stefan Monnier
2010-06-01 13:55 ` Lennart Borgman
2010-06-01 19:03 ` Stefan Monnier
2010-06-01 19:15 ` Lennart Borgman
2010-06-01 21:03 ` Richard Stallman
2010-05-31 20:14 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwveigsytcs.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=cyd@stupidchicken.com \
--cc=deniz.a.m.dogan@gmail.com \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.