From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#8900: 24.0.50; please index mentioned coding systems in Emacs manual Date: Fri, 1 Jul 2011 08:54:44 -0700 Message-ID: References: <246694EE605F4CE391A4FB9416853D98@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1309537859 25011 80.91.229.12 (1 Jul 2011 16:30:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 1 Jul 2011 16:30:59 +0000 (UTC) Cc: 8900@debbugs.gnu.org To: "'Lars Magne Ingebrigtsen'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 01 18:30:55 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QcgcH-0003OM-W1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jul 2011 18:30:54 +0200 Original-Received: from localhost ([::1]:50434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcgcG-0007XP-4f for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jul 2011 12:30:52 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcg4c-00073x-Hh for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2011 11:56:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qcg4Z-0006jc-Nw for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2011 11:56:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcg4Z-0006jT-BR for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2011 11:56:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qcg4Y-0008Pw-7F; Fri, 01 Jul 2011 11:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Jul 2011 15:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8900 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 8900-submit@debbugs.gnu.org id=B8900.130953570632295 (code B ref 8900); Fri, 01 Jul 2011 15:56:02 +0000 Original-Received: (at 8900) by debbugs.gnu.org; 1 Jul 2011 15:55:06 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qcg3e-0008Oq-EE for submit@debbugs.gnu.org; Fri, 01 Jul 2011 11:55:06 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qcg3c-0008ON-CI for 8900@debbugs.gnu.org; Fri, 01 Jul 2011 11:55:05 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.4/Switch-3.4.2) with ESMTP id p61FsuM7019345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Jul 2011 15:54:57 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p61FstJ2000388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Jul 2011 15:54:55 GMT Original-Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p61Fsn2n008272; Fri, 1 Jul 2011 10:54:49 -0500 Original-Received: from dradamslap1 (/10.159.59.183) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 01 Jul 2011 08:54:49 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Thread-Index: Acw4BSQvG5usM1PrTgWBph1UxNrmVgAAJwaw X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4E0DEDD2.0046:SCFMA922111,ss=1,re=-4.000,fgs=0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 01 Jul 2011 11:56:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:47709 Archived-At: > > Maybe you were thinking of the `undecided, coding system' > > entry in the Concept Index? That's close, but it is not > > any of those I mentioned. > > Yes, that's the one I meant. And instead of adding all the > `iso-latin-1-*' variations, I just added "`iso-latin-1', > coding system". > > I think that should be sufficient for people who want to find these > things in the index. I disagree. These are real, implementation, user-visible, runtime names. This is just like indexing command names or variable names or package names. The exact name should appear in the index. Consider, for instance, the use case that brought this to my attention: I have updated various Emacs `describe-...' commands so that a link to their coverage in the manuals is added to the *Help* buffer. This is based on finding the term in question in the manual's index. The match naturally should be an exact match against index entries. See http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00368.html. With a proper fix to this bug as I requested, these particular, literal names would appear in the index, and I could then add `describe-coding-system' to my updates. A user looking at the output of `describe-coding-system' for one of these coding systems could click the link to get to its doc in the manual. This is what I have in my TODO list: ;; ADD THIS ONE to help-fns+.el ONLY IF BUG #8900 is fixed. ;; REPLACE ORIGINAL in `mule-diag.el' ;; ;; Call `Info-make-manuals-xref' to create a cross-ref link to manuals. ;; ;;;###autoload (when (> emacs-major-version 23); Before Emacs 24 no coding systems are indexed. (defun describe-coding-system (coding-system) "Display information about CODING-SYSTEM." (interactive "zDescribe coding system (default current choices): ") (require 'mule-diag) (if (null coding-system) (describe-current-coding-system) (help-setup-xref (list #'describe-coding-system coding-system) (called-interactively-p 'interactive)) (with-output-to-temp-buffer (help-buffer) (print-coding-system-briefly coding-system 'doc-string) (let ((type (coding-system-type coding-system)) ;; Fixme: use this (extra-spec (coding-system-plist coding-system))) (princ "Type: ") (princ type) (cond ((eq type 'undecided) (princ " (do automatic conversion)")) ((eq type 'utf-8) (princ " (UTF-8: Emacs internal multibyte form)")) ((eq type 'utf-16) ;; (princ " (UTF-16)") ) ((eq type 'shift-jis) (princ " (Shift-JIS, MS-KANJI)")) ((eq type 'iso-2022) (princ " (variant of ISO-2022)\n") (princ "Initial designations:\n") (print-designation (coding-system-get coding-system :designation)) (when (coding-system-get coding-system :flags) (princ "Other specifications: \n ") (apply #'print-list (coding-system-get coding-system :flags)))) ((eq type 'charset) (princ " (charset)")) ((eq type 'ccl) (princ " (do conversion by CCL program)")) ((eq type 'raw-text) (princ " (text with random binary characters)")) ((eq type 'emacs-mule) (princ " (Emacs 21 internal encoding)")) ((eq type 'big5)) (t (princ ": invalid coding-system."))) (princ "\nEOL type: ") (let ((eol-type (coding-system-eol-type coding-system))) (cond ((vectorp eol-type) (princ "Automatic selection from:\n\t") (princ eol-type) (princ "\n")) ((or (null eol-type) (eq eol-type 0)) (princ "LF\n")) ((eq eol-type 1) (princ "CRLF\n")) ((eq eol-type 2) (princ "CR\n")) (t (princ "invalid\n"))))) (let ((postread (coding-system-get coding-system :post-read-conversion))) (when postread (princ "After decoding text normally,") (princ " perform post-conversion using the function: ") (princ "\n ") (princ postread) (princ "\n"))) (let ((prewrite (coding-system-get coding-system :pre-write-conversion))) (when prewrite (princ "Before encoding text normally,") (princ " perform pre-conversion using the function: ") (princ "\n ") (princ prewrite) (princ "\n"))) (with-current-buffer standard-output (let ((charsets (coding-system-charset-list coding-system))) (when (and (not (eq (coding-system-base coding-system) 'raw-text)) charsets) (cond ((eq charsets 'iso-2022) (insert "This coding system can encode all ISO 2022 charsets.")) ((eq charsets 'emacs-mule) (insert "This coding system can encode all emacs-mule charsets.""")) (t (insert "This coding system encodes the following charsets:\n ") (while charsets (insert " " (symbol-name (car charsets))) (search-backward (symbol-name (car charsets))) (help-xref-button 0 'help-character-set (car charsets)) (goto-char (point-max)) (setq charsets (cdr charsets))))))) (when (boundp 'Info-virtual-files) ; Emacs 23.2+ (Info-make-manuals-xref coding-system)))))))