From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 07 20:30:17 2021 Received: (at submit) by debbugs.gnu.org; 8 Sep 2021 00:30:18 +0000 Received: from localhost ([127.0.0.1]:58068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNlTl-0000kp-Dx for submit@debbugs.gnu.org; Tue, 07 Sep 2021 20:30:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:56906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNlTj-0000kh-FH for submit@debbugs.gnu.org; Tue, 07 Sep 2021 20:30:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNlTj-0005By-5k for bug-gnu-emacs@gnu.org; Tue, 07 Sep 2021 20:30:15 -0400 Received: from sonic308-3.consmr.mail.bf2.yahoo.com ([74.6.130.42]:35459) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNlTf-0004JF-Iw for bug-gnu-emacs@gnu.org; Tue, 07 Sep 2021 20:30:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1631061008; bh=ewr9PGLr5v+iqBBaIK015epTjDDanLdvh6mnUG85EDI=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=OObboEfzZpzln5+h8IB/wanHiYVwAVDexo32+gxRJkdJGSDzIqZYZ3G42AREf81yifHi0Llautrfplo3+gc+68THZ176cqLCrUNHM6zBVpQ723mUEKRdsuPXXpl5ZR7C366bTimQxKeMapnYzYdSTxtEB83mHbBQ23f72/4Vo/U5PKYygk+oHu5QrBAtL6F2jwN79bm+h+vgP8djZsqtL5x4N0lmUl0o0+Xi9N/rEPcKrrBxRL6omeMpTrlO/k3p0nOIkTe/1cYRMAmvBoc9G3hSHCVd7ISG4QJ30+zj7V5SgonUjL1jQbMG23NV38v3+B3fn77MKCpW3BqcEbA3XQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1631061008; bh=Ap0uZlqAdmiiXKIZarCabBEH/x/+f7D1bUwomImxlM3=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=NO7GkJvlV9ai/77U6wCYrZ0/1c/mvizMHV6XfkqCRt9Ql/pl6YuC2UAqJWofFS1FPdK43NCA0TMbjA+1VunVT8aSDduo6w3BUsw4bkVotrArRCOwR1Grb+JYStZBJm6it2x06gKqfDhwRhpQZxXZ2t/ZWjbWg33/myFFpBV5+MLor0BKMD1AwD1ubBbriggRmDopGLpwHxXjh8qY4VS7V5uSkK5v5d/lFI2aieVSIT4g9W5HNHwtygAHbto0+D59Rgy7mgICn9ZponPXYbRt2qqSBAMDrJh0jJWGzRSaliu5pS995zzrYAqugtjjhXHfnS1F2AyvsvQCAHRcmFN+mw== X-YMail-OSG: hrF.QBUVM1mLXOkFVW8xWVPgNWqngfxZ_wbAN.8HhgaRCXqA2mFR6HYccxsE.BK eJsS96dKtyjtmdt1zs5n5fSXRQUr.NGcNA47Iwa5wW0tJ1VW.CvwHEOtNahndgua8CqSqtheom45 g2TFfY7ReBvnKV6pfyexsQTVVSs3Yz_jb1H6nQRbOhAEEjDTiHYFj6bW484UpFXlhwj4kkvU7ku2 u3Cf.GFIlvPrwwvo7OfXxxqDJ0JTDW76bs0gDhGF.ghL7jB4BbyxY7rCAs.HJ6I7ITvp0n3YTR8B 5C952x3gqZsb.zTQ7VMyROu9MYlJimKkY.cqyN.nPhyxDSaOzRtpv352YC7jioMGQulFyqKB2GjW d1zdsrcWiaxCwXJtcF4oA_GGphM8fjG5gL3xBsL2IjXAC9H9bVmz3znWCGBswmdA9OI5M3bpdCa8 shAfmO6wUIb70dtB_7HGSbd5cfQnnNLvdi49ZRBXJwC2C9hnDaSOCx3pImjRZKhwA_9Tsc3RZDXc jxVeJMkMoebg3ZJ1uPPKBb8oPaewgre3UG7YYihmfi3HiMPo4DzouUdXwjJhtzgC2CHekPfur4Ni cc_GIfm7uO7vg8tKfvwkIjrnzTZTqLkeSFaBP48oo5joYEth3xbSCPBPVhKfDC4VHykc30i.zsfM i9rUB9J7FKKYZSHJ9fiW85dncBAiBi.Ow.3usJb7c26OQ8iEI_S5Dx1joE9xHxxD10BYXgQK0MkB JGDGEZZCECQ6RMJ9JxEqOyOCzHQPz507DqgqV.cqTkKkciQQhmsQeiFth0dVCG47lNfxOvhXRgII MGby0Qeaj7TVU3i1axD3lzKqe7a99VsGLoXo0hqYHncm9hR8pCx.sTRpWYZimRPBz3Hrd8t96qRv hW0YOfVKcYt8YruIyfFQiMRJXmk4DjBUkHEsVxE.lKkLxQsOEr_In99mMI3BBWAjPprlZ.AY6V0f 2XBz7Vm7Afgs6jICOeWNvyQ.hVa2hKJ3J1PddqQSp4RzPKikRQEJzxidLUKQlRgBOvJZpMONGMGV GLjNyAdK89LweSFwPq2eZ5ef1ZHtCY9cDm0UCQ3Agurmgoqmp.PFP8QNryFio0gyiOWdu717AGwT M614GDHt0B03AXJg2UcKn.QrBl5YiqUeLzTtEm3lKVDjs3KrLtdM2fgVTufgh0ovW4bedcBCtoD. Z80XO6Ss6Ms9FgZrzW2jxr_SfxVcke6CE2IivnZtZ7JWb2WiYyhN7NIGn.nUVkpFu6TW9fwSvxHw KpbuGddGbagimO4cVzGohUTEMcwjOFSa9TXaM_A_1gJt9zrBCU6pg0RtU67neb58tEkUt4E6ZQys RxHhMT4m9tbC7p1Osn1cqrMpkV91TFaNgeWTABDifcLAAUu_VW4LUnzXjwXAyLWfM9TSxp.gWdYr x8qBbwuKpuJk9zpy6KSf5g6lIHfI56UoGUYNDyCAngVOgkS_lnOsyzQVlw3VO63knMII9UGa.ewz Cp4xM1Rf9HyNoNyNjD0HLG_sthqZjT8TZT2sufAErm0gY.PGjYbu0MzMYIRaHpelBatzR04NwLHx Td2KhNvrdVFAwt2a4xbjw.kIcpSPfaRQssT9xtToSfZE1.5e05Kdk.9yCoVqN9VBDKxS8vIgZbZs O9MDDHrsFddoy6oHhE9ao7rljYS5RFe2H4dDCz5XpiaJGbqMMxxs.p0nmlRIH8w.aZ_qSX_qQZ0A 1OjQNBCAlDRknmSJ1D4TQo4kbkNYEk2JUQJ87A724HbrHcIxHhJX9Pt5.OFiwZqlqyhJ8eSNb5Eu hLgILcrabiMe8mrOEHVnxqkB7K8opkObdGcomWlo8jeanMIfIddjgUt05cqZnot4wN9rSmiP4J99 M.A8EeOkJaKKhfYHn9lSU6CEvO7W7dqKUMOQyBpyE9vCUdwexnXBiuLKJC4Fs0mdiZSn8usjF4rg Qg4uFPYS6GdhvgoG8XqkT.nQ3pcmosdCtpdqeCXQ0Yj5dhU4IgAG5nOe4aLXzjpEzHb98qkqcx60 Gl3t3BHJdZncYjy7tTgL4Fd3jRKEadSyPBJ6YABahxO1TJptWp.5i36WVCRkNJdezaeIakx8AqjV Prq4S4cCCIDejdDN5jWDYDncoqeBGhYHhGOQliHfoP3TKIVUI4YVsXgCHDK05B4qNd3d6i9lEf66 DdQhiELMhVlvkR.PV0FfA0LYdvNdntc0nF9nzsfpnCGXhmktaJE1VQJc48yl8x8G_DhgOECCkyeo kE.lc6mhdwlykenF2QsIR5lG9ITm9ww-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.bf2.yahoo.com with HTTP; Wed, 8 Sep 2021 00:30:08 +0000 Received: by kubenode514.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 0e2e2643b13bffb5c68c62a9969a776a; Wed, 08 Sep 2021 00:30:02 +0000 (UTC) From: Ergus To: bug-gnu-emacs@gnu.org Subject: 28.0.50; isearch isearch-repeat-on-direction-change vs isearch-beginning-of-buffer Date: Wed, 08 Sep 2021 02:29:15 +0200 Message-ID: <87zgsnzz8k.fsf@aol.com> MIME-Version: 1.0 Content-Type: text/plain References: <87zgsnzz8k.fsf.ref@aol.com> X-Mailer: WebService/1.1.18924 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Content-Length: 8025 Received-SPF: pass client-ip=74.6.130.42; envelope-from=spacibba@aol.com; helo=sonic308-3.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi: I have this config in my system: (setq isearch-repeat-on-direction-change t) (define-key isearch-mode-map (kbd "M-<") #'isearch-beginning-of-buffer) If I have the cursor on the beginning of: 1abc 2abc 3abc 4abc and do C-s abc ;; cursor at the end of 1abc C-s ;; cursor at the end of 2abc C-s ;; cursor at the end of 3abc C-r ;; cursor at the beginning of 2abc M-< ;; cursor at the end of 3abc <- this is wrong The cursor goes to the end of 3abc (next candidate) instead of 1abc (first) as expected from isearch-beginning-of-buffer. If I repeat M-< then it goes to the right candidate (end of 1abc). This seems related with the fact that the cursor needs to move to the other-end or something like that. Because isearch-beginning-of-buffer does not respect when the cursor was previously at the beginning or the end of the candidates. In GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) of 2021-09-06 built on Ergus Repository revision: 61e5570863aa236628a87c722912dea86d2903b0 Repository branch: master System Description: Arch Linux Configured using: 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json --with-x-toolkit=gtk3 --with-xft --with-wide-int --with-modules --with-cairo --with-harfbuzz --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: show-paren-mode: t global-auto-revert-mode: t xclip-mode: t yas-global-mode: t yas-minor-mode: t electric-pair-mode: t flyspell-mode: t company-mode: t flycheck-mode: t counsel-mode: t ivy-mode: t composable-mark-mode: t composable-mode: t repeat-mode: t xterm-mouse-mode: t winner-mode: t save-place-mode: t which-key-mode: t override-global-mode: t delete-selection-mode: t savehist-mode: t global-display-fill-column-indicator-mode: t display-fill-column-indicator-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t eldoc-mode: t mouse-wheel-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /usr/share/emacs/site-lisp/cmake-mode hides /home/ergo/.emacs.d/elpa/cmake-mode-20210104.1831/cmake-mode /home/ergo/.emacs.d/elpa/magit-20210906.1023/magit-section-pkg hides /home/ergo/.emacs.d/elpa/magit-section-20210829.1849/magit-section-pkg /usr/share/emacs/site-lisp/notmuch-crypto hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-crypto /usr/share/emacs/site-lisp/notmuch-compat hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-compat /usr/share/emacs/site-lisp/notmuch-hello hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-hello /usr/share/emacs/site-lisp/notmuch hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch /usr/share/emacs/site-lisp/notmuch-show hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-show /usr/share/emacs/site-lisp/notmuch-maildir-fcc hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-maildir-fcc /usr/share/emacs/site-lisp/coolj hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/coolj /usr/share/emacs/site-lisp/notmuch-draft hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-draft /usr/share/emacs/site-lisp/notmuch-tree hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-tree /usr/share/emacs/site-lisp/notmuch-parser hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-parser /usr/share/emacs/site-lisp/notmuch-lib hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-lib /usr/share/emacs/site-lisp/notmuch-mua hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-mua /usr/share/emacs/site-lisp/notmuch-message hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-message /usr/share/emacs/site-lisp/notmuch-address hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-address /usr/share/emacs/site-lisp/notmuch-wash hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-wash /usr/share/emacs/site-lisp/notmuch-tag hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-tag /usr/share/emacs/site-lisp/notmuch-print hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-print /usr/share/emacs/site-lisp/notmuch-query hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-query /usr/share/emacs/site-lisp/notmuch-jump hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-jump /usr/share/emacs/site-lisp/notmuch-company hides /home/ergo/.emacs.d/elpa/notmuch-20210830.2334/notmuch-company /home/ergo/.emacs.d/elpa/transient-20210819.2118/transient hides /home/ergo/.local/share/emacs/28.0.50/lisp/transient Features: (shadow sort notmuch-company notmuch-lib notmuch-version notmuch-compat mm-view mml-smime smime dig mailcap mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source password-cache time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils thingatpt amx s paren autorevert filenotify xclip yasnippet-snippets yasnippet elec-pair flyspell-correct-ivy flyspell-correct flyspell ispell company-keywords company-gtags company-dabbrev-code company-dabbrev company-files company-semantic company-template company-capf company flycheck json map find-func dash counsel xdg xref project dired dired-loaddefs compile text-property-search comint ansi-color swiper ivy-avy avy ivy flx ivy-faces ivy-overlay colir pcase term/tmux term/xterm xterm jka-compr init composable composable-mark powerline comp comp-cstr warnings subr-x powerline-separators color powerline-themes repeat xt-mouse simple-16-theme winner ring saveplace diminish edmacro kmacro which-key advice configmail cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core disp-table delsel savehist easy-mmode display-fill-column-indicator display-line-numbers info ede/auto eieio-base cl-seq seq eieio byte-opt bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs cl-loaddefs cl-lib tex-site rx slime-autoloads early-init iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 262277 6438) (symbols 48 18897 0) (strings 32 60245 8110) (string-bytes 1 2209331) (vectors 16 30930) (vector-slots 8 648313 10429) (floats 8 204 994) (intervals 56 1285 0) (buffers 992 11)) From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 08 02:02:08 2021 Received: (at 50466) by debbugs.gnu.org; 8 Sep 2021 06:02:08 +0000 Received: from localhost ([127.0.0.1]:58271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNqeu-0000dj-D8 for submit@debbugs.gnu.org; Wed, 08 Sep 2021 02:02:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNqes-0000dD-Hq for 50466@debbugs.gnu.org; Wed, 08 Sep 2021 02:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=S6L1xEZy+QMAONUG5LxN0SWnxOXhnY22hRedwcR6JEg=; b=gRXSOM7U/MmGOBK2EhnxBM47gF wbcMdY3DFmUIVLG/Ah9Lzdj4epD3bamfAXKi0buT05/08Gp2QEYlh9yWbsudfsqFrMboE3LA0sx1J /ld0sN5l1tEfOUDs6gROB7CFv4oIKiInMzwc0HbsVMErWyJ8NjAmiBL/2y1yE8vjlSVc=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNqek-0007ZI-69; Wed, 08 Sep 2021 08:02:00 +0200 From: Lars Ingebrigtsen To: Ergus Subject: Re: bug#50466: 28.0.50; isearch isearch-repeat-on-direction-change vs isearch-beginning-of-buffer References: <87zgsnzz8k.fsf.ref@aol.com> <87zgsnzz8k.fsf@aol.com> Date: Wed, 08 Sep 2021 08:01:55 +0200 In-Reply-To: <87zgsnzz8k.fsf@aol.com> (Ergus's message of "Wed, 08 Sep 2021 02:29:15 +0200") Message-ID: <871r5z8v1o.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Ergus writes: > (setq isearch-repeat-on-direction-change t) > (define-key isearch-mode-map (kbd "M-<") #'isearch-beginning-of-buffer) > > If I have the cursor on the beginning of: > > 1abc > 2abc > 3abc > 4abc > > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50466 Cc: 50466@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ergus writes: > (setq isearch-repeat-on-direction-change t) > (define-key isearch-mode-map (kbd "M-<") #'isearch-beginning-of-buffer) > > If I have the cursor on the beginning of: > > 1abc > 2abc > 3abc > 4abc > > and do > > C-s abc ;; cursor at the end of 1abc > C-s ;; cursor at the end of 2abc > C-s ;; cursor at the end of 3abc > C-r ;; cursor at the beginning of 2abc > M-< ;; cursor at the end of 3abc <- this is wrong > > The cursor goes to the end of 3abc (next candidate) instead of 1abc > (first) as expected from isearch-beginning-of-buffer. Simpler reproduction: Go to the end of the 3abc line and C-r abc M-< That'll take you to the end of 4abc. And it's because: (defun isearch-beginning-of-buffer (&optional arg) [...] (setq isearch-just-started t) (goto-char (point-min)) (isearch-repeat 'forward arg))) (defun isearch-repeat (direction &optional count) [...] ;; C-s in reverse or C-r in forward, change direction. (if (and isearch-other-end isearch-repeat-on-direction-change) (goto-char isearch-other-end)) The following patch seems to fix the problem: diff --git a/lisp/isearch.el b/lisp/isearch.el index 1c776a06e1..6abd12700c 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1898,7 +1898,8 @@ isearch-repeat (funcall isearch-wrap-function) (goto-char (if isearch-forward (point-min) (point-max)))))) ;; C-s in reverse or C-r in forward, change direction. - (if (and isearch-other-end isearch-repeat-on-direction-change) + (if (and isearch-other-end isearch-repeat-on-direction-change + (not isearch-just-started)) (goto-char isearch-other-end)) (setq isearch-forward (not isearch-forward) isearch-success t)) But I'm not really very familiar with the isearch machinery, so I've added Juri to the CCs; perhaps he has a comment here. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 09 15:16:39 2021 Received: (at 50466) by debbugs.gnu.org; 9 Sep 2021 19:16:39 +0000 Received: from localhost ([127.0.0.1]:36286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOPXK-0004pe-T5 for submit@debbugs.gnu.org; Thu, 09 Sep 2021 15:16:39 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:41737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOPXI-0004iu-LN for 50466@debbugs.gnu.org; Thu, 09 Sep 2021 15:16:37 -0400 Received: (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 1ED44200004; Thu, 9 Sep 2021 19:16:28 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#50466: 28.0.50; isearch isearch-repeat-on-direction-change vs isearch-beginning-of-buffer Organization: LINKOV.NET References: <87zgsnzz8k.fsf.ref@aol.com> <87zgsnzz8k.fsf@aol.com> <871r5z8v1o.fsf@gnus.org> Date: Thu, 09 Sep 2021 22:15:20 +0300 In-Reply-To: <871r5z8v1o.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 08 Sep 2021 08:01:55 +0200") Message-ID: <87r1dxlfw7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50466 Cc: Ergus , 50466@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > But I'm not really very familiar with the isearch machinery, so I've > added Juri to the CCs; perhaps he has a comment here. Gregory already provided the patch on emacs-devel that fixes this. But that patch was not installed because the copyright assignment process was still in progress. This patch could be installed now. The patch name was 0001-Fix-behavior-of-isearch-beginning-end-of-buffer.patch and its date: Sat, 10 Apr 2021 23:55:50 +0000 (5 months, 1 day, 19 hours ago) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 06:44:37 2021 Received: (at 50466) by debbugs.gnu.org; 10 Sep 2021 10:44:37 +0000 Received: from localhost ([127.0.0.1]:36967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOe1N-0002JK-Lc for submit@debbugs.gnu.org; Fri, 10 Sep 2021 06:44:37 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOe1L-0002J3-Iw for 50466@debbugs.gnu.org; Fri, 10 Sep 2021 06:44:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UfJqDoGpbr/1hMXocgUJo6lryDcQkFTW9KGDqSTSFbg=; b=mNGGM3tbeqkWr3Ji+Im/IlrkFx vsJHQ5jzShpH1JXvoTchLHR9tdZh02srAR/n/R6QSb2gV0TX/2gpG+fkSGmFzRIZnYwWSiHDxeaWD s1gxJ3FY+kzSf0KEyMMbw0Ltgoqki6zI/5MAV/7z0ddPP51GFanxZDDMbnEKTNWYWseU=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOe1C-0002pJ-Rg; Fri, 10 Sep 2021 12:44:29 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#50466: 28.0.50; isearch isearch-repeat-on-direction-change vs isearch-beginning-of-buffer References: <87zgsnzz8k.fsf.ref@aol.com> <87zgsnzz8k.fsf@aol.com> <871r5z8v1o.fsf@gnus.org> <87r1dxlfw7.fsf@mail.linkov.net> Date: Fri, 10 Sep 2021 12:44:26 +0200 In-Reply-To: <87r1dxlfw7.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 09 Sep 2021 22:15:20 +0300") Message-ID: <87czpgr9px.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >> But I'm not really very familiar with the isearch machinery, so I've >> added Juri to the CCs; perhaps he has a comment here. > > Gregory already provided the patch on emacs-devel that fixes this. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50466 Cc: Ergus , 50466@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov writes: >> But I'm not really very familiar with the isearch machinery, so I've >> added Juri to the CCs; perhaps he has a comment here. > > Gregory already provided the patch on emacs-devel that fixes this. > But that patch was not installed because the copyright assignment process > was still in progress. This patch could be installed now. > The patch name was 0001-Fix-behavior-of-isearch-beginning-end-of-buffer.patch > and its date: Sat, 10 Apr 2021 23:55:50 +0000 (5 months, 1 day, 19 hours ago) Right; now applied. (I also applied the other patch in that post, since it seemed like it was agreed that that was a good feature.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 06:44:48 2021 Received: (at control) by debbugs.gnu.org; 10 Sep 2021 10:44:48 +0000 Received: from localhost ([127.0.0.1]:36970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOe1X-0002Jn-TP for submit@debbugs.gnu.org; Fri, 10 Sep 2021 06:44:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOe1W-0002JY-7q for control@debbugs.gnu.org; Fri, 10 Sep 2021 06:44:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OMDkO5E6qn8P183MyD/JbA4Gp+iKjYSOYvvLzgv8Uf8=; b=R4JDdypSrCmI771L9OKkj+Xu04 Pkiwuy5N0pSkjoVvyEbDkOWI/o+m0q4oarxgxTfMQNPiAxX/fp+7FV85DdGX1jkGOgU3w+tB9uqx5 +bFVOcSA8QXNQnQF84KiFXhyuqFvzeyBoIxXpfyROq+lVNYizEHW02PaPOUfjnIVinoM=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOe1O-0002pU-Q0 for control@debbugs.gnu.org; Fri, 10 Sep 2021 12:44:40 +0200 Date: Fri, 10 Sep 2021 12:44:38 +0200 Message-Id: <87bl50r9pl.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50466 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 50466 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 50466 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 13 14:20:24 2021 Received: (at 50466) by debbugs.gnu.org; 13 Sep 2021 18:20:24 +0000 Received: from localhost ([127.0.0.1]:46817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPqZ5-0005yX-Sa for submit@debbugs.gnu.org; Mon, 13 Sep 2021 14:20:24 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:60315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPqZ4-0005yJ-NN for 50466@debbugs.gnu.org; Mon, 13 Sep 2021 14:20:23 -0400 Received: (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 3600A20000F; Mon, 13 Sep 2021 18:20:14 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#50466: 28.0.50; isearch isearch-repeat-on-direction-change vs isearch-beginning-of-buffer Organization: LINKOV.NET References: <87zgsnzz8k.fsf.ref@aol.com> <87zgsnzz8k.fsf@aol.com> <871r5z8v1o.fsf@gnus.org> <87r1dxlfw7.fsf@mail.linkov.net> <87czpgr9px.fsf@gnus.org> Date: Mon, 13 Sep 2021 21:18:54 +0300 In-Reply-To: <87czpgr9px.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 10 Sep 2021 12:44:26 +0200") Message-ID: <87y280nxtd.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50466 Cc: Ergus , 50466@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Gregory already provided the patch on emacs-devel that fixes this. >> But that patch was not installed because the copyright assignment process >> was still in progress. This patch could be installed now. >> The patch name was 0001-Fix-behavior-of-isearch-beginning-end-of-buffer.patch >> and its date: Sat, 10 Apr 2021 23:55:50 +0000 (5 months, 1 day, 19 hours ago) > > Right; now applied. (I also applied the other patch in that post, since > it seemed like it was agreed that that was a good feature.) Thanks Gregory for this great feature, and thank you for installing it. I had to tweak it a little. I added the same logic from the patch to isearch-beginning-of-buffer and isearch-end-of-buffer. But these commands are quite obsolete now because of 'isearch-allow-motion', so I mentioned this in their docstrings. From unknown Sun Jun 22 07:44:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 12 Oct 2021 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator