GNU bug report logs - #71718
Unicode symbols to represent which key special keys

Previous Next

Package: emacs;

Reported by: प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com>

Date: Sat, 22 Jun 2024 11:14:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 71718 AT debbugs.gnu.org.

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#71718; Package emacs. (Sat, 22 Jun 2024 11:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 22 Jun 2024 11:14:02 GMT) Full text and rfc822 format available.

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

From: प्रद्युम्न परांजपे
 <pradyparanjpe <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Unicode symbols to represent which key special keys
Date: Sat, 22 Jun 2024 14:31:15 +0530
[Message part 1 (text/plain, inline)]
Tags: patch

This patch corresponds to the pull request #372
<https://github.com/justbur/emacs-which-key/pull/372>.

This is a proposed feature enhancement in which-key to allow
propertized special key: a single user-defined unicode character that
will replace special keys such as SPC, TAB, RET, ESC, DEL, backspace, ...

Commit:

    Unicode symbols to represent which key special keys

    * lisp/which-key.el (which-key-speical-keys):Use
    symbols to represent special keys.  If value of
    ``which-key-special-keys`` is an *alist* of cons
    cells, whose cars are special keys such as SPC,
    TAB,  ... and the cdrs are symbol strings, replace
    the special keys with corresponding symbols.

    For backward-compatibility, if
    ``which-key-special-keys`` is an ordinary list of
    keys, old logic of truncation to single character
    works.


In GNU Emacs 29.3.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.42, cairo version 1.18.0) of 2024-06-04 built on
 ekadanta.anubandha.home
Repository revision: 00360258caddc0d8cf29ba3d9971125a06f8959b
Repository branch: emacs-29
System Description: Arch Linux

Configured using:
 'configure --prefix=/home/pradyumna/.local --with-native-compilation
 --with-imagemagick --with-gnutls --with-gif --with-tree-sitter
 --with-mailutils --with-harfbuzz --with-modules --with-cairo
 --with-jpeg --with-rsvg --with-xft --with-xpm --with-png --with-pgtk
 --with-dbus --with-tiff --with-webp --with-json'


-- 
Pradyumna Swanand Paranjape
[Message part 2 (text/html, inline)]
[which-key-symbolize.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71718; Package emacs. (Sat, 22 Jun 2024 18:19:01 GMT) Full text and rfc822 format available.

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

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com>
Cc: Justin Burkett <justin <at> burkett.cc>, 71718 <at> debbugs.gnu.org
Subject: Re: bug#71718: Unicode symbols to represent which key special keys
Date: Sat, 22 Jun 2024 19:17:25 +0100
प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com> writes:

> Tags: patch
>
> This patch corresponds to the pull request #372
> <https://github.com/justbur/emacs-which-key/pull/372>.

Adding Justin as the author of which-key.  I see from the discussion it
was requested to be moved to this bug tracker, so he is aware.

> This is a proposed feature enhancement in which-key to allow
> propertized special key: a single user-defined unicode character that
> will replace special keys such as SPC, TAB, RET, ESC, DEL, backspace,
> ...
>
> Commit:
>
>     Unicode symbols to represent which key special keys
>    
>     * lisp/which-key.el (which-key-speical-keys):Use

There is a typo above in the commit message `special-keys'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71718; Package emacs. (Sun, 23 Jun 2024 15:31:01 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com>
Cc: Jeremy Bryant <jb <at> jeremybryant.net>, Justin Burkett <justin <at> burkett.cc>,
 71718 <at> debbugs.gnu.org
Subject: Re: bug#71718: Unicode symbols to represent which key special keys,
 bug#71718: Unicode symbols to represent which key special keys
Date: Sun, 23 Jun 2024 17:29:11 +0200
>>>>> On Sat, 22 Jun 2024 14:31:15 +0530, प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com> said:


    प्रद्युम्न>     Unicode symbols to represent which key special keys

'which-key'

    प्रद्युम्न>     * lisp/which-key.el (which-key-speical-keys):Use
    प्रद्युम्न>     symbols to represent special keys.  If value of
    प्रद्युम्न>     ``which-key-special-keys`` is an *alist* of cons
    प्रद्युम्न>     cells, whose cars are special keys such as SPC,
    प्रद्युम्न>     TAB,  ... and the cdrs are symbol strings, replace
    प्रद्युम्न>     the special keys with corresponding symbols.

    प्रद्युम्न>     For backward-compatibility, if
    प्रद्युम्न>     ``which-key-special-keys`` is an ordinary list of
    प्रद्युम्न>     keys, old logic of truncation to single character
    प्रद्युम्न>     works.

Quoting in commit messages is done 'like' 'this' for symbols such as
variable and function names.

Please put a reference to the bug number somewhere in the commit
message, in the form (Bug#71718).

    प्रद्युम्न>   :package-version "1.0" :version "30.1")
    प्रद्युम्न> 
    प्रद्युम्न> (defcustom which-key-special-keys '()
    प्रद्युम्न>-  "These keys will automatically be truncated to one character.
    प्रद्युम्न>+  "These keys will be truncated to first character or provided unicode symbol.
    प्रद्युम्न> They also have `which-key-special-key-face' applied to them.  This
    प्रद्युम्न>-is disabled by default.  An example configuration is
    प्रद्युम्न>-
    प्रद्युम्न>-\(setq which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\" \"ESC\" \"DEL\")\)"
    प्रद्युम्न>-  :type '(repeat string)
    प्रद्युम्न>+is disabled by default.  Example configurations are
    प्रद्युम्न>+
    प्रद्युम्न>+\(setq which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\" \"ESC\" \"DEL\")\) OR
    प्रद्युम्न>+
    प्रद्युम्न>+\(setq which-key-special-keys
    प्रद्युम्न>+      \\='((\"SPC\" . \"␣\")
    प्रद्युम्न>+        (\"TAB\" . \"↹\")
    प्रद्युम्न>+        (\"RET\" . \"⏎\")
    प्रद्युम्न>+        (\"ESC\" . \"⎋\")
    प्रद्युम्न>+        (\"DEL\" . \"⌦\")
    प्रद्युम्न>+        (\"backspace\" . \"⌫\"))\)"
    प्रद्युम्न>+  :type '(repeat (choice string cons))
    प्रद्युम्न>   :package-version "1.0" :version "30.1")
    प्रद्युम्न>

`defcustom' has an alist type you could perhaps use here, since with
the current type it would be possible to create an improper alist.

Please donʼt recommend `setq' in the docstrings for user
options. Ideally youʼd offer preconfigured values for common setups
for the user to select. That would also make it easier to select other
replacement characters than the ones you mention.

(Perhaps itʼs too late because of backwards compatibility, but the
first value you describe above could be implemented using the form
used by the second value:

     '(("SPC" . "S")
       ("TAB" . "T") etc
)

Robert
-- 

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71718; Package emacs. (Fri, 28 Jun 2024 07:42:02 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com>
Cc: Jeremy Bryant <jb <at> jeremybryant.net>, Justin Burkett <justin <at> burkett.cc>,
 71718 <at> debbugs.gnu.org
Subject: Re: bug#71718: Unicode symbols to represent which key special keys,
 bug#71718: Unicode symbols to represent which key special keys
Date: Fri, 28 Jun 2024 09:40:07 +0200
>>>>> On Fri, 28 Jun 2024 11:43:58 +0530, प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com> said:

    Prady> I am unaware of the protocol here.
    Prady> I submitted the PR as a bug as advised by the owner of the repository on
    Prady> github.

    Prady> I agree with, and accept both suggestions (from Robert and Jeremy).
    Prady> How do I proceed with including the suggestions?

Change your code to match the suggestions, ensure that all the changes
are in 1 commit, then reply to this email with the file produced by

     git format-patch -1

as an attachment. See "** Getting involved with development" in
CONTRIBUTE in the emacs sources for more info.

    Prady> I am afraid I, being ignorant, might end up opening multiple bug reports
    Prady> messing up things.
    Prady> So I am not actively doing anything right now.
    Prady> Please guide me through.

As long as you just reply to '71718 <at> debbugs.gnu.org' and the other
people in the email headers, you wonʼt end up creating multiple
reports.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71718; Package emacs. (Fri, 28 Jun 2024 10:46:03 GMT) Full text and rfc822 format available.

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

From: प्रद्युम्न परांजपे
 <pradyparanjpe <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Jeremy Bryant <jb <at> jeremybryant.net>, Justin Burkett <justin <at> burkett.cc>,
 71718 <at> debbugs.gnu.org
Subject: Re: bug#71718: Unicode symbols to represent which key special keys,
 bug#71718: Unicode symbols to represent which key special keys
Date: Fri, 28 Jun 2024 11:43:58 +0530
[Message part 1 (text/plain, inline)]
I am unaware of the protocol here.

I submitted the PR as a bug as advised by the owner of the repository on
github.

I agree with, and accept both suggestions (from Robert and Jeremy).
How do I proceed with including the suggestions?

I am afraid I, being ignorant, might end up opening multiple bug reports
messing up things.
So I am not actively doing anything right now.
Please guide me through.

N.B. You may correct them without my intervention if you can.

--
Prady



रवि, २३, जून २०२४ रोजी ८:५९ PM वाजता रोजी Robert Pluim नी <rpluim <at> gmail.com>
लिहिले:

> >>>>> On Sat, 22 Jun 2024 14:31:15 +0530, प्रद्युम्न परांजपे <
> pradyparanjpe <at> gmail.com> said:
>
>
>     प्रद्युम्न>     Unicode symbols to represent which key special keys
>
> 'which-key'
>
>     प्रद्युम्न>     * lisp/which-key.el (which-key-speical-keys):Use
>     प्रद्युम्न>     symbols to represent special keys.  If value of
>     प्रद्युम्न>     ``which-key-special-keys`` is an *alist* of cons
>     प्रद्युम्न>     cells, whose cars are special keys such as SPC,
>     प्रद्युम्न>     TAB,  ... and the cdrs are symbol strings, replace
>     प्रद्युम्न>     the special keys with corresponding symbols.
>
>     प्रद्युम्न>     For backward-compatibility, if
>     प्रद्युम्न>     ``which-key-special-keys`` is an ordinary list of
>     प्रद्युम्न>     keys, old logic of truncation to single character
>     प्रद्युम्न>     works.
>
> Quoting in commit messages is done 'like' 'this' for symbols such as
> variable and function names.
>
> Please put a reference to the bug number somewhere in the commit
> message, in the form (Bug#71718).
>
>     प्रद्युम्न>   :package-version "1.0" :version "30.1")
>     प्रद्युम्न>
>     प्रद्युम्न> (defcustom which-key-special-keys '()
>     प्रद्युम्न>-  "These keys will automatically be truncated to one
> character.
>     प्रद्युम्न>+  "These keys will be truncated to first character or
> provided unicode symbol.
>     प्रद्युम्न> They also have `which-key-special-key-face' applied to
> them.  This
>     प्रद्युम्न>-is disabled by default.  An example configuration is
>     प्रद्युम्न>-
>     प्रद्युम्न>-\(setq which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\"
> \"ESC\" \"DEL\")\)"
>     प्रद्युम्न>-  :type '(repeat string)
>     प्रद्युम्न>+is disabled by default.  Example configurations are
>     प्रद्युम्न>+
>     प्रद्युम्न>+\(setq which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\"
> \"ESC\" \"DEL\")\) OR
>     प्रद्युम्न>+
>     प्रद्युम्न>+\(setq which-key-special-keys
>     प्रद्युम्न>+      \\='((\"SPC\" . \"␣\")
>     प्रद्युम्न>+        (\"TAB\" . \"↹\")
>     प्रद्युम्न>+        (\"RET\" . \"⏎\")
>     प्रद्युम्न>+        (\"ESC\" . \"⎋\")
>     प्रद्युम्न>+        (\"DEL\" . \"⌦\")
>     प्रद्युम्न>+        (\"backspace\" . \"⌫\"))\)"
>     प्रद्युम्न>+  :type '(repeat (choice string cons))
>     प्रद्युम्न>   :package-version "1.0" :version "30.1")
>     प्रद्युम्न>
>
> `defcustom' has an alist type you could perhaps use here, since with
> the current type it would be possible to create an improper alist.
>
> Please donʼt recommend `setq' in the docstrings for user
> options. Ideally youʼd offer preconfigured values for common setups
> for the user to select. That would also make it easier to select other
> replacement characters than the ones you mention.
>
> (Perhaps itʼs too late because of backwards compatibility, but the
> first value you describe above could be implemented using the form
> used by the second value:
>
>      '(("SPC" . "S")
>        ("TAB" . "T") etc
> )
>
> Robert
> --
>


-- 

प्रद्युम्न स्वानंद परांजपे
Pradyumna Swanand Paranjape
CSIR-SRF,
Centre for Cellular and Molecular Biology,
Hyderabad 500007
India
+91 9581261180
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71718; Package emacs. (Fri, 28 Jun 2024 18:00:02 GMT) Full text and rfc822 format available.

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

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com>,
 Justin Burkett <justin <at> burkett.cc>, 71718 <at> debbugs.gnu.org
Subject: Re: bug#71718: Unicode symbols to represent which key special keys,
 bug#71718: Unicode symbols to represent which key special keys
Date: Fri, 28 Jun 2024 18:59:19 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

>>>>>> On Fri, 28 Jun 2024 11:43:58 +0530, प्रद्युम्न परांजपे <pradyparanjpe <at> gmail.com> said:
>
>     Prady> I am unaware of the protocol here.
>     Prady> I submitted the PR as a bug as advised by the owner of the repository on
>     Prady> github.
>
>     Prady> I agree with, and accept both suggestions (from Robert and Jeremy).
>     Prady> How do I proceed with including the suggestions?
>
> Change your code to match the suggestions, ensure that all the changes
> are in 1 commit, then reply to this email with the file produced by
>
>      git format-patch -1
>
> as an attachment. See "** Getting involved with development" in
> CONTRIBUTE in the emacs sources for more info.
>
>     Prady> I am afraid I, being ignorant, might end up opening multiple bug reports
>     Prady> messing up things.
>     Prady> So I am not actively doing anything right now.
>     Prady> Please guide me through.
>
> As long as you just reply to '71718 <at> debbugs.gnu.org' and the other
> people in the email headers, you wonʼt end up creating multiple
> reports.
>
> Robert

Indeed.


Prady, to explain the recent change, please note that the original repo was archived on github,
recently on the 25th, just after your initial PR.

which-key is now developed as part of Emacs, so please continue to
submit patches and bug reports here.





This bug report was last modified 147 days ago.

Previous Next


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