GNU bug report logs - #57080
28.1; The %m modeline construct does not work for emacs-lisp-mode

Previous Next

Package: emacs;

Reported by: diredwolf <diredwolf1 <at> gmail.com>

Date: Tue, 9 Aug 2022 16:18:01 UTC

Severity: normal

Found in version 28.1

Done: Phil Sainty <psainty <at> orcon.net.nz>

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 57080 in the body.
You can then email your comments to 57080 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#57080; Package emacs. (Tue, 09 Aug 2022 16:18:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to diredwolf <diredwolf1 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 09 Aug 2022 16:18:01 GMT) Full text and rfc822 format available.

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

From: diredwolf <diredwolf1 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1; The %m modeline construct does not work for emacs-lisp-mode
Date: Tue, 9 Aug 2022 18:06:16 +0200
[Message part 1 (text/plain, inline)]
The name of the major mode is not displayed correctly when using the %m
modeline construct. The name is displayed correctly for every mode
except elisp-mode.

Steps to reproduce :
- Launch emacs -q
- Evaluate this :: (setq-default mode-line-format "[%m]")

For every major mode you should see for example [Message] or [Dired by
name] or [Help] but for elisp-mode you get [].

In GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559))
of 2022-05-11 built on armbob.lan
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.5

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB

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

Major mode: Org

Minor modes in effect:
  display-time-mode: t
  display-battery-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  global-org-modern-mode: t
  org-modern-mode: t
  meow-global-mode: t
  meow-mode: t
  meow-normal-mode: t
  marginalia-mode: t
  vertico-mode: t
  pulsar-global-mode: t
  pulsar-mode: t
  savehist-mode: t
  save-place-mode: t
  global-auto-revert-mode: t
  global-hl-line-mode: t
  global-subword-mode: t
  subword-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/matthieu/.emacs.d/elpa/transient-20220806.2224/transient hides /Applications/Emacs.app/Contents/Resources/lisp/transient

Features:
(shadow sort mail-extr emacsbug sendmail dired-aux org-element ol-eww
eww xdg mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015
mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start
gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader
ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m
ol-doi org-link-doi time battery dbus elfeed-show elfeed-search vc-git
vc-dispatcher shr kinsoku svg dom elfeed-csv elfeed elfeed-curl
elfeed-log elfeed-db elfeed-lib avl-tree generator url-queue xml-query
xml format-all language-id inheritenv magit-bookmark magit-submodule
magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func magit-diff
smerge-mode diff diff-mode git-commit log-edit pcvs-util add-log
magit-core magit-autorevert magit-margin magit-transient magit-process
with-editor shell server magit-mode transient magit-git magit-base
magit-section crm compat-27 compat-26 org-modern org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex
iso8601 ol rx org-keys oc org-compat advice org-macs org-loaddefs
format-spec cal-menu calendar cal-loaddefs denote meow meow-tutor
meow-cheatsheet meow-cheatsheet-layout meow-core meow-shims meow-esc
meow-command array meow-beacon meow-thing meow-visual meow-keypad
meow-helpers meow-util meow-keymap meow-face meow-var embark ffap
thingatpt marginalia helpful imenu trace edebug backtrace info-look f
f-shortdoc shortdoc help-fns elisp-refs s orderless corfu
consult-vertico consult compat-28 compat recentf tree-widget wid-edit
bookmark pp vertico modus-operandi-theme modus-themes edmacro kmacro
olivetti pulsar pulse color cl-extra help-mode savehist saveplace
autorevert filenotify hl-line cap-words superword subword delsel pcase
xref project compile comint ansi-color ring find-func autoload
radix-tree lisp-mnt tar-mode arc-mode archive-mode mm-archive message
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
gnus-util rmail rmail-loaddefs text-property-search mailabbrev gmm-utils
mailheader mm-decode mm-bodies mm-encode mail-utils gnutls
network-stream url-http mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm rmc puny url-cache url-auth epg-config
time-date auto-package-update dash diminish use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core finder-inf
info package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer 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 emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window 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 604371 43389)
(symbols 48 40916 9)
(strings 32 195283 14959)
(string-bytes 1 5733155)
(vectors 16 76142)
(vector-slots 8 861099 43431)
(floats 8 1770 1217)
(intervals 56 5647 5580)
(buffers 992 23))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Tue, 09 Aug 2022 16:46:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: diredwolf <diredwolf1 <at> gmail.com>
Cc: 57080 <at> debbugs.gnu.org
Subject: Re: bug#57080: 28.1;
 The %m modeline construct does not work for emacs-lisp-mode
Date: Tue, 09 Aug 2022 19:45:01 +0300
> From: diredwolf <diredwolf1 <at> gmail.com>
> Date: Tue, 9 Aug 2022 18:06:16 +0200
> 
> - Launch emacs -q
> - Evaluate this :: (setq-default mode-line-format "[%m]")
> 
> For every major mode you should see for example [Message] or [Dired by
> name] or [Help] but for elisp-mode you get [].

%m in mode-line-format is obsolete; use the variable mode-name
instead.

(The technical reason behind what you see is that %m displays the mode
name only if the value of mode-name is a string, which in this case it
isn't.)




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 09 Aug 2022 17:07:02 GMT) Full text and rfc822 format available.

Notification sent to diredwolf <diredwolf1 <at> gmail.com>:
bug acknowledged by developer. (Tue, 09 Aug 2022 17:07:02 GMT) Full text and rfc822 format available.

Message #13 received at 57080-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: diredwolf <diredwolf1 <at> gmail.com>
Cc: 57080-done <at> debbugs.gnu.org
Subject: Re: bug#57080: 28.1; The %m modeline construct does not work for
 emacs-lisp-mode
Date: Tue, 09 Aug 2022 20:06:25 +0300
> From: diredwolf <diredwolf1 <at> gmail.com>
> Date: Tue, 9 Aug 2022 18:55:33 +0200
> 
> Thank you very much for your explanation, using mode-name instead of %m fixed the problem.

Thanks, I'm therefore closing the bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Wed, 10 Aug 2022 00:24:02 GMT) Full text and rfc822 format available.

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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: 57080 <at> debbugs.gnu.org, eliz <at> gnu.org, diredwolf1 <at> gmail.com
Subject: Re: bug#57080: 28.1; The %m modeline construct does not work for
 emacs-lisp-mode
Date: Wed, 10 Aug 2022 12:23:05 +1200
On 2022-08-10 05:06, Eli Zaretskii wrote:
>> From: diredwolf <diredwolf1 <at> gmail.com>
>> Thank you very much for your explanation, using mode-name instead of 
>> %m fixed the problem.
> 
> Thanks, I'm therefore closing the bug.

I think some documentation updates are needed here?

In my month-old build from master, at any rate:

(info "(elisp) %-Constructs") states that ‘%m’ and ‘mode-name’
are equivalent, which is evidentially wrong.

Tangentially, (info "(elisp) Mode Line Variables") makes mention
of %M as being an obsolete version of ‘global-mode-string’, and
the %M construct is not listed in that other node at all (and
conversely, 'mode-name' is mentioned in the latter node without
any reference to %m.)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Wed, 10 Aug 2022 02:41:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: diredwolf1 <at> gmail.com, 57080 <at> debbugs.gnu.org
Subject: Re: bug#57080: 28.1; The %m modeline construct does not work for
 emacs-lisp-mode
Date: Wed, 10 Aug 2022 05:40:00 +0300
> Date: Wed, 10 Aug 2022 12:23:05 +1200
> From: Phil Sainty <psainty <at> orcon.net.nz>
> 
> On 2022-08-10 05:06, Eli Zaretskii wrote:
> >> From: diredwolf <diredwolf1 <at> gmail.com>
> >> Thank you very much for your explanation, using mode-name instead of 
> >> %m fixed the problem.
> > 
> > Thanks, I'm therefore closing the bug.
> 
> I think some documentation updates are needed here?
> 
> In my month-old build from master, at any rate:
> 
> (info "(elisp) %-Constructs") states that ‘%m’ and ‘mode-name’
> are equivalent, which is evidentially wrong.

It also says %m is obsolete, which you didn't mention.

I won't object to telling there that %m doesn't work with non-string
mode-name, if that's your suggestion.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Wed, 10 Aug 2022 12:51:02 GMT) Full text and rfc822 format available.

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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: diredwolf1 <at> gmail.com, 57080 <at> debbugs.gnu.org
Subject: Re: bug#57080: 28.1; The %m modeline construct does not work for
 emacs-lisp-mode
Date: Thu, 11 Aug 2022 00:49:55 +1200
On 2022-08-10 14:40, Eli Zaretskii wrote:
>> From: Phil Sainty <psainty <at> orcon.net.nz>
>> (info "(elisp) %-Constructs") states that ‘%m’ and ‘mode-name’
>> are equivalent, which is evidentially wrong.
> 
> It also says %m is obsolete, which you didn't mention.

Ah, I didn't even see that -- I'd thought that paragraph was part
of the details for '%%' immediately above, and hadn't read it.

> I won't object to telling there that %m doesn't work with non-
> string mode-name, if that's your suggestion.

I'll do this, and also move the whole description below the '%m'.






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 08 Sep 2022 11:24:09 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Phil Sainty <psainty <at> orcon.net.nz> to control <at> debbugs.gnu.org. (Sat, 18 Mar 2023 07:29:02 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Mar 2023 07:29:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Sat, 18 Mar 2023 07:32:01 GMT) Full text and rfc822 format available.

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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: 57080 <at> debbugs.gnu.org
Subject: Re: bug#57080: 29.0.60; [PATCH] Updates to mode line construct
 documentation (was: The %m modeline construct does not work for
 emacs-lisp-mode)
Date: Sat, 18 Mar 2023 20:30:58 +1300
[Message part 1 (text/plain, inline)]
Does anyone object to me merging branch 
fix/bug-57080-mode-line-format-docs
( https://lists.gnu.org/archive/html/emacs-diffs/2023-03/msg00453.html )
to the emacs-29 branch?

It addresses the issue from this bug along with several related things
that I found in the process of looking at that.

* The %m documentation was not entirely accurate (as discussed here).
* The %M documentation was also not up to date.
* The %t construct was obsolete but still documented.
* The %o and %q constructs were lacking documentation.
* The `mode-line-format' docstring for all of the constructs was
  not as easy to read as it could have been.

I'm attaching the patch series.  The individual commit messages have
more details.

The final reformatting of the `mode-line-format' docstring sorts the
constructs by letter (which makes everything easier to find); eliminates
multiple constructs being crammed into single lines (which also makes
everything easier to find); and rephrases some things for (IMHO) easier
readability and comprehension.

This is the 'before' state:

  %b -- print buffer name.      %f -- print visited file name.
  %F -- print frame name.
  %* -- print %, * or hyphen.   %+ -- print *, % or hyphen.
	%& is like %*, but ignore read-only-ness.
	% means buffer is read-only and * means it is modified.
	For a modified read-only buffer, %* gives % and %+ gives *.
  %s -- print process status.   %l -- print the current line number.
  %c -- print the current column number (this makes editing slower).
        Columns are numbered starting from the left margin, and the
        leftmost column is displayed as zero.
        To make the column number update correctly in all cases,
	`column-number-mode' must be non-nil.
  %C -- Like %c, but the leftmost column is displayed as one.
  %i -- print the size of the buffer.
  %I -- like %i, but use k, M, G, etc., to abbreviate.
  %o -- print percent of window travel through buffer, or Top, Bot or 
All.
  %p -- print percent of buffer above top of window, or Top, Bot or All.
  %P -- print percent of buffer above bottom of window, perhaps plus 
Top,
        or print Bottom or All.
  %q -- print percent of buffer above both the top and the bottom of the
        window, separated by ‘-’, or ‘All’.
  %n -- print Narrow if appropriate.
  %z -- print mnemonics of keyboard, terminal, and buffer coding 
systems.
  %Z -- like %z, but including the end-of-line format.
  %e -- print error message about full memory.
  %@ -- print @ or hyphen.  @ means that default-directory is on a
        remote machine.
  %[ -- print one [ for each recursive editing level.  %] similar.
  %% -- print %.   %- -- print infinitely many dashes.


And this is the 'after' state (which is only 3 lines longer):

  %b -- print buffer name.
  %c -- print the current column number (this makes editing slower).
        Columns are numbered starting from the left margin, and the
        leftmost column is displayed as zero.
        To make the column number update correctly in all cases,
        `column-number-mode' must be non-nil.
  %C -- Like %c, but the leftmost column is displayed as one.
  %e -- print error message about full memory.
  %f -- print visited file name.
  %F -- print frame name.
  %i -- print the size of the buffer.
  %I -- like %i, but use k, M, G, etc., to abbreviate.
  %l -- print the current line number.
  %n -- print Narrow if appropriate.
  %o -- print percent of window travel through buffer, or Top, Bot or 
All.
  %p -- print percent of buffer above top of window, or Top, Bot or All.
  %P -- print percent of buffer above bottom of window, perhaps plus 
Top,
        or print Bottom or All.
  %q -- print percent of buffer above both the top and the bottom of the
        window, separated by ‘-’, or ‘All’.
  %s -- print process status.
  %z -- print mnemonics of keyboard, terminal, and buffer coding 
systems.
  %Z -- like %z, but including the end-of-line format.
  %& -- print * if the buffer is modified, otherwise hyphen.
  %+ -- print *, % or hyphen (modified, read-only, neither).
  %* -- print %, * or hyphen (read-only, modified, neither).
        For a modified read-only buffer, %+ prints * and %* prints %.
  %@ -- print @ if default-directory is on a remote machine, else 
hyphen.
  %[ -- print one [ for each recursive editing level.
  %] -- print one ] for each recursive editing level.
  %- -- print enough dashes to fill the mode line.
  %% -- print %.


I untabified the indentation, as that didn't render correctly with a
tab-width of anything other than 8, which might be a problem for other
docstrings as well.  Should help-mode set tab-width to 8 ??


-Phil
[0001-src-buffer.c-mode-line-format-Remove-docs-for-obsole.patch (text/x-diff, attachment)]
[0002-src-buffer.c-mode-line-format-Document-o-and-q-const.patch (text/x-diff, attachment)]
[0003-Improve-docs-for-global-mode-string-M-construct.patch (text/x-diff, attachment)]
[0004-doc-lispref-modes.texi-Improve-docs-for-obsolete-m-c.patch (text/x-diff, attachment)]
[0005-src-buffer.c-mode-line-format-Reorder-and-reformat-c.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Sat, 18 Mar 2023 07:48:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: diredwolf1 <at> gmail.com, 57080 <at> debbugs.gnu.org
Subject: Re: bug#57080: 29.0.60; [PATCH] Updates to mode line construct
 documentation (was: The %m modeline construct does not work for
 emacs-lisp-mode)
Date: Sat, 18 Mar 2023 09:46:54 +0200
> Date: Sat, 18 Mar 2023 20:22:24 +1300
> From: Phil Sainty <psainty <at> orcon.net.nz>
> Cc: diredwolf1 <at> gmail.com, 57080 <at> debbugs.gnu.org
> 
> Does anyone object to me merging branch 
> fix/bug-57080-mode-line-format-docs
> ( https://lists.gnu.org/archive/html/emacs-diffs/2023-03/msg00453.html )
> to the emacs-29 branch?

It goes too far, IMO, see below.

> It addresses the issue from this bug along with several related things
> that I found in the process of looking at that.
> 
> * The %m documentation was not entirely accurate (as discussed here).

But you moved it from its place near the end of the node (as
appropriate for obsolete features) to the mainline.  Why not leave it
where it was, and just add the explanation why its usage is not
advised?

> * The %M documentation was also not up to date.
> * The %t construct was obsolete but still documented.

So let's move %t to where %m is.

> * The %o and %q constructs were lacking documentation.

In the manual? I don't see them being added there.

> * The `mode-line-format' docstring for all of the constructs was
>    not as easy to read as it could have been.

I would leave this part alone on emacs-29, and only install the
reformatting of the doc string on master.

> The final reformatting of the `mode-line-format' docstring sorts the
> constructs by letter (which makes everything easier to find); eliminates
> multiple constructs being crammed into single lines (which also makes
> everything easier to find); and rephrases some things for (IMHO) easier
> readability and comprehension.

It also makes the text taller, thus requiring a larger Help window.
Is it still reasonably readable in "emacs -Q"?

Anyway, I think this part is for master.

> I untabified the indentation, as that didn't render correctly with a
> tab-width of anything other than 8, which might be a problem for other
> docstrings as well.  Should help-mode set tab-width to 8 ??

tab-width is a user variable, so no Lisp program should set it, IMO.

Bottom line:

  . I'm okay with manual changes, modulo the movement of %m -- it
    should stay where it was.
  . I'm okay with adding %t to the manual (in the "obsolete" part).
  . I'm okay with removing %t from the doc string.
  . I'm okay with fixing the doc string of global-mode-string.
  . All the rest is okay for master.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Sat, 18 Mar 2023 08:39:01 GMT) Full text and rfc822 format available.

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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57080 <at> debbugs.gnu.org
Subject: Re: bug#57080: 29.0.60; [PATCH] Updates to mode line construct
 documentation
Date: Sat, 18 Mar 2023 21:38:16 +1300
On 2023-03-18 20:46, Eli Zaretskii wrote:
>> * The %m documentation was not entirely accurate (as discussed here).
> 
> But you moved it from its place near the end of the node (as
> appropriate for obsolete features) to the mainline.  Why not leave
> it where it was, and just add the explanation why its usage is not
> advised?

I moved it because it's still functional and so I thought it
warranted being listed in the sorted sequence between %l and %n
to make it easier to find.  To my mind this is still preferable,
but I can certainly move it back down below.


>> * The %t construct was obsolete but still documented.
> 
> So let's move %t to where %m is.

Since commit 8549f9e89bd9288c4c709d183a5bf8f07dbeed3d (in 2013)
this construct doesn't do anything at all, and the documentation
in doc/lispref/modes.texi was removed entirely at that time.
Is it still useful to document it anywhere at this point?


>> * The %o and %q constructs were lacking documentation.
> 
> In the manual? I don't see them being added there.

No, these was only missing from the docstring.  In the manual they
were documented in commit b0b02ca7f3e06d0f092df6f81babd1277bf93b0f
so this is a fixup for that commit.


>> * The `mode-line-format' docstring for all of the constructs was
>>    not as easy to read as it could have been.
> 
> I would leave this part alone on emacs-29, and only install the
> reformatting of the doc string on master.

Ok.


> It also makes the text taller, thus requiring a larger Help window.
> Is it still reasonably readable in "emacs -Q"?

I think so.  My take was that the formatting has its origins in the
days when 24-line terminals were the norm; but even in the current
state, the list of constructs is 27 lines long, so (a) we're already
past the point of anyone on a classic 24-line terminal being able to
fit that all on screen; (b) the new version is only 3 lines longer;
and (c) I think the vast majority of people will be looking at the
docstrings with many more lines than that.

I believe that the readability improvements warrant the slight
increase in line count in this instance.


> Anyway, I think this part is for master.

All good.


> Bottom line:
> 
>   . I'm okay with manual changes, modulo the movement of %m -- it
>     should stay where it was.
>   . I'm okay with adding %t to the manual (in the "obsolete" part).

Per comments above I'm not sure this will be useful, so I'll wait for
confirmation either way.

>   . I'm okay with removing %t from the doc string.
>   . I'm okay with fixing the doc string of global-mode-string.
>   . All the rest is okay for master.


Thanks Eli.

Phil





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Sat, 18 Mar 2023 08:55:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: 57080 <at> debbugs.gnu.org
Subject: Re: bug#57080: 29.0.60; [PATCH] Updates to mode line construct
 documentation
Date: Sat, 18 Mar 2023 10:54:48 +0200
> Date: Sat, 18 Mar 2023 21:38:16 +1300
> From: Phil Sainty <psainty <at> orcon.net.nz>
> Cc: 57080 <at> debbugs.gnu.org
> 
> >> * The %t construct was obsolete but still documented.
> > 
> > So let's move %t to where %m is.
> 
> Since commit 8549f9e89bd9288c4c709d183a5bf8f07dbeed3d (in 2013)
> this construct doesn't do anything at all, and the documentation
> in doc/lispref/modes.texi was removed entirely at that time.
> Is it still useful to document it anywhere at this point?

I thought you were talking about adding it (to the manual or
elsewhere)?  Are you instead suggesting to remove it from the doc
string?  That wasn't clear.

> >   . I'm okay with manual changes, modulo the movement of %m -- it
> >     should stay where it was.
> >   . I'm okay with adding %t to the manual (in the "obsolete" part).
> 
> Per comments above I'm not sure this will be useful, so I'll wait for
> confirmation either way.

What do you suggest instead? remove %t from the doc string?  That's
fine with me, on emacs-29:

> >   . I'm okay with removing %t from the doc string.
> >   . I'm okay with fixing the doc string of global-mode-string.
> >   . All the rest is okay for master.
> 
> 
> Thanks Eli.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57080; Package emacs. (Sat, 18 Mar 2023 09:26:02 GMT) Full text and rfc822 format available.

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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57080 <at> debbugs.gnu.org
Subject: Re: bug#57080: 29.0.60; [PATCH] Updates to mode line construct
 documentation
Date: Sat, 18 Mar 2023 22:25:20 +1300
On 2023-03-18 21:54, Eli Zaretskii wrote:
> I thought you were talking about adding it [%t] (to the manual or
> elsewhere)?  Are you instead suggesting to remove it from the doc
> string?

Yep, just removing it from the docstring.  That was the only place
it was still mentioned, that I could see.

> That's fine with me, on emacs-29

Thanks, will do.





Reply sent to Phil Sainty <psainty <at> orcon.net.nz>:
You have taken responsibility. (Sun, 26 Mar 2023 11:44:01 GMT) Full text and rfc822 format available.

Notification sent to diredwolf <diredwolf1 <at> gmail.com>:
bug acknowledged by developer. (Sun, 26 Mar 2023 11:44:01 GMT) Full text and rfc822 format available.

Message #48 received at 57080-done <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57080-done <at> debbugs.gnu.org
Subject: Re: bug#57080: 29.0.60; [PATCH] Updates to mode line construct
 documentation
Date: Mon, 27 Mar 2023 00:43:02 +1300
I've now installed the changes on emacs-29 and master (in
accordance with the discussion here), so I'm closing this bug.

-Phil





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 24 Apr 2023 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 2 days ago.

Previous Next


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