From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: isearch-allow-move [Was: isearch-allow-prefix] Date: Thu, 6 Jun 2013 20:07:19 +0000 Message-ID: <20130606200719.GA3911@acm.acm> References: <20130524093858.GA2754@acm.acm> <87hahstd47.fsf@mail.jurta.org> <20130525200103.GA3451@acm.acm> <878v32aj3c.fsf@mail.jurta.org> <20130602210512.GC2765@acm.acm> <87sj0xn484.fsf@mail.jurta.org> <20130604212400.GB2492@acm.acm> <87d2s1otjb.fsf@mail.jurta.org> <20130605210241.GA3730@acm.acm> <8761xr93h5.fsf_-_@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1370549271 22800 80.91.229.3 (6 Jun 2013 20:07:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Jun 2013 20:07:51 +0000 (UTC) Cc: Stefan Monnier , Drew Adams , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 06 22:07:51 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UkgTN-0003eE-Ag for ged-emacs-devel@m.gmane.org; Thu, 06 Jun 2013 22:07:49 +0200 Original-Received: from localhost ([::1]:45784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkgTM-0001mb-O2 for ged-emacs-devel@m.gmane.org; Thu, 06 Jun 2013 16:07:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkgTE-0001mJ-PO for emacs-devel@gnu.org; Thu, 06 Jun 2013 16:07:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkgT9-0000nH-B3 for emacs-devel@gnu.org; Thu, 06 Jun 2013 16:07:40 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:32537 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkgT9-0000mw-2G for emacs-devel@gnu.org; Thu, 06 Jun 2013 16:07:35 -0400 Original-Received: (qmail 59280 invoked by uid 3782); 6 Jun 2013 20:07:33 -0000 Original-Received: from acm.muc.de (pD9518017.dip0.t-ipconnect.de [217.81.128.23]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 06 Jun 2013 22:07:30 +0200 Original-Received: (qmail 3965 invoked by uid 1000); 6 Jun 2013 20:07:19 -0000 Content-Disposition: inline In-Reply-To: <8761xr93h5.fsf_-_@mail.jurta.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160176 Archived-At: Hi, Juri. On Thu, Jun 06, 2013 at 09:07:34AM +0300, Juri Linkov wrote: > > OK, I've committed it. > Thank you, Alan. > Let me reuse your excellent design and create a similar option > `isearch-allow-move' that is like `isearch-allow-scroll' but > instead of scrolling commands it affects point motion commands > to yank text as you go. > So typing `C-f' will pull the next char from the buffer and add it > to the search string, `M-f' - next word, `C-M-f' - next expression, > `M-}' - next paragraph, `C-e' - next line, and so on. I can't help feeling there will be excessively complicated interactions here, somewhere. I'm assuming that backward commands like C-b won't be included. But what does it mean to C-f with a prefix arg of -1? Does it mean "remove the last char from the search string"? If not, why not? Or maybe a negative prefix argument would cause the command to be ignored. Or maybe C-b would be allowed here to remove the last char from the search string. You could then use it to erase the entire search string and then convert a forward search into backward search by another C-b. Maybe. Maybe I'm just being a bit conservative, but I can foresee there being more complications here than would make the implementation worthwhile. > Definitely `isearch-allow-move' should be nil by default, > and I doubt that many users might want to enable it since > it's more useful when motion commands exit Isearch. > But to make this feature available regardless of the value of > `isearch-allow-move' it could be activated temporarily by the > keymap `M-s' to allow key sequences like `M-s C-f M-f C-M-f C-e' > that is implemented by this patch: (Apologies for not having read the patch in full detail.) -- Alan Mackenzie (Nuremberg, Germany).