From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Simple isearch concerns Date: Sun, 11 Apr 2021 01:12:28 +0300 Organization: LINKOV.NET Message-ID: <8735vxbwju.fsf@mail.linkov.net> References: <20210403001539.x4rb55dvh46rmhb3.ref@Ergus> <9ff81b52fad2911cc740@heytings.org> <87im4w1tgw.fsf@mail.linkov.net> <9ff81b52fa878cb35a86@heytings.org> <87pmz4zgn5.fsf@mail.linkov.net> <83eefk802u.fsf@gnu.org> <871rbjdea4.fsf@mail.linkov.net> <8335vz91en.fsf@gnu.org> <940751cee594ef1cf8a4@heytings.org> <83zgy77hep.fsf@gnu.org> <940751cee566285b8519@heytings.org> <83wntb7eli.fsf@gnu.org> <940751cee50d69f2231d@heytings.org> <83r1jj7bhg.fsf@gnu.org> <940751cee5acf0f913df@heytings.org> <83eefj705i.fsf@gnu.org> <940751cee53181aedd72@heytings.org> <83a6q67gme.fsf@gnu.org> <5cf18ab57c8becad2999@heytings.org> <83pmz25sdr.fsf@gnu.org> <5cf18ab57ca5d2cc99ad@heytings.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1198"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , spacibba@aol.com, emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 11 00:46:08 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVMMh-0000C5-Ep for ged-emacs-devel@m.gmane-mx.org; Sun, 11 Apr 2021 00:46:07 +0200 Original-Received: from localhost ([::1]:54630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVMMg-00063j-FA for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 18:46:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVMLK-00057n-Nm for emacs-devel@gnu.org; Sat, 10 Apr 2021 18:44:43 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVMLI-0004TV-4X; Sat, 10 Apr 2021 18:44:42 -0400 X-Originating-IP: 91.129.96.157 Original-Received: from mail.gandi.net (m91-129-96-157.cust.tele2.ee [91.129.96.157]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 2B2B820004; Sat, 10 Apr 2021 22:44:33 +0000 (UTC) In-Reply-To: <5cf18ab57ca5d2cc99ad@heytings.org> (Gregory Heytings's message of "Sat, 10 Apr 2021 10:57:33 +0000") Received-SPF: pass client-ip=217.70.183.200; envelope-from=juri@linkov.net; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267842 Archived-At: > +(put 'scroll-up-command 'isearch-motion > + '((lambda () (goto-char (window-end))) . forward)) > +(put 'scroll-down-command 'isearch-motion > + '((lambda () (goto-char (window-start)) (recenter nil t)) . backward)) These definitions have such a problem that after going to the next screen, it's recentered, so the upper half of the screen displays old matches already seen on the previous screen. I get much better scrolling experience with these properties: (put 'scroll-up-command 'isearch-motion '((lambda () (goto-char (window-end)) (recenter 1 t)) . forward)) (put 'scroll-down-command 'isearch-motion '((lambda () (goto-char (window-start)) (recenter -1 t)) . backward)) so only new unseen matches are highlighted. > + (when (and isearch-success (not isearch-motion-changes-direction)) > + (unless (eq direction current-direction) > + (let ((isearch-repeat-on-direction-change nil)) > + (isearch-repeat current-direction)))) This 'isearch-repeat' is broken when the new option 'isearch-repeat-on-direction-change' is customized to t. Also in this case the old commands isearch-beginning-of-buffer and isearch-end-of-buffer are broken too. Maybe you need to wrap their calls of 'isearch-repeat' with (let ((isearch-repeat-on-direction-change nil)) (isearch-repeat 'forward arg))