Subject: bug#61395: closed (Re: bug#61395: 28.2; bug-reference warning seems incorrect)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 10 Feb 2023 18:28:02 +0000

Your bug report

#61395: 28.2; bug-reference warning seems incorrect

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
61395: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61395
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#61395: 28.2; bug-reference warning seems incorrect
From: Tassilo Horn <[email-masked]>
To: Tom Tromey <[email-masked]>
Cc: Basil Contovounesios <[email-masked]>, [email-masked], Eli Zaretskii <[email-masked]>
Date: Fri, 10 Feb 2023 19:15:42 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Tom Tromey <[email-masked]> writes:

> Tassilo> many times in buffer.c but `syntax-ppss' doesn't seem to
> Tassilo> clobber match-data.
>
> Seems like it would depend on whether the major mode uses regexps
> here?  My case is using tcl-mode FWIW.

Hah, indeed!  It was easy to reproduce with a tcl file.

> However a superficial look at the syntax-ppss code shows it's calling
> save-match-data in some spots, so perhaps this isn't the bug.

It is.  I've fixed it on the emacs-29 branch.

Thanks a lot and 100 bonus points to Kévin who has been right with his
analysis.

Bye,
Tassilo

Subject: 28.2; bug-reference warning seems incorrect
From: Tom Tromey <[email-masked]>
To: [email-masked]
Date: Thu, 09 Feb 2023 12:08:39 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

I got this warning while using bug-reference-prog-mode on a certain file
in gdb:

Warning (bug-reference): The value of ‘bug-reference-bug-regexp’

  "\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"

in buffer "finish.exp" doesn’t conform to the contract specified by its
docstring.  The subexpression 1 should define the region of the
bug-reference overlay and cover all other subexpressions up to
subexpression 10. Disable showing Disable logging

However, this warning seems wrong to me.  If you examine the above
regexp, you'll see it does cover all the other subexpressions.

Perhaps it is mis-worded somehow and the actual problem is something
else?  It's worth noting here that this is the default value for this
regexp:

(defcustom bug-reference-bug-regexp
  "\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"

In gdb we use this setting for bug-reference-url-format, in case this
matters somehow:

(bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")

In GNU Emacs 28.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6)
 of 2022-12-31 built on buildvm-x86-18.iad2.fedoraproject.org
Windowing system distributor 'The X.Org Foundation', version 11.0.12201007
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no
 --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json
 --with-native-compilation build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Tcl

Minor modes in effect:
  ggtags-mode: t
  bug-reference-prog-mode: t
  flyspell-mode: t
  shell-dirtrack-mode: t
  which-function-mode: t
  erc-services-mode: t
  erc-networks-mode: t
  savehist-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /usr/share/emacs/28.2/lisp/play/bubbles
/home/tromey/.emacs.d/elpa/dictionary-1.10/dictionary hides /usr/share/emacs/28.2/lisp/net/dictionary

Features:
(shadow emacsbug rust-mode tabify man sh-script executable compare-w
vc-annotate forth-interaction-mode forth-mode forth-spec forth-smie smie
forth-syntax ert debug backtrace autoload tar-mode lisp-mnt url-http
url-gw url-auth gud gnus-icalendar org-capture org-refile icalendar
cus-edit cus-start cl-print shortdoc asm-mode apropos reposition
conf-mode autoconf autoconf-mode texinfo texinfo-loaddefs m4-mode
make-mode mule-util dired-aux arc-mode archive-mode flow-fill gnus-html
help-fns radix-tree url-cache tcl macros org-bullets org-element
avl-tree ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe
ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m
ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp
ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat
org-macs org-loaddefs find-func mailalias supercite regi mail-hist sort
gnus-cite smiley shr-color mm-archive mail-extr gnus-bcklg gnus-async qp
gnus-ml disp-table gnus-topic nndraft nnmh nnfolder utf-7 gnutls
network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp
gnus-cache gnus-sum shr kinsoku svg dom gnus-group gnus-undo smtpmail
sendmail gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source
utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader
term/xterm xterm python tramp-sh find-file find-dired ffap dabbrev pulse
log-view goto-addr log-edit message rmc puny dired dired-loaddefs rfc822
mml mml-sec epa epg rfc6068 epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util smerge-mode diff copyright misearch multi-isearch ggtags
hippie-exp derived etags fileloop generator xref project bug-reference
cc-mode cc-fonts cc-guess cc-menus cc-cmds vc-mtn vc-hg vc-git diff-mode
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs add-log flyspell ispell
diminish projectile ibuf-macs pcase edmacro kmacro grep compile
text-property-search ibuf-ext ibuffer ibuffer-loaddefs dash appt
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat shell
pcomplete parse-time ls-lisp which-func imenu minimap autorevert
filenotify cus-load erc-track erc-match erc-services erc-networks
erc-hl-nicks easy-mmode color erc-button erc-fill erc-stamp wid-edit
erc-goodies erc erc-backend iso8601 time-date thingatpt pp format-spec
erc-loaddefs comp comp-cstr rx cl-extra help-mode warnings advice vc-dir
ewoc vc vc-dispatcher cc-styles cc-align cc-engine cc-vars cc-defs
ange-ftp comint ansi-color ring server savehist clang-rename
clang-include-fixer let-alist clang-format xml finder-inf
gdb-shell-autoloads lisppaste-autoloads pydoc-info-autoloads info-look
info cl weblogger-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode 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 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 emoji-zwj 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
xwidget-internal dbusbind inotify 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 2993058 272550)
 (symbols 48 88842 38)
 (strings 32 206336 32085)
 (string-bytes 1 11250062)
 (vectors 16 120474)
 (vector-slots 8 3571778 468305)
 (floats 8 573 733)
 (intervals 56 431859 1461)
 (buffers 992 1145))