From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YE Qianchuan Newsgroups: gmane.emacs.bugs Subject: bug#13698: 24.2; Display script symbol name when calling `describe-char' Date: Wed, 13 Feb 2013 01:30:41 +0800 Message-ID: <878v6tv3r2.fsf@yeqianchuan-pc.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1360691444 6864 80.91.229.3 (12 Feb 2013 17:50:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Feb 2013 17:50:44 +0000 (UTC) To: 13698@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 12 18:51:05 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U5K0W-0003W4-EL for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Feb 2013 18:51:04 +0100 Original-Received: from localhost ([::1]:59511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5K0D-0000Vo-7a for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Feb 2013 12:50:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5K08-0000Ve-Ob for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:50:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5K03-0005Mw-Fn for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:50:40 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5K03-0005Mp-DY for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:50:35 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U5K0T-0001p9-U1 for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: YE Qianchuan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Feb 2013 17:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13698 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13606914546995 (code B ref -1); Tue, 12 Feb 2013 17:51:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Feb 2013 17:50:54 +0000 Original-Received: from localhost ([127.0.0.1]:52496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5K0M-0001om-1H for submit@debbugs.gnu.org; Tue, 12 Feb 2013 12:50:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36658) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5JkY-0001Qb-Ap for submit@debbugs.gnu.org; Tue, 12 Feb 2013 12:34:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5Jk5-0000eb-Nv for submit@debbugs.gnu.org; Tue, 12 Feb 2013 12:34:07 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:34770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Jk5-0000eX-LX for submit@debbugs.gnu.org; Tue, 12 Feb 2013 12:34:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Jk0-0002mA-T0 for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:34:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5Jjw-0000c9-O3 for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:34:00 -0500 Original-Received: from mail-pa0-f52.google.com ([209.85.220.52]:61762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Jjw-0000bv-GT for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2013 12:33:56 -0500 Original-Received: by mail-pa0-f52.google.com with SMTP id fb1so205776pad.39 for ; Tue, 12 Feb 2013 09:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:mime-version :content-type; bh=UcY4DmLcCbv3zX9Iy6WLkwRZfLgIAPHjjSEbkZ4Y1yw=; b=vwo7pfuv+l2KdYFyDiJwAc1d+b1Za+rFtAvTW4668NoI0oF4/Pgb7G70Cq2Peo4Nxu +K6E6ntSlCafdiKKce5U9IovWeCD9Hs+e1sQHtZOMZF5/0CMtW8KBP108AQl260aTlwl zjEUS0MN2rGI1BZtZR/f6/Oe8NRsb1pEIvmuJ9oW+7zMTpeCarOwk/zSLRfD2jEMdJXZ ATs+HYrbehaSpVrdE3qaexfbboX4GKc3OuGasySCO/1TUY7zkAF4Nwz8pYIB7eOAnWFA 8ELQIW3ldZ28wqS6hahbM1z6BMiTPOR1V4ft8zq5Q7PxBclS0AucostnLwA7WHw25UGo zo7A== X-Received: by 10.66.73.5 with SMTP id h5mr54144798pav.11.1360690435052; Tue, 12 Feb 2013 09:33:55 -0800 (PST) Original-Received: from yeqianchuan-pc ([210.38.1.73]) by mx.google.com with ESMTPS id t6sm76564370paz.11.2013.02.12.09.33.52 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 12 Feb 2013 09:33:54 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Tue, 12 Feb 2013 12:50:53 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71103 Archived-At: --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=describe-char-display-script.patch Content-Description: `describe-char' to display script symbol name as well 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 --=-=-=--