From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) Newsgroups: gmane.emacs.devel Subject: Re: Let's make C-M-w in isearch yank symbol, not delete character Date: Sun, 25 Feb 2018 22:12:23 +0100 Organization: The Church of Emacs Message-ID: <871sh893k8.fsf@duenenhof-wilhelm.de> References: <87po4slrg4.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1519593041 1760 195.159.176.226 (25 Feb 2018 21:10:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Feb 2018 21:10:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 25 22:10:36 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eq3Z6-0008IQ-Co for ged-emacs-devel@m.gmane.org; Sun, 25 Feb 2018 22:10:36 +0100 Original-Received: from localhost ([::1]:55885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eq3b6-00060U-Uo for ged-emacs-devel@m.gmane.org; Sun, 25 Feb 2018 16:12:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eq3b1-00060H-5r for emacs-devel@gnu.org; Sun, 25 Feb 2018 16:12:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eq3ax-00057G-5B for emacs-devel@gnu.org; Sun, 25 Feb 2018 16:12:35 -0500 Original-Received: from [195.159.176.226] (port=53427 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eq3aw-00056w-U0 for emacs-devel@gnu.org; Sun, 25 Feb 2018 16:12:31 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eq3Ys-0007Gp-FH for emacs-devel@gnu.org; Sun, 25 Feb 2018 22:10:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:fTKb8u01xV+CC01R/UfFvUkFcTY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223030 Archived-At: Juri Linkov writes: >> Right now, C-w in search-mode yanks a word from the buffer and globs it >> onto the end of the search result. I usually want to search for symbols, >> not words, so I end up pressing C-w multiple times. C-M-w would be the >> natural keybinding for yanking a symbol instead of a word, but it's already >> taken by isearch-del-char. How about moving isearch-del-char somewhere >> else, like C-d, and making C-M-w yank a whole symbol? > > But isn't the prefix 'C-M-' usually reserved for keys that operate on > whole expressions, not just symbols? > > Fortunately, it's easy to add support for yanking an expression: > in addition to the existing option 'edit' of 'search-exit-option' > we can also provide a new option 'move' that will sync the current > search string with the new position in the buffer after moving point > using all standard motion commands, e.g. `C-f' will add the next char > to the end of the search string, `C-M-f' will add the next expression, > `M-f' will add the next word, `C-b' will delete text from the end of > the search string, etc. Here is the implementation: +1 thanks -- Best wishes H. Dieter Wilhelm Kelkheim, Germany