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-scroll' - a misnomer and a bad design Date: Sat, 10 Sep 2011 12:13:49 +0000 Message-ID: <20110910121349.GC2460@acm.acm> References: <20110909215255.GD2733@acm.acm> <7002A9DA9A804F0B9F6F251FD3A2B263@us.oracle.com> <8762l0aabn.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1315657069 28513 80.91.229.12 (10 Sep 2011 12:17:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 10 Sep 2011 12:17:49 +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 Sat Sep 10 14:17:43 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R2MVD-00024u-3a for ged-emacs-devel@m.gmane.org; Sat, 10 Sep 2011 14:17:43 +0200 Original-Received: from localhost ([::1]:40021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2MVC-0004nn-J4 for ged-emacs-devel@m.gmane.org; Sat, 10 Sep 2011 08:17:42 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2MV9-0004ni-2d for emacs-devel@gnu.org; Sat, 10 Sep 2011 08:17:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R2MV7-0007Yl-SJ for emacs-devel@gnu.org; Sat, 10 Sep 2011 08:17:39 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:61009 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2MV7-0007Yf-HW for emacs-devel@gnu.org; Sat, 10 Sep 2011 08:17:37 -0400 Original-Received: (qmail 45197 invoked by uid 3782); 10 Sep 2011 12:17:35 -0000 Original-Received: from acm.muc.de (pD9556A07.dip.t-dialin.net [217.85.106.7]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 10 Sep 2011 14:17:33 +0200 Original-Received: (qmail 3439 invoked by uid 1000); 10 Sep 2011 12:13:49 -0000 Content-Disposition: inline In-Reply-To: <8762l0aabn.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: Genre and OS details not recognized. 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:143847 Archived-At: Hi, Juri. On Sat, Sep 10, 2011 at 02:47:08PM +0300, Juri Linkov wrote: > > Maybe what you want is a new option `isearch-pass-through-categories', > > which would be a list of symbol properties, so any command who has > > a non-nil value for one of those properties is allowed to run without > > exiting isearch. > > Then `scroll-command' becomes one possible element of > > isearch-pass-through-categories. > I think this would be the best thing to do. And to add > a new property that doesn't exit Isearch regardless of the value of > `isearch-allow-scroll'. And put it on all universal argument commands > `universal-argument', `negative-argument', `digit-argument', i.e.: Please everybody, this whole thing is balooning out of control. What everybody seems to be forgetting is that this feature can only be used with commands which: 1. Don't change the buffer being isearched through; 2. Don't move point; 3. Don't swap to another buffer, window or frame; 4. Don't mess with isearch's state (e.g. with search-regexp functions). This is really a TINY number of commands, mostly to do with scrolling, changing window arrangement, and the prefix arg. Any other command would screw up the isearch horribly. > ;; Universal argument commands > (put 'universal-argument 'isearch-inhibit-exit t) > (put 'negative-argument 'isearch-inhibit-exit t) > (put 'digit-argument 'isearch-inhibit-exit t) > that will do TRT by default for commands unrelated to scrolling. I agree these three commands should be separated out. I've already supplied a rough patch for this. But for any more additional complexity, we should have a firm use case. Complexity without reason is a Bad Thing. -- Alan Mackenzie (Nuremberg, Germany).