From: Deniz Dogan <deniz.a.m.dogan@gmail.com>
To: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: [PATCH] (Or "question"...) isearch-kill-found
Date: Sun, 30 May 2010 14:37:25 +0200 [thread overview]
Message-ID: <AANLkTimZsCvSheXbdTYr-TZdsoSJ1IgH6Y4wBR5L1VOD@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
Recently, in a discussion on #emacs, we looked for a command which
kills the text that has been found using isearch. None of us knew if
there existed anything like that and I coludn't find it.
So attached is a patch which adds isearch-kill-found and binds it to
M-C-m (not too keen on the choice of binding though).
Any thoughts or comments? Does this already exist?
--
Deniz Dogan
[-- Attachment #2: isearch-kill-found.patch --]
[-- Type: application/octet-stream, Size: 780 bytes --]
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2010-05-20 22:33:09 +0000
+++ lisp/isearch.el 2010-05-30 12:27:58 +0000
@@ -462,6 +462,7 @@
(define-key map "\M-\C-w" 'isearch-del-char)
(define-key map "\M-\C-y" 'isearch-yank-char)
(define-key map "\C-y" 'isearch-yank-line)
+ (define-key map "\M-\C-m" 'isearch-kill-found)
(define-key map (char-to-string help-char) isearch-help-map)
(define-key map [help] isearch-help-map)
@@ -1497,6 +1498,12 @@
(interactive)
(isearch-yank-string (x-get-selection)))
+(defun isearch-kill-found ()
+ "Kills the region that isearch has found."
+ (interactive)
+ (isearch-exit)
+ (kill-region isearch-other-end (point)))
+
(defun isearch-mouse-2 (click)
"Handle mouse-2 in Isearch mode.
next reply other threads:[~2010-05-30 12:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-30 12:37 Deniz Dogan [this message]
2010-05-30 14:05 ` [PATCH] (Or "question"...) isearch-kill-found 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
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
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=AANLkTimZsCvSheXbdTYr-TZdsoSJ1IgH6Y4wBR5L1VOD@mail.gmail.com \
--to=deniz.a.m.dogan@gmail.com \
--cc=emacs-devel@gnu.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).