From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#14742: 24.3.50; enhancement request: be able to prepend stuff from buffer when search backward Date: Tue, 2 Jul 2013 22:40:27 -0700 (PDT) Message-ID: References: <4b9029ca-1775-482f-ba9a-46a891be7405@default> <87sj01c3n2.fsf@mail.jurta.org> <7518b30b-63d2-40ea-956f-a504f40c4cfd@default> <87haggoc6r.fsf@mail.jurta.org> <8ada7269-baa9-483f-9595-d46619393aa7@default> <87y59ok18k.fsf@mail.jurta.org> <6ae1046e-e6ae-43ae-96ff-064fd01c9ec2@default> <87k3l8ik77.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1372830071 8237 80.91.229.3 (3 Jul 2013 05:41:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jul 2013 05:41:11 +0000 (UTC) Cc: 14742@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 03 07:41:11 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1UuFoS-00011O-Hy for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jul 2013 07:41:08 +0200 Original-Received: from localhost ([::1]:57496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuFoS-000747-4c for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jul 2013 01:41:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuFoO-00073m-GK for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 01:41:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuFoM-0005aG-P7 for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 01:41:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuFoM-0005Zp-KZ for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 01:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UuFoM-0002e1-Ae for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 01:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2013 05:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14742 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14742-submit@debbugs.gnu.org id=B14742.137283004010095 (code B ref 14742); Wed, 03 Jul 2013 05:41:02 +0000 Original-Received: (at 14742) by debbugs.gnu.org; 3 Jul 2013 05:40:40 +0000 Original-Received: from localhost ([127.0.0.1]:53440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UuFo0-0002cl-5A for submit@debbugs.gnu.org; Wed, 03 Jul 2013 01:40:40 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:46924) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UuFnx-0002cX-JF for 14742@debbugs.gnu.org; Wed, 03 Jul 2013 01:40:38 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r635YAMH009817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Jul 2013 05:34:11 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r635eTCV020353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jul 2013 05:40:29 GMT Original-Received: from abhmt106.oracle.com (abhmt106.oracle.com [141.146.116.58]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r635eTFu020350; Wed, 3 Jul 2013 05:40:29 GMT In-Reply-To: X-Priority: 2 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75838 Archived-At: Oops. It just occurred to me what you might be up to, which I did not understand. I haven't seen your description of what you have in mind. But if it is what I imagine now, then I think it sounds truly elegant. Is this the idea: cursor movements would extend isearch by yanking the text the cursor would move over in the buffer, starting from `point' (where isearch starts)? E.g., for forward search C-f, M-f, C-M-f, C-e, etc. would yank the next char, word, symbol, line etc. to the end of the search string. And for reverse search C-b, M-b, C-M-b, C-a, etc. would yank the previous (next going backward) char, word, symbol, line etc. to the beginning of the search string. And presumably backward cursor movements when searching forward (e.g., C-b, M-b, C-M-b, C-a) would undo, in the sense of removing yanked text (but only yanked text, presumably) from the end. And forward cursor movements when searching backward would remove yanked text from the beginning. Is that the idea? If so, bravo; I'm a supporter, a priori. And yes, IMO that would be quite natural. I imagine it should be optional, though (even if it could perhaps be/become the default), since some people might object to things like C-M-f not ending isearch. My guess is that most people would want this behavior immediately - cursor movement does not currently do anything except exit isearch (and there are plenty of other ways to do that). TBD would be what to do with the equivalent of the combination yanks that exist today, e.g., C-w for word-or-char. Did you have another idea in that area also, or did you intend to just leave them as is? Perhaps you were thinking of having things like C-f/right/C-b/left doing what C-w does? If so, I'm guessing it would be better to just have them yank a char at a time (easy enough to hold them pressed, or change to M-f/M-b etc.), in order to keep the parallel with cursor movements. Do you have this working already? Have you described what you have in mind somewhere? Did you bring this up in emacs-devel? If not, please consider it - that is the best place to toss such an idea around. Another possibility (an extension) just occurred to me: There is only one starting position: `point' where isearch is started. But it might be useful to be able to toggle off the yanking, perform some more cursor movements without yanking to, in effect, move the yanking position in the buffer, then toggle yanking back on and resume yanking from the new position. Even if we made no provision (at least at first) for showing the yank position in the buffer, I think it would be clear enough, just from the result of yanking a char, say, (and then unyanking it if it was yanked just to check where the yank position is). And being able to move the yank position using cursor movements would also be helpful when combined with other yanking operations (e.g., combo's like C-w). Dunno whether I am clear in these last two paragraphs, or whether you have already considered something like this. Anyway, bravo - great idea to play with, and likely a real improvement to isearch.