From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: text-quoting-style Date: Tue, 1 Sep 2015 09:27:18 -0700 Organization: UCLA Computer Science Department Message-ID: <55E5D1E6.9040003@cs.ucla.edu> References: <20150828172501.GB4882@acm.fritz.box> <20150829155959.GA20484@acm.fritz.box> <20150830131613.GA2724@acm.fritz.box> <55E3F447.4050005@cs.ucla.edu> <20150831201343.GB2280@acm.fritz.box> <55E4C724.3060108@cs.ucla.edu> <20150901124756.GB2362@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090908080800020007030105" X-Trace: ger.gmane.org 1441124910 797 80.91.229.3 (1 Sep 2015 16:28:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2015 16:28:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 01 18:28:16 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZWoPu-0003pI-B7 for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2015 18:28:14 +0200 Original-Received: from localhost ([::1]:55771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWoPs-0000nh-M4 for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2015 12:28:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWoP6-0000BI-SE for emacs-devel@gnu.org; Tue, 01 Sep 2015 12:27:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWoP2-000747-Ge for emacs-devel@gnu.org; Tue, 01 Sep 2015 12:27:24 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWoP2-00073P-7t for emacs-devel@gnu.org; Tue, 01 Sep 2015 12:27:20 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A76B4160175; Tue, 1 Sep 2015 09:27:19 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id VZRZdtpcmRQd; Tue, 1 Sep 2015 09:27:18 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DA5B6160FCB; Tue, 1 Sep 2015 09:27:18 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JcHB_ZJjJUYL; Tue, 1 Sep 2015 09:27:18 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B8F0A160175; Tue, 1 Sep 2015 09:27:18 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <20150901124756.GB2362@acm.fritz.box> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189396 Archived-At: This is a multi-part message in MIME format. --------------090908080800020007030105 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Alan Mackenzie wrote: >> It's what Emacs does now, and it works well enough. And the basic idea >> >isn't a new principle: Emacs has done it for decades for many ASCII >> >characters, e.g., HT. So it is not a problem in practice. > It will be a problem in practice. It will by lying about what character > in the buffer the glyph on the screen represents. Again, there's nothing new here: Emacs has been "lying" in that way for decades for HT and for several other ASCII characters, and it works in practice. > It will be ambiguous: That's easily enough fixed. I installed the attached patch, which uses shadow glyphs for quote substitutions in ASCII-only displays. If you prefer underline or some other glyph face on your console please feel free to change the code. >> text-quoting-style doesn't do anything for info files, or >> for other text files containing curved quotes. > > That's an argument for an additional facility for Info The additional facility I proposed would work for info, and would also work for *Help* buffers and diagnostics and would render text-quoting-style unnecessary. --------------090908080800020007030105 Content-Type: text/x-diff; name="0001-Display-replacement-quotes-with-shadow-glyphs.patch" Content-Disposition: attachment; filename="0001-Display-replacement-quotes-with-shadow-glyphs.patch" Content-Transfer-Encoding: quoted-printable >From 1a3518e7c361a9ceaa017c1334a83d14e0651a4e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 1 Sep 2015 09:18:12 -0700 Subject: [PATCH] Display replacement quotes with shadow glyphs * lisp/startup.el (command-line): When displaying ASCII replacements for curved quotes, use a shadow glyph instead of a regular one, to avoid ambiguity. --- lisp/startup.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index 8c63ed2..3e29739 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1018,11 +1018,12 @@ please check its value") (setq no-blinking-cursor t)) =20 ;; If curved quotes don't work, display ASCII approximations. - (dolist (char-repl '((?=E2=80=98 . [?\`]) (?=E2=80=99 . [?\']) (?=E2=80= =9C . [?\"]) (?=E2=80=9D . [?\"]))) + (dolist (char-repl '((?=E2=80=98 . ?\`) (?=E2=80=99 . ?\') (?=E2=80=9C= . ?\") (?=E2=80=9D . ?\"))) (when (not (char-displayable-p (car char-repl))) (or standard-display-table (setq standard-display-table (make-display-table))) - (aset standard-display-table (car char-repl) (cdr char-repl)))) + (aset standard-display-table (car char-repl) + (vector (make-glyph-code (cdr char-repl) 'shadow))))) (setq internal--text-quoting-flag t) =20 ;; Re-evaluate predefined variables whose initial value depends on --=20 2.1.4 --------------090908080800020007030105--