all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] (Or "question"...) isearch-kill-found
@ 2010-05-30 12:37 Deniz Dogan
  2010-05-30 14:05 ` Johan Bockgård
  2010-05-30 18:36 ` Juri Linkov
  0 siblings, 2 replies; 26+ messages in thread
From: Deniz Dogan @ 2010-05-30 12:37 UTC (permalink / raw
  To: Emacs-Devel devel

[-- 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.


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-06-01 21:03 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.