GNU bug report logs - #42017
26.3; format-mode-line and %p

Previous Next

Package: emacs;

Reported by: Humberto Sgrott Reis <hsgrott <at> gmail.com>

Date: Tue, 23 Jun 2020 03:52:02 UTC

Severity: normal

Tags: notabug

Found in version 26.3

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42017 in the body.
You can then email your comments to 42017 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#42017; Package emacs. (Tue, 23 Jun 2020 03:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Humberto Sgrott Reis <hsgrott <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 23 Jun 2020 03:52:02 GMT) Full text and rfc822 format available.

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

From: Humberto Sgrott Reis <hsgrott <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; format-mode-line and %p
Date: Mon, 22 Jun 2020 22:58:41 -0400
M-x ielm
> (setq mode-line-format "(%p)")
Hit enter numerous times to grow the buffer. The percentage will be
displayed with a percent sign at the end, and will be enclosed in parens.
> (setq mode-line-format (:eval (format-mode-line "(%p)")))
The percentage will be displayed without a percent sign at the end, and
the right paren will be overwritten.


In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109))
of 2019-09-02 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1894
Recent messages:
previous-line: Beginning of buffer [5 times]
next-line: End of buffer [6 times]
Print buffer *ielm*? n
ns-print-buffer: Canceled
funcall-interactively: End of buffer
next-line: End of buffer [6 times]
Quit
next-line: End of buffer [3 times]
Quit
mwheel-scroll: End of buffer
kill-region: Text is read-only: #<buffer *ielm*>
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:
  value of $LANG: pt_BR.UTF-8
  locale-coding-system: utf-8-unix

Major mode: IELM

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils ielm easymenu pp comint
ansi-color ring elec-pair time-date tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 212685 10286)
(symbols 48 20424 2)
(miscs 40 58 195)
(strings 32 29932 2153)
(string-bytes 1 802080)
(vectors 16 35484)
(vector-slots 8 728369 10374)
(floats 8 50 272)
(intervals 56 609 0)
(buffers 992 12))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42017; Package emacs. (Tue, 23 Jun 2020 13:14:02 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattiase <at> acm.org>
To: Humberto Sgrott Reis <hsgrott <at> gmail.com>
Cc: 42017 <at> debbugs.gnu.org
Subject: bug#42017: 26.3; format-mode-line and %p
Date: Tue, 23 Jun 2020 15:12:49 +0200
tag 42017 notabug
close 42017
done

> (setq mode-line-format (:eval (format-mode-line "(%p)")))

The result of the form after :eval is the mode-line format string to use, not the final string itself.
What you observe is the effect of using "(25%)" (for example) as a mode-line format string: since "%)" is not a valid format specification, it produces no characters.

Thanks for reporting it just the same, and please do not let this dissuade you from reporting things you think aren't right in the future!





Added tag(s) notabug. Request was from Mattias Engdegård <mattiase <at> acm.org> to control <at> debbugs.gnu.org. (Tue, 23 Jun 2020 13:14:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 42017 <at> debbugs.gnu.org and Humberto Sgrott Reis <hsgrott <at> gmail.com> Request was from Mattias Engdegård <mattiase <at> acm.org> to control <at> debbugs.gnu.org. (Tue, 23 Jun 2020 13:14:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Jul 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 330 days ago.

Previous Next


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