GNU bug report logs - #59575
29.0.50; add-log-current-defun-header-regexp matches Windows drive letter

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Fri, 25 Nov 2022 15:55:01 UTC

Severity: normal

Found in version 29.0.50

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 59575 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 59575 <at> debbugs.gnu.org
Subject: Re: bug#59575: 29.0.50; add-log-current-defun-header-regexp matches
 Windows drive letter
Date: Sun, 27 Nov 2022 15:04:24 +0200
On 27/11/22 13:22, Juanma Barranquero wrote:
> On Sun, Nov 27, 2022 at 12:11 PM Juanma Barranquero <lekktu <at> gmail.com 
> <mailto:lekktu <at> gmail.com>> wrote:
> 
>     That should be changed to
> 
>       (cl-ecase xref-file-name-display
>           (abs group)
>           (nondirectory
>     -     (if (string-match-p "\\`~?/" group)
>     +     (if (string-match-p "\\`\\(~\\|[A-Za-z]:\\)?/" group)
>                (file-name-nondirectory group)
>              group))
>           (project-relative
> 
>     or something similar.
> 
> 
> Silly me, that should just use `file-name-absolute-p'.
> 
> OK to fix this, regardless of what's decided for the original bug?

Yes, please. The original idea was to avoid costly operations (in case 
the list of matches is long), but looks like file-name-absolute-p 
doesn't hit the disk.




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

Previous Next


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