From: Stephen Berman <stephen.berman@gmx.net>
To: 44929@debbugs.gnu.org
Subject: bug#44929: 28.0.50; Info-next-reference skips next reference
Date: Sat, 28 Nov 2020 20:21:50 +0100 [thread overview]
Message-ID: <87360tjnht.fsf@gmx.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]
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
=> 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=-Og -g3'
PKG_CONFIG_PATH=/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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Info-next-reference.diff --]
[-- Type: text/x-patch, Size: 637 bytes --]
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))
next reply other threads:[~2020-11-28 19:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-28 19:21 Stephen Berman [this message]
2020-11-28 19:44 ` bug#44929: 28.0.50; Info-next-reference skips next reference Eli Zaretskii
2020-11-28 19:54 ` Stephen Berman
2020-11-28 20:10 ` Drew Adams
2020-11-28 20:22 ` Eli Zaretskii
[not found] <<87360tjnht.fsf@gmx.net>
[not found] ` <<83h7p9mfl8.fsf@gnu.org>
[not found] ` <<87tut9i7fa.fsf@gmx.net>
[not found] ` <<2cb435b4-7de8-4783-9830-44195c111aca@default>
[not found] ` <<83czzxmdtm.fsf@gnu.org>
2020-11-28 20:56 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87360tjnht.fsf@gmx.net \
--to=stephen.berman@gmx.net \
--cc=44929@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).