GNU bug report logs -
#55412
28.1; In Emacs 28.1, using ':eval' in 'frame-title-format' doesn't work properly
Previous Next
Reported by: tanzer <at> swing.co.at
Date: Sat, 14 May 2022 15:46:02 UTC
Severity: normal
Found in version 28.1
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 55412 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> ;;; In Emacs 28.1, using ':eval' in 'frame-title-format' doesn't work like it
> ;;; used to in Emacs 27 and earlier. In fact, it is completely broken, if one
> ;;; uses a frame-parameter in ':eval'.
> ;;;
> ;;; The following elisp snippet demonstrates the problem in an Emacs 28.1
> ;;; instance started with 'emacs -Q'
>
> (defun title-suffix ()
> (cdr (assoc 'title-suffix (frame-parameters (selected-frame)))))
>
> (defvar title-prefix "Test")
> (setq frame-title-format (list title-prefix '(:eval (title-suffix)) " %b"))
>
> ;;; The original frame should show a frame title of 'Test *scratch*'
> (set-frame-parameter (selected-frame) 'title-suffix "")
>
> ;;; The next frame created should show a frame title of 'Test-xxx *scratch*'
> (make-frame-command)
> (set-frame-parameter (selected-frame) 'title-suffix "-xxx")
>
> ;;; The third frame created should show a frame title of 'Test-yyy *scratch*'
> (make-frame-command)
> (set-frame-parameter (selected-frame) 'title-suffix "-yyy")
>
> ;;; In Emacs 27 and earlier, that is exactly what happens. Selecting a
> ;;; different frame doesn't change the titles of all other frames.
>
> ;;; In Emacs 28.1, all frames show the same frame title, with the last one
> ;;; selected determining which one is shown for the bunch of them. Changing to
> ;;; a different frame changes the titles of all frames to the title of the
> ;;; newly selected one.
Could you try the attached patch? Its purpose is to solve a more
general problem in this area and I had to scrape it out from my sources
so there are most likely dragons around. But AFAICT it does not exhibit
the problem you see, tested with a GNUstep build on old stable Debian.
Thanks, martin
[with-window-selected.diff (text/x-patch, attachment)]
This bug report was last modified 3 years and 85 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.