From: Juanma Barranquero <lekktu@gmail.com>
To: 59575@debbugs.gnu.org
Subject: bug#59575: 29.0.50; add-log-current-defun-header-regexp matches Windows drive letter
Date: Fri, 25 Nov 2022 16:53:51 +0100 [thread overview]
Message-ID: <CAAeL0SSSqxG5qxg6D0WEoUg=C=iEatJ+kVmUYZQ2N+gTQanhSA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]
If you have an *xref* buffer with absolute Windows filenames, like
~/.emacs.d/init.el
93: server-name (replace-regexp-in-string "\\\\+" "\\"
serv t t)
1102: (let ((s (when server-name
1104: (string-match (rx (+ (not (any ?\\))) line-end)
server-name)
1105: (upcase (match-string 0 server-name))))))
d:/Devel/emacs/repo/trunk/lisp/erc/erc-backend.el
1820: (pcase-let ((`(,server-name ,server-version)
1823: (setq erc-server-announced-name server-name)
1827: 's004 ?s server-name ?v server-version
and put the cursor in an absolute filename line (like the one
d:/Devel/[etc] above), calling `add-log-current-defun' returns the drive
letter "d", because it matches a-l-c-d-header-regexp.
The effect is visible when you have which-function-mode enabled, because
the function returns non-nil, so which-function does not resort to imenu,
and you end with "d" in the mode-line.
I suppose this should be fixed in xref.el, which apparently assumes that
file name lines will be either relative or Unix-style (/path/file works
correctly, it's just d:/path/file that fails) and the add-log heuristics
will always fail.
[-- Attachment #2: Type: text/html, Size: 1684 bytes --]
next reply other threads:[~2022-11-25 15:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 15:53 Juanma Barranquero [this message]
2022-11-26 13:03 ` bug#59575: 29.0.50; add-log-current-defun-header-regexp matches Windows drive letter Eli Zaretskii
2022-11-26 13:17 ` Juanma Barranquero
2022-11-27 1:54 ` Dmitry Gutov
2022-11-27 6:49 ` Eli Zaretskii
2022-11-27 12:33 ` Dmitry Gutov
2022-11-27 12:40 ` Juanma Barranquero
2022-11-27 8:29 ` Juanma Barranquero
2022-11-27 11:11 ` Juanma Barranquero
2022-11-27 11:22 ` Juanma Barranquero
2022-11-27 13:04 ` Dmitry Gutov
2022-11-27 13:22 ` Juanma Barranquero
2022-11-27 13:05 ` Dmitry Gutov
2022-11-27 13:18 ` Juanma Barranquero
2022-11-27 13:41 ` Dmitry Gutov
2022-11-27 14:02 ` Juanma Barranquero
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAeL0SSSqxG5qxg6D0WEoUg=C=iEatJ+kVmUYZQ2N+gTQanhSA@mail.gmail.com' \
--to=lekktu@gmail.com \
--cc=59575@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.