GNU bug report logs - #64799
[PATCH] Add 'project-prompt-key' face

Previous Next

Package: emacs;

Reported by: Protesilaos Stavrou <info <at> protesilaos.com>

Date: Sun, 23 Jul 2023 08:20:02 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

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 64799 in the body.
You can then email your comments to 64799 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#64799; Package emacs. (Sun, 23 Jul 2023 08:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Protesilaos Stavrou <info <at> protesilaos.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 Jul 2023 08:20:02 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add 'project-prompt-key' face
Date: Sun, 23 Jul 2023 11:19:23 +0300
[Message part 1 (text/plain, inline)]
Dear maintainers,

I noticed that the project switching dispatch menu hardcodes its face to
'bold'.  Adding a new face here allows themes/users to customise that
style (e.g. to inherit the 'help-key-binding' face).

This is the least intrusive change, though I would personally also
remove the square brackets from the format specifier.

What do you think?

All the best,
Protesilaos (or simply "Prot")

-- 
Protesilaos Stavrou
https://protesilaos.com
[0001-Add-project-prompt-key-face.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Sun, 23 Jul 2023 13:42:01 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Sun, 23 Jul 2023 13:41:43 +0000
Protesilaos Stavrou <info <at> protesilaos.com> writes:

> Dear maintainers,
>
> I noticed that the project switching dispatch menu hardcodes its face to
> 'bold'.  Adding a new face here allows themes/users to customise that
> style (e.g. to inherit the 'help-key-binding' face).

Does this even need a separate face, or shouldn't `help-key-binding' be
reused directly?

> This is the least intrusive change, though I would personally also
> remove the square brackets from the format specifier.
>
> What do you think?
>
> All the best,
> Protesilaos (or simply "Prot")
>
> -- 
> Protesilaos Stavrou
> https://protesilaos.com
>
>>From fcef17068821bd05e281dc75452c807bbc27c8dd Mon Sep 17 00:00:00 2001
> Message-ID: <fcef17068821bd05e281dc75452c807bbc27c8dd.1690099845.git.info <at> protesilaos.com>
> From: Protesilaos Stavrou <info <at> protesilaos.com>
> Date: Sun, 23 Jul 2023 10:55:37 +0300
> Subject: [PATCH] Add 'project-prompt-key' face
>
> * etc/NEWS: Announce the face.
> * lisp/progmodes/project.el (project-prompt-key): Define the face.
> (project--keymap-prompt): Use the face.
> ---
>  etc/NEWS                  | 4 ++++
>  lisp/progmodes/project.el | 5 ++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/etc/NEWS b/etc/NEWS
> index 5883b4df2a7..70d0bf18f50 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -82,6 +82,10 @@ This allows the user to customize the prompt that is appended by
>  This is used for displaying the time and date components of
>  'display-time-mode'.
>  
> +---
> +** New face 'project-prompt-key'.
> +This is used in the Project switch commands prompt.
> +
>  ---
>  ** New icon images for general use.
>  Several symbolic icons are added to "etc/images/symbols", including
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index 03ed966cc45..c2deec7c38d 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -1821,6 +1821,9 @@ (defcustom project-switch-use-entire-map nil
>    :group 'project
>    :version "28.1")
>  
> +(defface project-prompt-key '((t :inherit bold))
> +  "Face for keys in the Project switch commands prompt.")
> +
>  (defun project--keymap-prompt ()
>    "Return a prompt for the project switching dispatch menu."
>    (mapconcat
> @@ -1834,7 +1837,7 @@ (defun project--keymap-prompt ()
>                      (vector key)
>                    (where-is-internal cmd (list project-prefix-map) t))))
>         (format "[%s] %s"
> -               (propertize (key-description key) 'face 'bold)
> +               (propertize (key-description key) 'face 'project-prompt-key)
>                 label)))
>     project-switch-commands
>     "  "))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Sun, 23 Jul 2023 13:50:02 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Sun, 23 Jul 2023 16:49:27 +0300
> From: Philip Kaludercic <philipk <at> posteo.net>
> Date: Sun, 23 Jul 2023 13:41:43 +0000
>
> Protesilaos Stavrou <info <at> protesilaos.com> writes:
>
>> Dear maintainers,
>>
>> I noticed that the project switching dispatch menu hardcodes its face to
>> 'bold'.  Adding a new face here allows themes/users to customise that
>> style (e.g. to inherit the 'help-key-binding' face).
>
> Does this even need a separate face, or shouldn't `help-key-binding' be
> reused directly?

That would be my choice, though also with the removal of the square
brackets around it.  The proposed patch is for backward-compatibility.

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Sun, 23 Jul 2023 14:00:02 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Sun, 23 Jul 2023 13:59:41 +0000
Protesilaos Stavrou <info <at> protesilaos.com> writes:

>> From: Philip Kaludercic <philipk <at> posteo.net>
>> Date: Sun, 23 Jul 2023 13:41:43 +0000
>>
>> Protesilaos Stavrou <info <at> protesilaos.com> writes:
>>
>>> Dear maintainers,
>>>
>>> I noticed that the project switching dispatch menu hardcodes its face to
>>> 'bold'.  Adding a new face here allows themes/users to customise that
>>> style (e.g. to inherit the 'help-key-binding' face).
>>
>> Does this even need a separate face, or shouldn't `help-key-binding' be
>> reused directly?
>
> That would be my choice, though also with the removal of the square
> brackets around it.  The proposed patch is for backward-compatibility.

Backwards-compatible to what?  Can someone depend on this specific
behaviour?  I think it would be better to replace the current code with
what you are suggesting, as a step towards ensuring a more consistent
user interface.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Mon, 24 Jul 2023 05:54:02 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Mon, 24 Jul 2023 08:53:20 +0300
> From: Philip Kaludercic <philipk <at> posteo.net>
> Date: Sun, 23 Jul 2023 13:59:41 +0000

> [... 14 lines elided]

>>> Does this even need a separate face, or shouldn't `help-key-binding' be
>>> reused directly?
>>
>> That would be my choice, though also with the removal of the square
>> brackets around it.  The proposed patch is for backward-compatibility.
>
> Backwards-compatible to what?

Just so that existing users do not complain.

> Can someone depend on this specific behaviour?

No, but the appearance still comes with certain expectations.  Plus,
there is this at the top of the file:

    ;; This is a GNU ELPA :core package.  Avoid using functionality that
    ;; not compatible with the version of Emacs recorded above

The required Emacs version is 26.1, while that of 'help-key-binding' is
28.1.

Perhaps a user option for the whole 'format' would be better?

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Tue, 25 Jul 2023 01:57:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Protesilaos Stavrou <info <at> protesilaos.com>,
 Philip Kaludercic <philipk <at> posteo.net>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Tue, 25 Jul 2023 04:56:27 +0300
On 24/07/2023 08:53, Protesilaos Stavrou wrote:
>> From: Philip Kaludercic <philipk <at> posteo.net>
>> Date: Sun, 23 Jul 2023 13:59:41 +0000
> 
>> [... 14 lines elided]
> 
>>>> Does this even need a separate face, or shouldn't `help-key-binding' be
>>>> reused directly?
>>>
>>> That would be my choice, though also with the removal of the square
>>> brackets around it.  The proposed patch is for backward-compatibility.
>>
>> Backwards-compatible to what?
> 
> Just so that existing users do not complain.
> 
>> Can someone depend on this specific behaviour?
> 
> No, but the appearance still comes with certain expectations.  Plus,
> there is this at the top of the file:
> 
>      ;; This is a GNU ELPA :core package.  Avoid using functionality that
>      ;; not compatible with the version of Emacs recorded above
> 
> The required Emacs version is 26.1, while that of 'help-key-binding' is
> 28.1.

Indeed, so if we switch to it in project.el, it will need some polyfill 
for Emacs 26-27.

> Perhaps a user option for the whole 'format' would be better?

We can add a user option. But while we could also apply 'face' property 
on that option's string value, that doesn't seem like a very 
user-friendly approach toward someone who will want to change the face 
used (it will require some Lisp knowledge from the user).

But a user option to change how the prompt text is constructed -- why 
not. E.g. one defaulting to "[%s] %s".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Tue, 25 Jul 2023 06:40:01 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Tue, 25 Jul 2023 06:39:26 +0000
Dmitry Gutov <dmitry <at> gutov.dev> writes:

> On 24/07/2023 08:53, Protesilaos Stavrou wrote:
>>> From: Philip Kaludercic <philipk <at> posteo.net>
>>> Date: Sun, 23 Jul 2023 13:59:41 +0000
>> 
>>> [... 14 lines elided]
>> 
>>>>> Does this even need a separate face, or shouldn't `help-key-binding' be
>>>>> reused directly?
>>>>
>>>> That would be my choice, though also with the removal of the square
>>>> brackets around it.  The proposed patch is for backward-compatibility.
>>>
>>> Backwards-compatible to what?
>> Just so that existing users do not complain.
>> 
>>> Can someone depend on this specific behaviour?
>> No, but the appearance still comes with certain expectations.  Plus,
>> there is this at the top of the file:
>>      ;; This is a GNU ELPA :core package.  Avoid using functionality
>> that
>>      ;; not compatible with the version of Emacs recorded above
>> The required Emacs version is 26.1, while that of 'help-key-binding'
>> is
>> 28.1.
>
> Indeed, so if we switch to it in project.el, it will need some
> polyfill for Emacs 26-27.

If there is interest, this face could be added to the Compat package, if
it would be OK to add Compat as a dependency for project.el on ELPA
(this would also mean that project.el wouldn't have to use a custom
`project--buffer-check'/`buffer-match-p' implementation).

Alternatively, we could add a version/facep check and always prefer
`help-key-binding' if it is available, otherwise fall-back to the
current option.

>> Perhaps a user option for the whole 'format' would be better?
>
> We can add a user option. But while we could also apply 'face'
> property on that option's string value, that doesn't seem like a very
> user-friendly approach toward someone who will want to change the face
> used (it will require some Lisp knowledge from the user).
>
> But a user option to change how the prompt text is constructed -- why
> not. E.g. one defaulting to "[%s] %s".

Is there really such a wide range of options that users might be
interested in here?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Tue, 25 Jul 2023 13:06:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Tue, 25 Jul 2023 16:05:15 +0300
On 25/07/2023 09:39, Philip Kaludercic wrote:

>> Indeed, so if we switch to it in project.el, it will need some
>> polyfill for Emacs 26-27.
> 
> If there is interest, this face could be added to the Compat package, if
> it would be OK to add Compat as a dependency for project.el on ELPA
> (this would also mean that project.el wouldn't have to use a custom
> `project--buffer-check'/`buffer-match-p' implementation).

Good suggestion, but let's hold off on that still.

> Alternatively, we could add a version/facep check and always prefer
> `help-key-binding' if it is available, otherwise fall-back to the
> current option.

That works for me.

>>> Perhaps a user option for the whole 'format' would be better?
>>
>> We can add a user option. But while we could also apply 'face'
>> property on that option's string value, that doesn't seem like a very
>> user-friendly approach toward someone who will want to change the face
>> used (it will require some Lisp knowledge from the user).
>>
>> But a user option to change how the prompt text is constructed -- why
>> not. E.g. one defaulting to "[%s] %s".
> 
> Is there really such a wide range of options that users might be
> interested in here?

Protesilaos wanted to use a different format?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 26 Jul 2023 04:51:02 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>, Philip Kaludercic <philipk <at> posteo.net>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 26 Jul 2023 07:50:26 +0300
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> Date: Tue, 25 Jul 2023 16:05:15 +0300

> [... 13 lines elided]

>> Alternatively, we could add a version/facep check and always prefer
>> `help-key-binding' if it is available, otherwise fall-back to the
>> current option.
>
> That works for me.

Me too!

>>>> Perhaps a user option for the whole 'format' would be better?
>>>
>>> We can add a user option. But while we could also apply 'face'
>>> property on that option's string value, that doesn't seem like a very
>>> user-friendly approach toward someone who will want to change the face
>>> used (it will require some Lisp knowledge from the user).
>>>
>>> But a user option to change how the prompt text is constructed -- why
>>> not. E.g. one defaulting to "[%s] %s".
>> 
>> Is there really such a wide range of options that users might be
>> interested in here?
>
> Protesilaos wanted to use a different format?

For my use, and Emacs 28+, I want this:

    (format "%s %s"
               (propertize (key-description key) 'face 'project-prompt-key)
               label)

The reason I mentioned the possibility of a user option is because
without the square brackets the bold face will not have the same effect
as the current design.  The square brackets help add structure and make
it easier to identify the keys.  The use of 'bold' without the square
brackets may make it more difficult for users to spot the keys.

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 26 Jul 2023 11:11:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: dmitry <at> gutov.dev, philipk <at> posteo.net, 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 26 Jul 2023 14:10:53 +0300
> Cc: 64799 <at> debbugs.gnu.org
> From: Protesilaos Stavrou <info <at> protesilaos.com>
> Date: Wed, 26 Jul 2023 07:50:26 +0300
> 
> >>> But a user option to change how the prompt text is constructed -- why
> >>> not. E.g. one defaulting to "[%s] %s".
> >> 
> >> Is there really such a wide range of options that users might be
> >> interested in here?
> >
> > Protesilaos wanted to use a different format?
> 
> For my use, and Emacs 28+, I want this:
> 
>     (format "%s %s"
>                (propertize (key-description key) 'face 'project-prompt-key)
>                label)
> 
> The reason I mentioned the possibility of a user option is because
> without the square brackets the bold face will not have the same effect
> as the current design.  The square brackets help add structure and make
> it easier to identify the keys.  The use of 'bold' without the square
> brackets may make it more difficult for users to spot the keys.

Beware: the 'bold' face changes the metrics of the font glyphs (wrt
the 'medium' variant), and at least with some fonts could cause a
small 1- or 2-pixel vertical resize of the mini-window, which is
generally distracting and even annoying.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Thu, 27 Jul 2023 01:02:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>, Protesilaos Stavrou <info <at> protesilaos.com>
Cc: philipk <at> posteo.net, 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Thu, 27 Jul 2023 04:01:17 +0300
On 26/07/2023 14:10, Eli Zaretskii wrote:
> Beware: the 'bold' face changes the metrics of the font glyphs (wrt
> the 'medium' variant), and at least with some fonts could cause a
> small 1- or 2-pixel vertical resize of the mini-window, which is
> generally distracting and even annoying.

Only non-monospaced font, though, right? Or ones without a 'bold' variant.

Anyway, we're talking about switching from 'bold' to 'help-key-binding', 
which uses the default weight.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Thu, 27 Jul 2023 01:29:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Protesilaos Stavrou <info <at> protesilaos.com>,
 Philip Kaludercic <philipk <at> posteo.net>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Thu, 27 Jul 2023 04:28:08 +0300
On 26/07/2023 07:50, Protesilaos Stavrou wrote:
> For my use, and Emacs 28+, I want this:
> 
>      (format "%s %s"
>                 (propertize (key-description key) 'face 'project-prompt-key)
>                 label)
> 
> The reason I mentioned the possibility of a user option is because
> without the square brackets the bold face will not have the same effect
> as the current design.  The square brackets help add structure and make
> it easier to identify the keys.  The use of 'bold' without the square
> brackets may make it more difficult for users to spot the keys.

The change in format seems to go hand-in-hand with the change in face, 
though, because help-key-binding has a box already.

Does this look good to everybody?

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index d482cc24d70..3611757fb82 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1781,9 +1781,13 @@ project--keymap-prompt
      (let ((key (if key
                     (vector key)
                   (where-is-internal cmd (list project-prefix-map) t))))
-       (format "[%s] %s"
-               (propertize (key-description key) 'face 'bold)
-               label)))
+       (if (facep 'help-key-binding)
+           (format "%s %s"
+                   (propertize (key-description key) 'face 
'help-key-binding)
+                   label)
+         (format "[%s] %s"
+                 (propertize (key-description key) 'face 'bold)
+                 label))))
    project-switch-commands
    "  "))






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Thu, 27 Jul 2023 05:29:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: info <at> protesilaos.com, 64799 <at> debbugs.gnu.org, philipk <at> posteo.net
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Thu, 27 Jul 2023 08:28:58 +0300
> Date: Thu, 27 Jul 2023 04:01:17 +0300
> Cc: philipk <at> posteo.net, 64799 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> On 26/07/2023 14:10, Eli Zaretskii wrote:
> > Beware: the 'bold' face changes the metrics of the font glyphs (wrt
> > the 'medium' variant), and at least with some fonts could cause a
> > small 1- or 2-pixel vertical resize of the mini-window, which is
> > generally distracting and even annoying.
> 
> Only non-monospaced font, though, right? Or ones without a 'bold' variant.

No, not only those.  I'm talking about the _vertical_ metrics, so
whether the font is monospaced is not relevant.  Try marking files for
deletion in Dired, and you will see that, at least with some fonts and
some sizes.  Here on MS-Windows the default face's font (Courier New)
does that, for some sizes of the font.  I have customized
eldoc-highlight-function-argument to use 'underline' instead of 'bold'
for that very reason.

> Anyway, we're talking about switching from 'bold' to 'help-key-binding', 
> which uses the default weight.

That's fine.  I was under the impression that 'bold' is also being
considered, and wanted to warn about this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Fri, 28 Jul 2023 00:58:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: info <at> protesilaos.com, 64799 <at> debbugs.gnu.org, philipk <at> posteo.net
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Fri, 28 Jul 2023 03:56:56 +0300
On 27/07/2023 08:28, Eli Zaretskii wrote:
>> Date: Thu, 27 Jul 2023 04:01:17 +0300
>> Cc:philipk <at> posteo.net,64799 <at> debbugs.gnu.org
>> From: Dmitry Gutov<dmitry <at> gutov.dev>
>>
>> On 26/07/2023 14:10, Eli Zaretskii wrote:
>>> Beware: the 'bold' face changes the metrics of the font glyphs (wrt
>>> the 'medium' variant), and at least with some fonts could cause a
>>> small 1- or 2-pixel vertical resize of the mini-window, which is
>>> generally distracting and even annoying.
>> Only non-monospaced font, though, right? Or ones without a 'bold' variant.
> No, not only those.  I'm talking about the_vertical_  metrics, so
> whether the font is monospaced is not relevant.  Try marking files for
> deletion in Dired, and you will see that, at least with some fonts and
> some sizes.  Here on MS-Windows the default face's font (Courier New)
> does that, for some sizes of the font.  I have customized
> eldoc-highlight-function-argument to use 'underline' instead of 'bold'
> for that very reason.

Good to know. That does sound problematic (e.g. when used with Eldoc, 
contributing to extra jumpiness).

FWIW, I haven't been able to reproduce this here on GNU/Linux with 
several sizes of Courier New that I tried.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Fri, 28 Jul 2023 03:35:02 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>, Philip Kaludercic <philipk <at> posteo.net>
Cc: 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Fri, 28 Jul 2023 06:33:56 +0300
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> Date: Thu, 27 Jul 2023 04:28:08 +0300

> [... 14 lines elided]

> The change in format seems to go hand-in-hand with the change in face, 
> though, because help-key-binding has a box already.
>
> Does this look good to everybody?
>
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index d482cc24d70..3611757fb82 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -1781,9 +1781,13 @@ project--keymap-prompt
>        (let ((key (if key
>                       (vector key)
>                     (where-is-internal cmd (list project-prefix-map) t))))
> -       (format "[%s] %s"
> -               (propertize (key-description key) 'face 'bold)
> -               label)))
> +       (if (facep 'help-key-binding)
> +           (format "%s %s"
> +                   (propertize (key-description key) 'face 
> 'help-key-binding)
> +                   label)
> +         (format "[%s] %s"
> +                 (propertize (key-description key) 'face 'bold)
> +                 label))))
>      project-switch-commands
>      "  "))

I am fine with this approach, thank you!

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Fri, 28 Jul 2023 05:51:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: info <at> protesilaos.com, 64799 <at> debbugs.gnu.org, philipk <at> posteo.net
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Fri, 28 Jul 2023 08:51:07 +0300
> Date: Fri, 28 Jul 2023 03:56:56 +0300
> Cc: info <at> protesilaos.com, philipk <at> posteo.net, 64799 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> On 27/07/2023 08:28, Eli Zaretskii wrote:
> >> Date: Thu, 27 Jul 2023 04:01:17 +0300
> >> Cc:philipk <at> posteo.net,64799 <at> debbugs.gnu.org
> >> From: Dmitry Gutov<dmitry <at> gutov.dev>
> >>
> >> On 26/07/2023 14:10, Eli Zaretskii wrote:
> >>> Beware: the 'bold' face changes the metrics of the font glyphs (wrt
> >>> the 'medium' variant), and at least with some fonts could cause a
> >>> small 1- or 2-pixel vertical resize of the mini-window, which is
> >>> generally distracting and even annoying.
> >> Only non-monospaced font, though, right? Or ones without a 'bold' variant.
> > No, not only those.  I'm talking about the_vertical_  metrics, so
> > whether the font is monospaced is not relevant.  Try marking files for
> > deletion in Dired, and you will see that, at least with some fonts and
> > some sizes.  Here on MS-Windows the default face's font (Courier New)
> > does that, for some sizes of the font.  I have customized
> > eldoc-highlight-function-argument to use 'underline' instead of 'bold'
> > for that very reason.
> 
> Good to know. That does sound problematic (e.g. when used with Eldoc, 
> contributing to extra jumpiness).
> 
> FWIW, I haven't been able to reproduce this here on GNU/Linux with 
> several sizes of Courier New that I tried.

It could be a bug in the fonts on my system, for all I know.  AFAIK,
Courier New was modified significantly in recent versions of Windows,
so maybe they fixed this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Fri, 28 Jul 2023 06:36:01 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Fri, 28 Jul 2023 06:35:24 +0000
Dmitry Gutov <dmitry <at> gutov.dev> writes:

> On 26/07/2023 07:50, Protesilaos Stavrou wrote:
>> For my use, and Emacs 28+, I want this:
>>      (format "%s %s"
>>                 (propertize (key-description key) 'face 'project-prompt-key)
>>                 label)
>> The reason I mentioned the possibility of a user option is because
>> without the square brackets the bold face will not have the same effect
>> as the current design.  The square brackets help add structure and make
>> it easier to identify the keys.  The use of 'bold' without the square
>> brackets may make it more difficult for users to spot the keys.
>
> The change in format seems to go hand-in-hand with the change in face,
> though, because help-key-binding has a box already.
>
> Does this look good to everybody?

Looks good to me too, but I haven't tried it out.

> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index d482cc24d70..3611757fb82 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -1781,9 +1781,13 @@ project--keymap-prompt
>       (let ((key (if key
>                      (vector key)
>                    (where-is-internal cmd (list project-prefix-map) t))))
> -       (format "[%s] %s"
> -               (propertize (key-description key) 'face 'bold)
> -               label)))
> +       (if (facep 'help-key-binding)
> +           (format "%s %s"
> +                   (propertize (key-description key) 'face
> 'help-key-binding)
> +                   label)
> +         (format "[%s] %s"
> +                 (propertize (key-description key) 'face 'bold)
> +                 label))))
>     project-switch-commands
>     "  "))




Reply sent to Dmitry Gutov <dmitry <at> gutov.dev>:
You have taken responsibility. (Sat, 12 Aug 2023 00:36:02 GMT) Full text and rfc822 format available.

Notification sent to Protesilaos Stavrou <info <at> protesilaos.com>:
bug acknowledged by developer. (Sat, 12 Aug 2023 00:36:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Protesilaos Stavrou <info <at> protesilaos.com>,
 Philip Kaludercic <philipk <at> posteo.net>
Cc: 64799-done <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Sat, 12 Aug 2023 03:35:34 +0300
Version: 30.1

On 28/07/2023 06:33, Protesilaos Stavrou wrote:
>> From: Dmitry Gutov<dmitry <at> gutov.dev>
>> Date: Thu, 27 Jul 2023 04:28:08 +0300
>> [... 14 lines elided]
>> The change in format seems to go hand-in-hand with the change in face,
>> though, because help-key-binding has a box already.
>>
>> Does this look good to everybody?
>>
>> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
>> index d482cc24d70..3611757fb82 100644
>> --- a/lisp/progmodes/project.el
>> +++ b/lisp/progmodes/project.el
>> @@ -1781,9 +1781,13 @@ project--keymap-prompt
>>         (let ((key (if key
>>                        (vector key)
>>                      (where-is-internal cmd (list project-prefix-map) t))))
>> -       (format "[%s] %s"
>> -               (propertize (key-description key) 'face 'bold)
>> -               label)))
>> +       (if (facep 'help-key-binding)
>> +           (format "%s %s"
>> +                   (propertize (key-description key) 'face
>> 'help-key-binding)
>> +                   label)
>> +         (format "[%s] %s"
>> +                 (propertize (key-description key) 'face 'bold)
>> +                 label))))
>>       project-switch-commands
>>       "  "))
> I am fine with this approach, thank you!

Now pushed to master, thanks all!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 10:36:02 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 64799 <at> debbugs.gnu.org,
 Philip Kaludercic <philipk <at> posteo.net>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 16:05:14 +0530
[வியாழன் ஜூலை 27, 2023] Dmitry Gutov wrote:

> On 26/07/2023 07:50, Protesilaos Stavrou wrote:
>> For my use, and Emacs 28+, I want this:
>>      (format "%s %s"
>>                 (propertize (key-description key) 'face 'project-prompt-key)
>>                 label)
>> The reason I mentioned the possibility of a user option is because
>> without the square brackets the bold face will not have the same effect
>> as the current design.  The square brackets help add structure and make
>> it easier to identify the keys.  The use of 'bold' without the square
>> brackets may make it more difficult for users to spot the keys.
>
> The change in format seems to go hand-in-hand with the change in face,
> though, because help-key-binding has a box already.
>
> Does this look good to everybody?

Sorry for replying so late.  I make help-key-binding look the same as
the default face, and now I can't distinguish the keys from the labels
anymore since the former aren't bold anymore.  :-(
Can there a way to get them back?  If you think it would be too ugly,
then I can locally patch the function.

[ FWIW, I liked the bold approach since it is similar to what
  read-multiple-choice does.  ]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 12:19:01 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: Visuwesh <visuweshm <at> gmail.com>, Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 12:18:02 +0000
Would remapping help-key-binding to bold be a possible solution?

On August 23, 2023 12:35:14 PM GMT+02:00, Visuwesh <visuweshm <at> gmail.com> wrote:
>[வியாழன் ஜூலை 27, 2023] Dmitry Gutov wrote:
>
>> On 26/07/2023 07:50, Protesilaos Stavrou wrote:
>>> For my use, and Emacs 28+, I want this:
>>>      (format "%s %s"
>>>                 (propertize (key-description key) 'face 'project-prompt-key)
>>>                 label)
>>> The reason I mentioned the possibility of a user option is because
>>> without the square brackets the bold face will not have the same effect
>>> as the current design.  The square brackets help add structure and make
>>> it easier to identify the keys.  The use of 'bold' without the square
>>> brackets may make it more difficult for users to spot the keys.
>>
>> The change in format seems to go hand-in-hand with the change in face,
>> though, because help-key-binding has a box already.
>>
>> Does this look good to everybody?
>
>Sorry for replying so late.  I make help-key-binding look the same as
>the default face, and now I can't distinguish the keys from the labels
>anymore since the former aren't bold anymore.  :-(
>Can there a way to get them back?  If you think it would be too ugly,
>then I can locally patch the function.
>
>[ FWIW, I liked the bold approach since it is similar to what
>  read-multiple-choice does.  ]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 12:46:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Philip Kaludercic <philipk <at> posteo.net>, Visuwesh <visuweshm <at> gmail.com>
Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 64799 <at> debbugs.gnu.org
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 15:44:52 +0300
On 23/08/2023 15:18, Philip Kaludercic wrote:
> Would remapping help-key-binding to bold be a possible solution?

In one specific buffer? Through a hook or something?

It seems to me Visuwesh wants the brackets back as well. As user option 
could do that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 14:14:02 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 19:43:18 +0530
[புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:

> On 23/08/2023 15:18, Philip Kaludercic wrote:
>> Would remapping help-key-binding to bold be a possible solution?

I hope not globally.

> In one specific buffer? Through a hook or something?

I was first thinking of writing an advice project--keymap-prompt to
temporarily advice facep to return nil always in my init.el...

> It seems to me Visuwesh wants the brackets back as well. As user
> option could do that.

I would like to have it, yes.  I am so bad at picking up different
typefaces _and_ colours that if I don't have extra characters around, I
fail to recognise the emphasis.  It is embarrassing, really.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 15:26:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 18:24:52 +0300
On 23/08/2023 17:13, Visuwesh wrote:
> [புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:
> 
>> On 23/08/2023 15:18, Philip Kaludercic wrote:
>>> Would remapping help-key-binding to bold be a possible solution?
> 
> I hope not globally.
> 
>> In one specific buffer? Through a hook or something?
> 
> I was first thinking of writing an advice project--keymap-prompt to
> temporarily advice facep to return nil always in my init.el...

We can add an option, no problem.

>> It seems to me Visuwesh wants the brackets back as well. As user
>> option could do that.
> 
> I would like to have it, yes.  I am so bad at picking up different
> typefaces _and_ colours that if I don't have extra characters around, I
> fail to recognise the emphasis.  It is embarrassing, really.

Could you explain, then, why you customized help-key-binding to look 
like default? For example, the below customization would make it 
relatively close to how brackets look (but of course not exactly the same):

(set-face-attribute 'help-key-binding nil
                    :box '(:color "blue" :style released-button 
:line-width (6 . 0)))

And the two places where this face is most prominently used (the one 
under discussion, and 'M-x describe-bindings' output) seem to use the 
face fairly similarly, so it seems to make sense, no?

Anyway, if you want the option, can you suggest how it will be called? 
Will it be just boolean?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 15:37:02 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 21:05:51 +0530
[புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:

> On 23/08/2023 17:13, Visuwesh wrote:
>> [புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:
>> 
>>> On 23/08/2023 15:18, Philip Kaludercic wrote:
>>>> Would remapping help-key-binding to bold be a possible solution?
>> I hope not globally.
>> 
>>> In one specific buffer? Through a hook or something?
>> I was first thinking of writing an advice project--keymap-prompt to
>> temporarily advice facep to return nil always in my init.el...
>
> We can add an option, no problem.

Thanks!

>>> It seems to me Visuwesh wants the brackets back as well. As user
>>> option could do that.
>> I would like to have it, yes.  I am so bad at picking up different
>> typefaces _and_ colours that if I don't have extra characters around, I
>> fail to recognise the emphasis.  It is embarrassing, really.
>
> Could you explain, then, why you customized help-key-binding to look
> like default?

I simply think it makes the text look too busy.  I find it unnecessary
to distinguish keys in *Help* buffers (and most other places), for
example.

> For example, the below customization would make it relatively close to
> how brackets look (but of course not exactly the same):
>
> (set-face-attribute 'help-key-binding nil
>                     :box '(:color "blue" :style released-button
>                     :line-width (6 . 0)))
>
> And the two places where this face is most prominently used (the one
> under discussion, and 'M-x describe-bindings' output) seem to use the
> face fairly similarly, so it seems to make sense, no?

See above.  C-h b IMHO is too ugly with such a setting.

> Anyway, if you want the option, can you suggest how it will be called?
> Will it be just boolean?

A boolean option will be fine.  The facep condition can then be changed
to (and NEW-OPTION (facep 'help-key-binding)).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 15:38:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 18:37:23 +0300
On 23/08/2023 18:35, Visuwesh wrote:
>> Anyway, if you want the option, can you suggest how it will be called?
>> Will it be just boolean?
> A boolean option will be fine.  The facep condition can then be changed
> to (and NEW-OPTION (facep 'help-key-binding)).

Any ideas for the name?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 15:47:02 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 21:15:50 +0530
[புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:

> On 23/08/2023 18:35, Visuwesh wrote:
>>> Anyway, if you want the option, can you suggest how it will be called?
>>> Will it be just boolean?
>> A boolean option will be fine.  The facep condition can then be changed
>> to (and NEW-OPTION (facep 'help-key-binding)).
>
> Any ideas for the name?

project-prompt-key-use-bold-face?  I am unfortunately terrible at naming
things.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 16:42:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 19:40:34 +0300
On 23/08/2023 18:45, Visuwesh wrote:
> [புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:
> 
>> On 23/08/2023 18:35, Visuwesh wrote:
>>>> Anyway, if you want the option, can you suggest how it will be called?
>>>> Will it be just boolean?
>>> A boolean option will be fine.  The facep condition can then be changed
>>> to (and NEW-OPTION (facep 'help-key-binding)).
>> Any ideas for the name?
> project-prompt-key-use-bold-face?  I am unfortunately terrible at naming
> things.

Ok, I've added project-key-prompt-style.

Please test whenever convenient.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Wed, 23 Aug 2023 17:37:01 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Wed, 23 Aug 2023 23:06:34 +0530
[புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:

> On 23/08/2023 18:45, Visuwesh wrote:
>> [புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:
>> 
>>> On 23/08/2023 18:35, Visuwesh wrote:
>>>>> Anyway, if you want the option, can you suggest how it will be called?
>>>>> Will it be just boolean?
>>>> A boolean option will be fine.  The facep condition can then be changed
>>>> to (and NEW-OPTION (facep 'help-key-binding)).
>>> Any ideas for the name?
>> project-prompt-key-use-bold-face?  I am unfortunately terrible at naming
>> things.
>
> Ok, I've added project-key-prompt-style.
>
> Please test whenever convenient.

Thanks, it works as expected.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Thu, 24 Aug 2023 12:00:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>, Visuwesh <visuweshm <at> gmail.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Thu, 24 Aug 2023 08:59:13 -0300
Dmitry Gutov <dmitry <at> gutov.dev> writes:

> On 23/08/2023 18:45, Visuwesh wrote:
>> [புதன் ஆகஸ்ட் 23, 2023] Dmitry Gutov wrote:
>>
>>> On 23/08/2023 18:35, Visuwesh wrote:
>>>>> Anyway, if you want the option, can you suggest how it will be 
called?
>>>>> Will it be just boolean?
>>>> A boolean option will be fine.  The facep condition can then be 
changed
>>>> to (and NEW-OPTION (facep 'help-key-binding)).
>>> Any ideas for the name?
>> project-prompt-key-use-bold-face?  I am unfortunately terrible at naming
>> things.
>
> Ok, I've added project-key-prompt-style.
>
> Please test whenever convenient.

Hi Dmitry,

> (defcustom project-key-prompt-style (if (facep 'help-key-binding)
>                                         t
>                                       'brackets)
>   "Which presentation to use when asking to choose a command by key.
>
> When `brackets', use text brackets and `bold' for the character.
> Otherwise, use the face `help-key-binding' in the prompt."
>   :type 'boolean
>   :group 'project
>   :version "30.1")

Shouldn't the :type be a choice between t and brackets?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64799; Package emacs. (Thu, 24 Aug 2023 12:36:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 64799 <at> debbugs.gnu.org,
 Protesilaos Stavrou <info <at> protesilaos.com>, Visuwesh <visuweshm <at> gmail.com>
Subject: Re: bug#64799: [PATCH] Add 'project-prompt-key' face
Date: Thu, 24 Aug 2023 15:34:57 +0300
On 24/08/2023 14:59, Mauro Aranda wrote:
> Shouldn't the :type be a choice between t and brackets?

Thanks! Fixed.




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

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

Previous Next


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