unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>, 24902@debbugs.gnu.org
Subject: bug#24902: 25.1; C-x = for Unicode
Date: Sun, 23 Jan 2022 19:44:21 +0100	[thread overview]
Message-ID: <D6C51C79-4ACC-4ECA-A548-697098980B82@acm.org> (raw)
In-Reply-To: <5821CCED020000A10002326C@gwsmtp1.uni-regensburg.de>

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

> As others noted, `C-u C-x =' does display this info, and the reason that `C-x =' doesn't is because the names can be very long. We could add a user option to include it anyway, but in my opinion, it wouldn't be used much, and users that want this could just add advice to the command to do it instead. 

If many users would be served by an improved format, perhaps a change would be warranted after all? My local version replaces the standard

 Char: α (945, #o1661, #x3b1, file ...) point=419 of 423 (99%) column=0

with

 U+03B1 GREEK SMALL LETTER ALPHA pt=419/423 col=0

To save space, remove noise, unnecessary and/or obsolete characters. U+HHHH is the standard notation for code values nowadays; I have little use for decimal and octal (octal!) numbers although I know how to get them if I want. Nor do I generally need to see the character itself; it's right under the cursor.

Now almost all Unicode character names fit very comfortably on a single line in the echo area, and for the rare ones that do not, this area expands.

I'm not going to reopen the bug but believe such a format (or something similar) would be much more helpful for the typical user. But don't take my word for it: try running something like the attached code yourself for a while and see if it doesn't make you happier.

I doubt much thought has gone into the present format; it's just an artefact of history.


[-- Attachment #2: my-what-cursor-position.el --]
[-- Type: application/octet-stream, Size: 1095 bytes --]

;;; -*- lexical-binding: t -*-

(defun my-what-cursor-position (&optional detail)
  "Like `what-cursor-position', but with important information only."
  (interactive "P")
  (if detail
      (what-cursor-position detail)
    (let* ((char (char-after))
           (char-info
            (cond
             ((null char) "")
             ((<= #x3fff80 char #x3fffff)
              (format "#x%02X (raw byte) " (logand char #xff)))
             (t
              (format "U+%04X %s "
                      char
                      (or (get-char-code-property char 'name)
                          (get-char-code-property char 'old-name)
                          "(undefined)")))))
           (beg (point-min))
           (end (point-max))
           (narrow (if (and (= beg 1) (= (1- end) (buffer-size)))
                       ""
                     (format " <%d-%d>" beg end))))
      (message "%spt=%d/%d%s col=%d"
               char-info
               (point) (buffer-size)
               narrow
               (current-column)))))

(global-set-key (kbd "C-x =") 'my-what-cursor-position)

  parent reply	other threads:[~2022-01-23 18:44 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 12:02 bug#24902: 25.1; C-x = for Unicode Ulrich Windl
2016-11-08 12:23 ` Andreas Schwab
2016-11-08 13:49   ` bug#24902: Antw: " Ulrich Windl
2016-11-08 19:53     ` Phil Sainty
2016-11-10  4:56       ` Marcin Borkowski
2016-11-10  7:23         ` Mark Oteiza
2016-11-08 12:25 ` Phil Sainty
2022-01-23 16:20 ` Lars Ingebrigtsen
2022-01-23 16:56   ` Kévin Le Gouguec
2022-01-23 18:44 ` Mattias Engdegård [this message]
2022-01-24  9:21   ` Lars Ingebrigtsen
2022-01-24 10:40     ` Mattias Engdegård
2022-01-24 11:00       ` Lars Ingebrigtsen
2022-01-24 11:27         ` Robert Pluim
2022-01-24 14:09         ` Mattias Engdegård
2022-01-24 16:06         ` Mattias Engdegård
2022-01-24 16:28           ` bug#24902: [External] : " Drew Adams
2022-01-24 16:35           ` Lars Ingebrigtsen
2022-01-24 17:29             ` Mattias Engdegård
2022-01-24 17:39               ` Lars Ingebrigtsen
2022-01-25 15:38                 ` Mattias Engdegård
2022-01-25 16:41                   ` Robert Pluim
2022-01-25 17:15                     ` Eli Zaretskii
2022-01-25 18:00                     ` Mattias Engdegård
2022-01-25 18:11                       ` Eli Zaretskii
     [not found]                       ` <C2E2A281020000A84D5C4BFC@gwsmtp.uni-regensburg.de>
     [not found]                         ` <469D64F5020000015C413831@gwsmtp.uni-regensburg.de>
     [not found]                           ` <D3C7A175020000FA5C413831@gwsmtp.uni-regensburg.de>
     [not found]                             ` <A9CE96C702000053824A10E1@gwsmtp.uni-regensburg.de>
     [not found]                               ` <A7201B24020000235C413831@gwsmtp.uni-regensburg.de>
2022-01-26  7:09                                 ` bug#24902: Antw: [EXT] " Ulrich Windl
     [not found]                             ` <DD8FDCE7020000A54D5C4BFC@gwsmtp.uni-regensburg.de>
     [not found]                               ` <0106AEA10200006A824A10E1@gwsmtp.uni-regensburg.de>
2022-01-26 14:09                                 ` Ulrich Windl
2022-01-26 16:53                                   ` Mattias Engdegård
2022-01-26 17:25                                     ` Eli Zaretskii
2022-01-27 15:39                                     ` Lars Ingebrigtsen
2022-01-27 17:11                                       ` Juri Linkov
2022-01-28 13:09                                         ` Richard Stallman
2022-01-28 14:37                                           ` Eli Zaretskii
2022-01-28 17:05                                             ` bug#24902: [External] : " Drew Adams
2022-01-29 14:34                                             ` Lars Ingebrigtsen
2022-01-29 14:57                                               ` Eli Zaretskii
2022-01-30 15:47                                                 ` Lars Ingebrigtsen
2022-01-30 16:46                                                   ` Eli Zaretskii
2022-01-31  9:59                                                     ` Robert Pluim
2022-01-31 15:27                                                     ` Lars Ingebrigtsen
2022-01-31 16:46                                                       ` Eli Zaretskii
2022-01-31 17:00                                                         ` Lars Ingebrigtsen
2022-01-31 18:00                                                           ` Eli Zaretskii
2022-02-01  5:06                                                       ` Richard Stallman
2022-01-31 17:40                                                   ` Mattias Engdegård
2022-01-31 17:45                                                     ` Lars Ingebrigtsen
2022-01-31 18:15                                                       ` Mattias Engdegård
2022-01-31 18:30                                                         ` Lars Ingebrigtsen
2022-01-28 13:45                                         ` Lars Ingebrigtsen
2022-01-28 14:16                                       ` Mattias Engdegård
2022-01-28 17:05                                         ` bug#24902: [External] : " Drew Adams
2022-01-29 14:32                                         ` Lars Ingebrigtsen
2022-01-29 16:47                                           ` Mattias Engdegård
2022-01-30 15:50                                             ` Lars Ingebrigtsen
     [not found]                                 ` <13FDBD490200009C5C413831@gwsmtp.uni-regensburg.de>
     [not found]                                   ` <6?= =?UTF-8?Q?1F261F5020?= =?UTF-8?Q?000A100047?= =?UTF-8?Q?30B@gwsmtp?= =?UTF-8?Q?.uni-regen?= =?UTF-8?Q?sburg.de>
2022-01-27  9:12                                   ` bug#24902: Antw: [EXT] Re: bug#24902: 25.1; C‑x " Ulrich Windl
2022-01-27  9:43                                     ` Robert Pluim
2022-01-27 10:11                                       ` bug#24902: Antw: [EXT] Re: bug#24902: 25.1; C‑x= " Ulrich Windl
2022-01-27 10:20                                         ` Robert Pluim
2022-01-27 12:38                                       ` bug#24902: Antw: [EXT] Re: bug#24902: 25.1; C‑x = " Mattias Engdegård
2022-01-27 13:24                                         ` Ulrich Windl
2022-01-27  9:59                                     ` Eli Zaretskii
2022-01-26 13:10                   ` bug#24902: 25.1; C-x " Lars Ingebrigtsen
2022-01-26 13:35                     ` Eli Zaretskii
2022-01-26 13:46                     ` Mattias Engdegård
2022-01-26 14:07                       ` Lars Ingebrigtsen
2022-01-26 13:48                     ` Robert Pluim
2022-01-26 17:02                       ` Mattias Engdegård
2022-01-24 11:16       ` Robert Pluim

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=D6C51C79-4ACC-4ECA-A548-697098980B82@acm.org \
    --to=mattiase@acm.org \
    --cc=24902@debbugs.gnu.org \
    --cc=Ulrich.Windl@rz.uni-regensburg.de \
    --cc=larsi@gnus.org \
    /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).