GNU bug report logs -
#33697
26.1; file-truename messes with match data
Previous Next
Full log
View this message in rfc822 format
merge 33697 31586
thanks
> From: kevin.legouguec <at> gmail.com (Kévin Le Gouguec)
> Date: Mon, 10 Dec 2018 22:02:09 +0100
>
> I set frame-title-format so that it displays the basename of the current
> project's root folder for the active buffer. However, my $HOME is under
> version control; I do not want this particular "project" to show up in
> the frame's title.
>
> Here is the code that I use:
>
> (require 'subr-x)
>
> (defun my/project-name ()
> (when-let* ((project (project-current))
> (root (car (project-roots project))))
> (when (not (file-equal-p root "~"))
> (file-name-nondirectory (string-trim-right root "/")))))
>
> (setq frame-title-format
> '(:eval
> (let ((project (my/project-name)))
> (concat (when project (format "[%s] " project)) "%b"))))
>
> After adding the above to my .emacs, I started experiencing weird
> failures with query-replace. I managed to reproduce this with emacs -Q:
>
> - evaluate the above
> - move to the beginning of *scratch*
> - M-% a RET b RET
> ⇒ perform-replace: Args out of range: #<buffer *scratch*>, 0, 2
> (point has moved after the first match)
This is bug#31586, please see the discussions there.
This bug report was last modified 3 years and 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.