unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: kevin.legouguec@gmail.com (Kévin Le Gouguec)
Cc: 33697@debbugs.gnu.org
Subject: bug#33697: 26.1; file-truename messes with match data
Date: Tue, 11 Dec 2018 06:55:33 +0200	[thread overview]
Message-ID: <83va401x2y.fsf@gnu.org> (raw)
In-Reply-To: <87woohhz8u.fsf@gmail.com> (kevin.legouguec@gmail.com)

merge 33697 31586
thanks

> From: kevin.legouguec@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.





  reply	other threads:[~2018-12-11  4:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10 21:02 bug#33697: 26.1; file-truename messes with match data Kévin Le Gouguec
2018-12-11  4:55 ` Eli Zaretskii [this message]
2018-12-11 19:59   ` Kévin Le Gouguec
  -- strict thread matches above, loose matches on Subject: below --
2018-05-24 21:55 bug#31586: 27.0.50; `frame-title-format' doesn't save " Philipp
2022-05-06 17:29 ` bug#33697: 26.1; file-truename messes with " Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83va401x2y.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33697@debbugs.gnu.org \
    --cc=kevin.legouguec@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).