From: Paul Eggert <eggert@cs.ucla.edu>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: text-quoting-style
Date: Tue, 1 Sep 2015 09:27:18 -0700 [thread overview]
Message-ID: <55E5D1E6.9040003@cs.ucla.edu> (raw)
In-Reply-To: <20150901124756.GB2362@acm.fritz.box>
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Display-replacement-quotes-with-shadow-glyphs.patch --]
[-- Type: text/x-diff; name="0001-Display-replacement-quotes-with-shadow-glyphs.patch", Size: 1378 bytes --]
From 1a3518e7c361a9ceaa017c1334a83d14e0651a4e Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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))
;; If curved quotes don't work, display ASCII approximations.
- (dolist (char-repl '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"])))
+ (dolist (char-repl '((?‘ . ?\`) (?’ . ?\') (?“ . ?\") (?” . ?\")))
(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)
;; Re-evaluate predefined variables whose initial value depends on
--
2.1.4
next prev parent reply other threads:[~2015-09-01 16:27 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 2:03 text-quoting-style Stefan Monnier
2015-08-28 5:22 ` text-quoting-style David Kastrup
2015-08-28 7:06 ` text-quoting-style Paul Eggert
2015-08-28 7:37 ` text-quoting-style Eli Zaretskii
2015-08-28 7:54 ` text-quoting-style Paul Eggert
2015-08-28 8:42 ` text-quoting-style Eli Zaretskii
2015-08-28 14:39 ` text-quoting-style Yuri Khan
2015-08-28 14:49 ` text-quoting-style Eli Zaretskii
2015-08-28 15:00 ` text-quoting-style Paul Eggert
2015-08-28 15:31 ` text-quoting-style Eli Zaretskii
2015-08-28 15:39 ` text-quoting-style Paul Eggert
2015-08-28 15:48 ` text-quoting-style Eli Zaretskii
2015-08-28 7:29 ` text-quoting-style Eli Zaretskii
2015-08-28 16:42 ` text-quoting-style Stefan Monnier
2015-08-28 17:25 ` text-quoting-style Alan Mackenzie
2015-08-28 17:48 ` text-quoting-style Paul Eggert
2015-08-28 18:28 ` text-quoting-style Alan Mackenzie
2015-08-29 14:54 ` text-quoting-style Stefan Monnier
2015-08-29 15:59 ` text-quoting-style Alan Mackenzie
2015-08-30 1:59 ` text-quoting-style Stefan Monnier
2015-08-30 13:16 ` text-quoting-style Alan Mackenzie
2015-08-31 1:30 ` text-quoting-style Stefan Monnier
2015-08-31 6:29 ` text-quoting-style Paul Eggert
2015-08-31 20:13 ` text-quoting-style Alan Mackenzie
2015-08-31 21:29 ` text-quoting-style Paul Eggert
2015-09-01 12:47 ` text-quoting-style Alan Mackenzie
2015-09-01 16:27 ` Paul Eggert [this message]
2015-09-01 17:07 ` text-quoting-style David Kastrup
2015-09-01 18:35 ` text-quoting-style Alan Mackenzie
2015-09-01 23:58 ` text-quoting-style Paul Eggert
2015-09-02 9:09 ` text-quoting-style Alan Mackenzie
2015-09-02 15:13 ` text-quoting-style Paul Eggert
2015-09-01 18:44 ` text-quoting-style Eli Zaretskii
2015-09-01 19:08 ` text-quoting-style Paul Eggert
2015-09-01 13:46 ` text-quoting-style David Kastrup
2015-09-01 16:28 ` text-quoting-style Paul Eggert
2015-09-01 17:08 ` text-quoting-style David Kastrup
2015-09-01 17:34 ` text-quoting-style Paul Eggert
2015-09-01 18:30 ` text-quoting-style David Kastrup
2015-09-02 0:07 ` text-quoting-style Paul Eggert
2015-09-02 0:27 ` text-quoting-style David Kastrup
2015-09-02 15:35 ` text-quoting-style Richard Stallman
2015-08-31 20:01 ` text-quoting-style Alan Mackenzie
2015-09-01 3:31 ` text-quoting-style Stefan Monnier
2015-09-01 9:28 ` text-quoting-style Dmitry Gutov
2015-09-01 10:53 ` text-quoting-style Oleh Krehel
2015-09-01 13:03 ` text-quoting-style Alan Mackenzie
2015-09-01 16:46 ` text-quoting-style Stefan Monnier
2015-09-01 20:41 ` text-quoting-style Bastien
2015-09-01 23:47 ` text-quoting-style Paul Eggert
2015-09-02 0:18 ` text-quoting-style David Kastrup
2015-09-02 0:35 ` text-quoting-style Paul Eggert
2015-09-02 0:53 ` text-quoting-style David Kastrup
2015-09-02 6:57 ` text-quoting-style Bastien
2015-09-02 15:17 ` text-quoting-style Paul Eggert
2015-09-02 15:36 ` text-quoting-style Dmitry Gutov
2015-09-02 15:41 ` text-quoting-style Bastien Guerry
2015-09-01 22:55 ` text-quoting-style Richard Stallman
2015-09-02 9:05 ` text-quoting-style Alan Mackenzie
2015-08-31 16:10 ` text-quoting-style N. Jackson
2015-08-31 17:31 ` text-quoting-style Stefan Monnier
2015-09-02 19:34 ` text-quoting-style N. Jackson
2015-09-03 15:29 ` text-quoting-style raman
2015-08-31 6:15 ` text-quoting-style Paul Eggert
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55E5D1E6.9040003@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=acm@muc.de \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.