unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
@ 2015-09-04 14:51 Paul Eggert
  2015-09-04 16:23 ` Alan Mackenzie
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2015-09-04 14:51 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Emacs Development

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

> isn't startup done before processing .emacs?

Yes, but (after my recent change) Emacs also looks at text-quoting-style after 
processing .emacs, and adjusts the display style accordingly.

> I don't yet have `text-quoting-style' in my .emacs

Please try adding (setq text-quoting-style 'grave) there.

> I've not seen any shadowed quotes on my screen no matter
> what I've done.

Please try loading the attached file; after it, every occurrence of X, Y and Z 
on your screen should appear in different faces that are readily legible.  If 
faces aren't working for you, we need to investigate why.

[-- Attachment #2: XYZ.el --]
[-- Type: text/x-emacs-lisp, Size: 331 bytes --]

(progn
  (unless standard-display-table
    (setq standard-display-table (make-display-table)))
  (aset standard-display-table ?X
	(vector (make-glyph-code ?X 'shadow)))
  (aset standard-display-table ?Y
	(vector (make-glyph-code ?Y 'underline)))
  (aset standard-display-table ?Z
	(vector (make-glyph-code ?Z 'escape-glyph))))
  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
  2015-09-04 14:51 [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa Paul Eggert
@ 2015-09-04 16:23 ` Alan Mackenzie
  2015-09-04 17:49   ` Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Mackenzie @ 2015-09-04 16:23 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Emacs Development

Hello, Paul.

On Fri, Sep 04, 2015 at 07:51:24AM -0700, Paul Eggert wrote:
> > isn't startup done before processing .emacs?

> Yes, but (after my recent change) Emacs also looks at text-quoting-style after 
> processing .emacs, and adjusts the display style accordingly.

> > I don't yet have `text-quoting-style' in my .emacs

> Please try adding (setq text-quoting-style 'grave) there.

It works.

> > I've not seen any shadowed quotes on my screen no matter
> > what I've done.

> Please try loading the attached file; after it, every occurrence of X, Y and Z 
> on your screen should appear in different faces that are readily legible.  If 
> faces aren't working for you, we need to investigate why.

> (progn
>   (unless standard-display-table
>     (setq standard-display-table (make-display-table)))
>   (aset standard-display-table ?X
> 	(vector (make-glyph-code ?X 'shadow)))
>   (aset standard-display-table ?Y
> 	(vector (make-glyph-code ?Y 'underline)))
>   (aset standard-display-table ?Z
> 	(vector (make-glyph-code ?Z 'escape-glyph))))

These "work", yes.  They cause the letters' foreground colours to be set
to something constant.  They are sometimes readily legible, sometimes
not, depending on what other use of colour (e.g. font-lock, hi-lock) is
being made at the same time.

I'd prefer to stick to the `text-quoting-style', I don't think the use
of these faces is going to be helpful, on balance.

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
  2015-09-04 16:23 ` Alan Mackenzie
@ 2015-09-04 17:49   ` Paul Eggert
  2015-09-04 18:07     ` David Kastrup
  2015-09-04 18:53     ` Alan Mackenzie
  0 siblings, 2 replies; 9+ messages in thread
From: Paul Eggert @ 2015-09-04 17:49 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Emacs Development

On 09/04/2015 09:23 AM, Alan Mackenzie wrote:
>
>> Please try adding (setq text-quoting-style 'grave) there.
> It works.

Thanks for checking.

> I'd prefer to stick to the `text-quoting-style'

Yes, and the intent of the current master is to do both: i.e., if you 
have (setq text-quoting-style 'grave) in your .emacs, then both (1) 
unescaped curved quotes are transliterated to ASCII characters in help 
buffers and strings, and (2) all curved quotes are displayed as shadowed 
ASCII characters.  The shadowing is intended to assist you when you see 
curved quotes in other contexts, so that you can distinguish curved 
quotes from true ASCII characters.  You should be able to see this by typing

a ` b C-x 8 [ c C-x 8 ] d ' e

which should insert “a`b‘c’d'e” into your buffer, and the curved quotes 
should be distinguishable from the grave accent and apostrophe because 
they're shadowed.

I assume this works for you now, with (setq text-quoting-style 'grave) 
in your .emacs; if not, please let me know.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
  2015-09-04 17:49   ` Paul Eggert
@ 2015-09-04 18:07     ` David Kastrup
  2015-09-04 18:35       ` Paul Eggert
  2015-09-04 18:53     ` Alan Mackenzie
  1 sibling, 1 reply; 9+ messages in thread
From: David Kastrup @ 2015-09-04 18:07 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Alan Mackenzie, Emacs Development

Paul Eggert <eggert@cs.ucla.edu> writes:

> On 09/04/2015 09:23 AM, Alan Mackenzie wrote:
>>
>>> Please try adding (setq text-quoting-style 'grave) there.
>> It works.
>
> Thanks for checking.
>
>> I'd prefer to stick to the `text-quoting-style'
>
> Yes, and the intent of the current master is to do both: i.e., if you
> have (setq text-quoting-style 'grave) in your .emacs, then both (1)
> unescaped curved quotes are transliterated to ASCII characters in help
> buffers and strings, and (2) all curved quotes are displayed as
> shadowed ASCII characters.

Can we stop making assumptions about the user?  Whether one does not
want to have Emacs' own diagnostics exhibiting ‘...’ and whether the
display/font/whatever warrants specific marking for third-party texts
containing such characters are entirely separate topics and should be
controlled by separate options.

So what if it's not the display that is deficient but the user?  Emacs
should not try reconfiguring the user for peaceful cooperation rather
than the other way round since that would be far too frustrating for
Emacs in the long run.

-- 
David Kastrup



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
  2015-09-04 18:07     ` David Kastrup
@ 2015-09-04 18:35       ` Paul Eggert
  2015-09-04 18:53         ` David Kastrup
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2015-09-04 18:35 UTC (permalink / raw)
  To: David Kastrup; +Cc: Alan Mackenzie, Emacs Development

On 09/04/2015 11:07 AM, David Kastrup wrote:
> whether the
> display/font/whatever warrants specific marking for third-party texts

This is not strictly a third-party issue.  For example, the Emacs manual 
is not a third-party text, and it uses curved quotes.  True, we could 
develop a more-complicated mechanism, presumably with more variables to 
control the added complexity -- for example, we could implement three 
separate variables to control quotes in diagnostics vs quotes in help 
buffers vs quotes in info files -- but there are advantages to keeping 
things simple when user need for the extra complexity has not been 
demonstrated.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
  2015-09-04 17:49   ` Paul Eggert
  2015-09-04 18:07     ` David Kastrup
@ 2015-09-04 18:53     ` Alan Mackenzie
  2015-09-05 18:40       ` Paul Eggert
  2015-09-09  9:38       ` Paul Eggert
  1 sibling, 2 replies; 9+ messages in thread
From: Alan Mackenzie @ 2015-09-04 18:53 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Emacs Development

Hello, Paul.

On Fri, Sep 04, 2015 at 10:49:47AM -0700, Paul Eggert wrote:
> On 09/04/2015 09:23 AM, Alan Mackenzie wrote:

> >> Please try adding (setq text-quoting-style 'grave) there.
> > It works.

> Thanks for checking.

> > I'd prefer to stick to the `text-quoting-style'

> Yes, and the intent of the current master is to do both: i.e., if you 
> have (setq text-quoting-style 'grave) in your .emacs, then both (1) 
> unescaped curved quotes are transliterated to ASCII characters in help 
> buffers and strings, and ....

> .... (2) all curved quotes are displayed as shadowed ASCII characters.

These things are separate issues and all three of them must be
(independently) configurable.

> The shadowing is intended to assist you when you see curved quotes in
> other contexts, so that you can distinguish curved quotes from true
> ASCII characters.

The expectation is still that the occurance of such quotes will be rare.

> You should be able to see this by typing

> a ` b C-x 8 [ c C-x 8 ] d ' e

> which should insert “a`b‘c’d'e” into your buffer, and the curved quotes 
> should be distinguishable from the grave accent and apostrophe because 
> they're shadowed.

They appear identical to the ASCII quotes.  (Yes, I have the latest
version of Emacs).

> I assume this works for you now, with (setq text-quoting-style 'grave) 
> in your .emacs; if not, please let me know.

I run emacs-25.0.50 with -Q, almost always.  But I'd set
`text-quoting-style' by a setq from M-:.

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
  2015-09-04 18:35       ` Paul Eggert
@ 2015-09-04 18:53         ` David Kastrup
  0 siblings, 0 replies; 9+ messages in thread
From: David Kastrup @ 2015-09-04 18:53 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Alan Mackenzie, Emacs Development

Paul Eggert <eggert@cs.ucla.edu> writes:

> On 09/04/2015 11:07 AM, David Kastrup wrote:
>> whether the
>> display/font/whatever warrants specific marking for third-party texts
>
> This is not strictly a third-party issue.  For example, the Emacs
> manual is not a third-party text, and it uses curved quotes.

Its use of curved quotes is outside of the interactive Emacs' control,
so for the purpose of display-related options, it is a third-party text.
Some people might want to have an Info-specific setting of such a
display option, but an Emacs-specific setting does not make any sense.

> True, we could develop a more-complicated mechanism, presumably with
> more variables to control the added complexity -- for example, we
> could implement three separate variables to control quotes in
> diagnostics vs quotes in help buffers vs quotes in info files -- but
> there are advantages to keeping things simple when user need for the
> extra complexity has not been demonstrated.

Conversion of Emacs' _output_ and _display_ manipulations are entirely
separate operations.  It does not make sense to conflate them by
stipulating a set of permissible motives for either desire.

-- 
David Kastrup



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
  2015-09-04 18:53     ` Alan Mackenzie
@ 2015-09-05 18:40       ` Paul Eggert
  2015-09-09  9:38       ` Paul Eggert
  1 sibling, 0 replies; 9+ messages in thread
From: Paul Eggert @ 2015-09-05 18:40 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Emacs Development

Alan Mackenzie wrote:
> I run emacs-25.0.50 with -Q, almost always.

Hmm, well, in that case obviously anything involving .emacs will not work for 
you.  I will look into implementing something that does work.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
  2015-09-04 18:53     ` Alan Mackenzie
  2015-09-05 18:40       ` Paul Eggert
@ 2015-09-09  9:38       ` Paul Eggert
  1 sibling, 0 replies; 9+ messages in thread
From: Paul Eggert @ 2015-09-09  9:38 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Emacs Development

Alan Mackenzie wrote:

> These things are separate issues and all three of them must be
> (independently) configurable.

OK, in master just now I undid the change that caused text-quoting-style to 
affect how quotes are displayed; they are now independent issues again.

> They appear identical to the ASCII quotes.  (Yes, I have the latest
> version of Emacs).

I think that was because you used emacs -Q, so your .emacs was not consulted. 
In master just now I installed something that works for me on the Linux console 
even when emacs -Q is used.  It does this by inspecting the Linux console font 
position table.  I tested it on fonts that display curved quotes unambiguously, 
on fonts that display them ambiguously with ASCII, and on fonts that don't 
display them at all.  Please give it a try.

If the above does not work, please try running this with the current master:

(startup--setup-quote-display 'grave)

and then type C-l to refresh the display.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-09-09  9:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 14:51 [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa Paul Eggert
2015-09-04 16:23 ` Alan Mackenzie
2015-09-04 17:49   ` Paul Eggert
2015-09-04 18:07     ` David Kastrup
2015-09-04 18:35       ` Paul Eggert
2015-09-04 18:53         ` David Kastrup
2015-09-04 18:53     ` Alan Mackenzie
2015-09-05 18:40       ` Paul Eggert
2015-09-09  9:38       ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).