From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#44929: 28.0.50; Info-next-reference skips next reference Date: Sat, 28 Nov 2020 20:21:50 +0100 Message-ID: <87360tjnht.fsf@gmx.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14728"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 44929@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 28 20:23:41 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kj5oq-0003i0-Tl for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Nov 2020 20:23:41 +0100 Original-Received: from localhost ([::1]:59306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kj5op-0000zl-Lw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Nov 2020 14:23:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj5oE-0000xv-MP for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2020 14:23:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kj5oE-0001eY-CW for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2020 14:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kj5oE-0001M4-9G for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2020 14:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Nov 2020 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44929 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16065913225109 (code B ref -1); Sat, 28 Nov 2020 19:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Nov 2020 19:22:02 +0000 Original-Received: from localhost ([127.0.0.1]:49101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kj5nF-0001KI-JZ for submit@debbugs.gnu.org; Sat, 28 Nov 2020 14:22:01 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:57924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kj5nD-0001K6-1Z for submit@debbugs.gnu.org; Sat, 28 Nov 2020 14:21:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj5nC-0000TJ-RF for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2020 14:21:58 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:48413) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj5nA-0001KI-UB for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2020 14:21:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606591315; bh=kOucQ3Efxlj8k05ON5JHmjJ6UKrGSTwfcaopi98YaSk=; h=X-UI-Sender-Class:From:To:Subject:Date; b=hi0AkU92+dGWd0Mgk3iJ7xuIB1VPetY4ciyeaQ5Fq7+N2bz/AYNL+wy37kdyhK3zt 3Qs7SBuwYqLee1av+fqbd9fPU3KPY0eKCyLGCcrDk7IZBqeCbaKhbXZk2DpXhs9nXt yY/EUNZY2Ph6vUc6Z0/4lRlLrHrPydvGU2qVhsoM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-jhalfs ([188.109.153.25]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N8obG-1k5xfp0QdS-015rxk for ; Sat, 28 Nov 2020 20:21:55 +0100 X-Provags-ID: V03:K1:o7hv1ByqRZJtLFgeQSbYoMGVT0DRjF8m5MWK8/P7qys9MmGUqnT KpiWpZaR5ZjasXPCn1qHH/SHhdJwAmIjL14MHM3CzKigKDPTm6Xxp6Qnycp9lHsAgzTs8a+ rlx3rxQ7HYBU+IXi2l7cfkzHvksIcKOPqFb3d0w7Ddilk1V+YDwZ5HzZHG5P9lHNJbLGNhy V7BqH0QfIreVHjcPpyJug== X-UI-Out-Filterresults: notjunk:1;V03:K0:cYaqYhG+uSI=:aQczexuMZK9HwkU42dBDHL igRWpDDVDxKbKlNg9j+lR0sOGklUDu5mJClR9qKZr1OEd/qrh8qIH0RpL8+JVkmahIG69kdHz yCk7/MzTJiivDnLcGm6wnwUW1/86MISLF3PjI5HMA1rik9iQ1AE0z4IOpO3xjBVEoxKDs9bsR U7MxPeTET6ZfMcFklHiSdn3TZIR8NUxpNSPm/79dmlyCbj8gXZIm9+KZCKMu+s2Pcha9HATG0 QdA3hFwzOB6TQMYJfvqaPqLQhexfSC2+yit6QS+jyJEArXiqCPGJnUFahmXJn/dNi9RIbVojK eert8GeKJVry31AQRgQye3drlead2/14rjFMkeACiaSSyq1SDciGbujqDOXTaED6esResS71b JCEWoAQIty/CSR+ByKjtJKvLPjLlVFBkulB3ZKRkF/dteDKBySVHsc0mdGCcOOXZyvYsjeWJB CzgweSUaA8YStzuzJuEGN/3D41z8lBwwC9pc+MDWQLYmZYxHhB50JDO6WDRXmMtbBkwWEOgx2 ZjW+rJGu9uQbwImeqMl7xkD8XI+NXGqkmhUZ7iO0OXthTWIxtk1lVD5/dU31OoYvcadVHkarA qocgCJj+XNReGHnDVnW9FzRGmb1rfmLvhdtREY16+TMM7Qv2OyQD3turvbqeQnvfmRpL27gtR pM6FgiGyweOA3UVwfwLl6H2wm/fwl1IK13nFYTOsOKFD6xzIV97vdjtRuQUJ6j0A+xbYGqfDI x5HHN/goINCXFKuq2t/vn9/Khu4Xp6F/MjWS4iw8c3T11k9XhUtJpi7oVbb9IRfQoXDj6Z4m Received-SPF: pass client-ip=212.227.17.21; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194501 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 0. emacs -Q 1. C-h r (if emacs is installed, otherwise `C-u h i /path/to/emacs.info RET') 2. Repeat `C-n' until the cursor is on the '*' before the first menu item 'Distrib'. 3. Type TAB =3D> The cursor jumps over 'Distrib' and goes to the second menu item 'Intro'. The same thing happens if the cursor is on the space between '*' and 'Distrib' and you then press TAB. In both cases, I expected the cursor to go to the immediately following link instead of skipping it. This behavior annoys me every time I run into it, but I haven't debugged it till now. The attached patch fixes it. (The code responsible for the current behavior in Info-next-reference has not changed since the command was added to Emacs, but I hope you'll nevertheless agree it's a bug.) In GNU Emacs 28.0.50 (build 42, x86_64-pc-linux-gnu, GTK+ Version 3.24.17,= cairo version 1.17.3) of 2020-11-21 built on strobe-jhalfs Repository revision: 0a8cd0116204354e95fbb4ebde64c58123502aa2 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Linux From Scratch SVN-20200401 Configured using: 'configure --with-xwidgets 'CFLAGS=3D-Og -g3' PKG_CONFIG_PATH=3D/opt/qt5/lib/pkgconfig' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD PDUMPER LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=Info-next-reference.diff diff --git a/lisp/info.el b/lisp/info.el index c3684deb96..5c383836c8 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3148,6 +3148,12 @@ Info-next-reference (old-pt (point)) (case-fold-search t)) (or (eobp) (forward-char 1)) + ;; Don't jump over the cross-reference or menu item when the + ;; cursor is on the '*' or space in front of it. + (unless (looking-at " Menu:") + (let ((lbp (line-beginning-position))) + (when (looking-back "^\\* ?" lbp) + (backward-char (if (looking-back "^\\* " lbp) 2 1))))) (or (Info-next-reference-or-link pat 'link) (progn (goto-char (point-min)) --=-=-=--