GNU bug report logs - #61395
28.2; bug-reference warning seems incorrect

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Thu, 9 Feb 2023 19:10:02 UTC

Severity: normal

Found in version 28.2

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tom Tromey <tom <at> tromey.com>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: Basil Contovounesios <contovob <at> tcd.ie>, Eli Zaretskii <eliz <at> gnu.org>, Tom Tromey <tom <at> tromey.com>, 61395 <at> debbugs.gnu.org
Subject: bug#61395: 28.2; bug-reference warning seems incorrect
Date: Fri, 10 Feb 2023 11:25:09 -0700
Tassilo> If you can reproduce the issue, try changing
Tassilo> `bug-reference--overlay-bounds' so that the check

Tassilo>   (member bug-reference-bug-regexp
Tassilo>           bug-reference--nonconforming-regexps)

Ok, I can reproduce it now.

I removed this bit from bug-reference--overlay-bounds:

        (setq bug-reference--nonconforming-regexps
              (cons bug-reference-bug-regexp
                    bug-reference--nonconforming-regexps))

Then I set bug-reference--nonconforming-regexps to nil.
This combination means I can see the warning any time.

The gdb .dir-locals.el has this setting:

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

I can send the whole file if you want, but I think this is the only
relevant part.

I've appended a file from gdb.  This is a .exp (dejagnu script) file,
which should use tcl-mode.

I have this code to enable bug reference mode:

(defun tromey-maybe-enable-bug-url-mode ()
  (and (boundp 'bug-reference-url-format)
       (stringp bug-reference-url-format)
       (if (or (derived-mode-p 'prog-mode)
	       (eq major-mode 'tcl-mode)	;emacs 23 bug
	       (eq major-mode 'makefile-mode)) ;emacs 23 bug
	   (bug-reference-prog-mode t)
	 (bug-reference-mode t))))

(add-hook 'find-file-hook #'tromey-maybe-enable-bug-url-mode)


LOL workarounds for emacs 23.

Anyway, I switched back to the .exp buffer and re-opened the file (C-x
C-v RET).  I saw the warning again.

thanks,
Tom

# Copyright (C) 2019-2023 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

standard_testfile realname-expand.c realname-expand-real.c

# Compiling on a remote host does not support a filename with
# directory.
require {!is_remote host}

set srcdirabs [file join [pwd] $srcdir]
set srcfilelink [standard_output_file realname-expand-link.c]

remote_exec build "ln -sf ${srcdirabs}/${subdir}/${srcfile2} $srcfilelink"

if { [file type $srcfilelink] != "link" } {
    unsupported "target directory cannot have symbolic links"
    return -1
}

if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcfilelink}" "${binfile}" \
		  executable {debug}] != "" } {
    untested "failed to compile"
    return -1
}

clean_restart ${testfile}

if {![runto_main]} {
    return -1
}

gdb_breakpoint func message

gdb_test_no_output "set annotate 1"

# The patch to cause this output was reverted.
# See PR breakpoints/24915.
setup_xfail *-*-* 24915
gdb_test "continue" \
    "Breakpoint .* func .*realname-expand-link.c:$decimal\r\n\032\032.*realname-expand-link.c:.*"




This bug report was last modified 2 years and 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.