unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "प्रद्युम्न परांजपे" <pradyparanjpe@gmail.com>
Cc: Jeremy Bryant <jb@jeremybryant.net>,
	Justin Burkett <justin@burkett.cc>,
	71718@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <87le2vbrug.fsf@gmail.com> (raw)
In-Reply-To: <CABt=8OY9KzzvpYxXbzH1mKnGPQKWQ4BQB1ekCnubdzdwrBb==w@mail.gmail.com> ("प्रद्युम्न परांजपे"'s message of "Sat, 22 Jun 2024 14:31:15 +0530,  Sat, 22 Jun 2024 19:17:25 +0100")

>>>>> On Sat, 22 Jun 2024 14:31:15 +0530, प्रद्युम्न परांजपे <pradyparanjpe@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
-- 

  parent reply	other threads:[~2024-06-23 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-22  9:01 bug#71718: Unicode symbols to represent which key special keys प्रद्युम्न परांजपे
2024-06-22 18:17 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-23 15:29 ` Robert Pluim [this message]
2024-06-28  6:13   ` bug#71718: Unicode symbols to represent which key special keys, " प्रद्युम्न परांजपे
2024-06-28  7:40     ` Robert Pluim
2024-06-28 17:59       ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le2vbrug.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=71718@debbugs.gnu.org \
    --cc=jb@jeremybryant.net \
    --cc=justin@burkett.cc \
    --cc=pradyparanjpe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).