unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: YE Qianchuan <stool.ye@gmail.com>
To: 13698@debbugs.gnu.org
Subject: bug#13698: 24.2; Display script symbol name when calling `describe-char'
Date: Wed, 13 Feb 2013 01:30:41 +0800	[thread overview]
Message-ID: <878v6tv3r2.fsf@yeqianchuan-pc.i-did-not-set--mail-host-address--so-tickle-me> (raw)

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

Please refer to this thread:
https://lists.gnu.org/archive/html/help-gnu-emacs/2013-02/msg00138.html

Sometimes the script name symbol of a character is more important than
its charset.  For example, you'd like to use `set-fontset-font' to set a
proper font specifying its script as target, rather than specifying its
charset, which usually is unicode.

In addition, as unicode family is a common charset, the "preferred
charset" displayed by `describe-char' seems not quite useful. In
contrast, script makes more sense. For example, script 'han tells me this
is a CJK character and 'greek tells me this is a greek letter, while
charset often tells me nothing.

Therefore, I suggest display the script name symbol as well when calling
`describe-char'. So that we can press [C-u C-x =] to get it.

I also wrote a simple patch for this.

Besides, I hope there is a handy function called
`list-character-scripts', just like `list-character-sets'. It's a really
simple function: just return
(char-table-extra-slot char-script-table 0).
I believe this function will make script name symbols less confuse.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: `describe-char' to display script symbol name as well --]
[-- Type: text/x-patch, Size: 549 bytes --]

diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index b3f7878..6f34a7c 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -574,6 +574,9 @@ relevant to POS."
                         'help-echo
                         "mouse-2, RET: show this character in its character set")
                     str)))
+              ("script"
+               ,(symbol-name
+                 (char-table-range char-script-table char)))
               ("syntax"
                ,(let ((syntax (syntax-after pos)))
                   (with-temp-buffer

             reply	other threads:[~2013-02-12 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 17:30 YE Qianchuan [this message]
2013-02-13  6:09 ` bug#13698: 24.2; Display script symbol name when calling `describe-char' YE Qianchuan
2013-02-13 14:56   ` Stefan Monnier

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=878v6tv3r2.fsf@yeqianchuan-pc.i-did-not-set--mail-host-address--so-tickle-me \
    --to=stool.ye@gmail.com \
    --cc=13698@debbugs.gnu.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).