When string formatting is supported, it's sometimes possible pass in a string which could contain a percentage symbol which would then be interpreted.
For example, this frame-title-format
has a bug when the file name contains %b
.
(setq-default frame-title-format
'((:eval
(if (buffer-file-name)
(abbreviate-file-name (buffer-file-name))
"%b"))
(:eval (if (buffer-modified-p) " *")) " emacs"))
How can a string have formatting characters converted into literals?
frame-title-format
has a long-standing bug that can lead to the name subsequently changing on its own .... Setting the frame title by modifying the frame parameter directly is the best way to work around that bug. The frame title parameter can also be set from the outset when creating the frame ... – lawlist Jul 28 '19 at 5:31