From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Mackenzie, Alan" Newsgroups: gmane.emacs.bugs Subject: elisp manual, page "Display Tables" is opaque Date: Mon, 11 Sep 2006 18:11:04 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1157991142 24011 80.91.229.2 (11 Sep 2006 16:12:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2006 16:12:22 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 11 18:12:18 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GMoOK-0007qG-FD for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2006 18:12:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMoOJ-000439-Mk for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2006 12:12:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GMoNM-0002ZN-4i for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2006 12:11:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GMoNK-0002VL-0X for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2006 12:11:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMoNJ-0002UY-K8 for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2006 12:11:09 -0400 Original-Received: from [64.18.1.187] (helo=exprod6og53.obsmtp.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1GMoOc-0004F8-1P for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2006 12:12:30 -0400 Original-Received: from source ([194.121.90.51]) by exprod6ob53.postini.com ([64.18.5.12]) with SMTP; Mon, 11 Sep 2006 09:11:05 PDT Original-Received: from oekaw2ex01.hbi.ad.harman.com (unverified [172.16.1.72]) by oekaw2vw01.hbi.ad.harman.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Mon, 11 Sep 2006 18:04:47 +0200 Original-Received: from OEKAW2EXVS03.hbi.ad.harman.com ([172.16.1.94]) by oekaw2ex01.hbi.ad.harman.com with Microsoft SMTPSVC (5.0.2195.6713); Mon, 11 Sep 2006 18:11:04 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: elisp manual, page "Display Tables" is opaque Thread-Index: AcbVvOGp0BhlHWAeROuGiZwUVR1ZcQ== Original-To: X-OriginalArrivalTime: 11 Sep 2006 16:11:04.0664 (UTC) FILETIME=[E1DE2D80:01C6D5BC] X-Mailman-Approved-At: Mon, 11 Sep 2006 12:12:02 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15314 Archived-At: Hi, Emacs! [cc's to acm@muc.de would be appreciated. Thanks!] Emacs 21.3 on MS-Windows. I'm trying to set up a display table (or whatever), so that a carriage return, instead of being displayed as "^M", gets displayed as "". This should be simple - but I've been struggling with the documentation for ~2 hours so far. This documentation suffers from "pronounitis" - using terms like "this widget" when it is unclear which widget is meant, or even what is meant by "widget") and contains too few examples. So far, I've tried this: (defvar explicit-table (make-display-table)) (defun explicit-display () (aset explicit-table ?\r (vector ?< ?C ?R ?>))) and this: (defvar explicit-table (make-display-table)) (defun explicit-display () (aset explicit-table ?\r (vector (create-glyph "")))) each time attempting to apply the new table with (set-window-display-table (selected-window) 'explicit-table) =20 =20 . Both of these tries replaced "^M" with an empty square glyph. :-( ######################################################################## # Here is an analysis of what is wrong with the info pages. I don't currently have convenient access to the CVS elisp, but a quick glance through the CVS display.texi shows it has in essence not been fixed. Page "Display Table format" The ordinary elements of the display table are indexed by character codes; the element at index C says how to display the character code C. The value should be `nil' or a vector of glyph values (*note Glyphs::). If an element is `nil', it says to display that character according to the usual display conventions (*note Usual Display::). Nowhere is it defined what a "glyph VALUE" is. It is not immediately clear whether "The value" means the value of the entire display table or one of its elements, though some mental analysis shows it to be the latter. Page "Glyphs" - Variable: glyph-table The value of this variable is the current glyph table. It should be a vector; the Gth element defines glyph code G. If the value is `nil' instead of a vector, then all glyphs are simple (see below). The glyph table is not used on windowed displays. What is a "glyph table", exactly? What is "code G"? Is glyph code 65 "A"? "If THE value is `nil'" .... Is this the value of `glyph-table', or the value of one of its elements? STRING Send the characters in STRING to the terminal to output this glyph. This alternative is available on character terminals, but not under a window system. Alternative to what? Could it be that "STRING" is an old mechanism which has been superseded by one which works on both terminals and graphical screens? INTEGER Define this glyph code as an alias for glyph code INTEGER. You can use an alias to specify a face code for the glyph; see below. WhaaaaT? What is the significance of "glyph code INTEGER"? Why on earth would I want to define an alias, and how would I use this alias? WTF is a "face code"? `nil' This glyph is simple. The glyph code mod 524288 is the character to output, and the glyph code divided by 524288 specifies the face number (*note Face Functions::) to use while outputting it. (524288 is 2**19.) *Note Faces::. 'THE glyph code" - WHAT glyph code? isn't the glyph code here `nil'? ######################################################################## # So, how can I make a carriage return display as ""? Is it even possible? If so, why isn't something like this in the documentation as an example? --=20 Alan Mackenzie, Harman Becker, Ittersbach, Germany. ******************************************* Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informati= onen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemli= ch erhalten haben, informieren Sie bitte sofort den Absender und loeschen S= ie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe diese= r Mail ist nicht gestattet. =20 This e-mail may contain confidential and/or privileged information. If you = are not the intended recipient (or have received this e-mail in error) plea= se notify the sender immediately and delete this e-mail. Any unauthorized c= opying, disclosure or distribution of the contents in this e-mail is strict= ly forbidden. *******************************************