Subject: bug#77118: closed (Re: bug#77118: 31.0.50; help-key-binding face in help buffer)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 14 Apr 2025 10:37:02 +0000

Your bug report

#77118: 31.0.50; help-key-binding face in help buffer

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
77118: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77118
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#77118: 31.0.50; help-key-binding face in help buffer
From: Eli Zaretskii <[email-masked]>
To: Arash Esbati <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked], [email-masked], [email-masked]
Date: Mon, 14 Apr 2025 13:36:48 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Arash Esbati <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked],  [email-masked],
>   [email-masked],  [email-masked]
> Date: Mon, 14 Apr 2025 12:13:03 +0200
> 
> Stephen Berman <[email-masked]> writes:
> 
> > Thanks, done in commit d3c39fb522d.  I'll let Arash Esbati confirm the
> > fix before closing the bug.
> 
> Many thanks for installing this.  I confirm it works as expected in my
> test.  Please feel free to close this report.

Closing.

Subject: 31.0.50; help-key-binding face in help buffer
From: Arash Esbati <[email-masked]>
To: "emacs-bugs" <[email-masked]>
Date: Wed, 19 Mar 2025 14:05:21 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi all,

when I eval the following code:

--8<---------------cut here---------------start------------->8---
(let ((help-form (substitute-command-keys "\
Select with a key:
\\`h'   do this,
\\`k'   do that,
\\`RET' do nothing.")))
  (read-char-choice (substitute-command-keys
                     (format "\
This (\\`h'), That (\\`k'), Nothing (\\`RET'), Help (\\`%s'): "
                             (key-description (vector help-char))))
                    '(?h ?k ?\r)))
--8<---------------cut here---------------end--------------->8---

and do 'C-h', h, k and RET don't receive the help-key-binding face in
the help buffer which pops up.  What I see with 'emacs -Q' is attached.
Note the difference in the minibuffer.

The reason seems to be in the implementation of `help-form-show' using
`princ' which strips properties.  If this is intentional, it doesn't
match definitions of `help-form' in Emacs tree.  Take for example
dired-aux.el which pushes the string for `help-form' also through
`substitute-command-keys'[1,2,3].

In case this report is confirmed, a possible solution is provided
here[4].

Best, Arash

Footnotes:
[1]  https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/dired-aux.el#n2489
[2]  https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/dired-aux.el#n3091
[3]  https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/dired-aux.el#n3227
[4]  https://lists.gnu.org/archive/html/help-gnu-emacs/2025-03/msg00192.html

In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.3.0, NS
 appkit-2575.40 Version 15.3.2 (Build 24D81)) of 2025-03-17 built on
 MacMutant.local
Repository revision: acb96a5ca8ac3bef80ca2ff1496cacb3ab57c87a
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2575
System Description:  macOS 15.3.2

Configured using:
 'configure --with-ns --with-threads --with-modules
 --with-native-compilation --without-compress-install --without-harfbuzz
 --without-mailutils --without-pop 'CFLAGS=-O2 -g0 -pipe '
 'CPPFLAGS=-I/opt/homebrew/Cellar/gcc/14.2.0_1/include
 -I/opt/homebrew/Cellar/libgccjit/14.2.0_1/include
 -I/opt/homebrew/Cellar/gmp/6.3.0/include
 -I/opt/homebrew/Cellar/libxml2/2.13.6_1/include '
 'LDFLAGS=-L/opt/homebrew/Cellar/gcc/14.2.0_1/lib/gcc/current
 -L/opt/homebrew/Cellar/gmp/6.3.0/lib
 -L/opt/homebrew/Cellar/libxml2/2.13.6_1/lib ''