unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20926: 25.0.50; Quotation marks always display as hard quotes
@ 2015-06-29 12:42 Artur Malabarba
  2015-06-29 12:48 ` bruce.connor.am
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Artur Malabarba @ 2015-06-29 12:42 UTC (permalink / raw)
  To: 20926

1. Start emacs -Q
2. go to *scratch* buffer
3. Type C-x RET 8 LEFT SINGLE QUOTATION MARK

At first sight, it seems that a hard quote gets inserted
instead. Examining it with `describe-char' (below) reveals that it is indeed a
round quote, but the display table is hiding it.
Note that the display table hides it even on the Help buffer itself!

The same happens for double quotes. And it's not exlusive to elisp
mode (I tested fundamental and text modes as well).
I haven't managed to follow all of the quote-gate conversation, but
I'm assuming this is a bug, as I can't think of a situation where it
would be right to mask a double quote the user has explicitly typed.

---

             position: 411 of 3041 (13%), column: 0
            character: ‘ (displayed as ‘) (codepoint 8216, #o20030, #x2018)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x2018
               script: symbol
               syntax: . which means: punctuation
             category: .:Base, c:Chinese, h:Korean, j:Japanese
             to input: type "C-x 8 RET 2018" or "C-x 8 RET LEFT SINGLE
QUOTATION MARK"
          buffer code: #xE2 #x80 #x98
            file code: #xE2 #x80 #x98 (encoded by coding system utf-8-emacs)
              display: by display table entry [?'] (see below)

The display table entry is displayed by these fonts (glyph codes):
': xft:-unknown-Ubuntu
Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x0A)

Character code properties: customize what to show
  name: LEFT SINGLE QUOTATION MARK
  old-name: SINGLE TURNED COMMA QUOTATION MARK
  general-category: Pi (Punctuation, Initial quote)
  decomposition: (8216) ('‘')

There are text properties here:
  fontified            t

In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
 of 2015-06-01 on it055607
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04.2 LTS

Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS LIBXML2 FREETYPE XFT
ZLIB

Important settings:
  value of $LANG: en_GB
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: iso-latin-1-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 12:42 bug#20926: 25.0.50; Quotation marks always display as hard quotes Artur Malabarba
@ 2015-06-29 12:48 ` bruce.connor.am
  2015-06-29 13:14   ` Artur Malabarba
  2015-06-29 14:56 ` Eli Zaretskii
  2015-07-02  5:42 ` Paul Eggert
  2 siblings, 1 reply; 19+ messages in thread
From: bruce.connor.am @ 2015-06-29 12:48 UTC (permalink / raw)
  To: 20926

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

To add to the confusion. If I start a regular emacs (i.e., if I *don't* use
emacs -Q), then elisp buffers *do* display round quotations, but text-mode
buffers still don't.


2015-06-29 13:42 GMT+01:00 Artur Malabarba <bruce.connor.am@gmail.com>:

> 1. Start emacs -Q
> 2. go to *scratch* buffer
> 3. Type C-x RET 8 LEFT SINGLE QUOTATION MARK
>
> At first sight, it seems that a hard quote gets inserted
> instead. Examining it with `describe-char' (below) reveals that it is
> indeed a
> round quote, but the display table is hiding it.
> Note that the display table hides it even on the Help buffer itself!
>
> The same happens for double quotes. And it's not exlusive to elisp
> mode (I tested fundamental and text modes as well).
> I haven't managed to follow all of the quote-gate conversation, but
> I'm assuming this is a bug, as I can't think of a situation where it
> would be right to mask a double quote the user has explicitly typed.
>
> ---
>
>              position: 411 of 3041 (13%), column: 0
>             character: ‘ (displayed as ‘) (codepoint 8216, #o20030, #x2018)
>     preferred charset: unicode (Unicode (ISO10646))
> code point in charset: 0x2018
>                script: symbol
>                syntax: . which means: punctuation
>              category: .:Base, c:Chinese, h:Korean, j:Japanese
>              to input: type "C-x 8 RET 2018" or "C-x 8 RET LEFT SINGLE
> QUOTATION MARK"
>           buffer code: #xE2 #x80 #x98
>             file code: #xE2 #x80 #x98 (encoded by coding system
> utf-8-emacs)
>               display: by display table entry [?'] (see below)
>
> The display table entry is displayed by these fonts (glyph codes):
> ': xft:-unknown-Ubuntu
> Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x0A)
>
> Character code properties: customize what to show
>   name: LEFT SINGLE QUOTATION MARK
>   old-name: SINGLE TURNED COMMA QUOTATION MARK
>   general-category: Pi (Punctuation, Initial quote)
>   decomposition: (8216) ('‘')
>
> There are text properties here:
>   fontified            t
>
> In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
>  of 2015-06-01 on it055607
> Windowing system distributor `The X.Org Foundation', version 11.0.11501000
> System Description: Ubuntu 14.04.2 LTS
>
> Configured features:
> XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS LIBXML2 FREETYPE XFT
> ZLIB
>
> Important settings:
>   value of $LANG: en_GB
>   value of $XMODIFIERS: @im=ibus
>   locale-coding-system: iso-latin-1-unix
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
>   tooltip-mode: t
>   global-eldoc-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 3645 bytes --]

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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 12:48 ` bruce.connor.am
@ 2015-06-29 13:14   ` Artur Malabarba
  2015-06-29 15:02     ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Artur Malabarba @ 2015-06-29 13:14 UTC (permalink / raw)
  To: 20926

Just to add some more information.
On the help buffer describing the character, all of the following
lines display a hard ascii quote

>             character: ‘ (displayed as ‘) (codepoint 8216, #o20030, #x2018)
>               display: by display table entry [?'] (see below)
> ': xft:-unknown-Ubuntu Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x0A)

On the other hand, the decomposition line below actually displays a
proper round left quotation mark (between two plain quotes, of
course). So I know that emacs can display them.

>   decomposition: (8216) ('‘')





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 12:42 bug#20926: 25.0.50; Quotation marks always display as hard quotes Artur Malabarba
  2015-06-29 12:48 ` bruce.connor.am
@ 2015-06-29 14:56 ` Eli Zaretskii
  2015-06-29 15:08   ` Artur Malabarba
  2015-07-02  5:42 ` Paul Eggert
  2 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2015-06-29 14:56 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: 20926

> Date: Mon, 29 Jun 2015 13:42:18 +0100
> From: Artur Malabarba <bruce.connor.am@gmail.com>
> 
> 1. Start emacs -Q
> 2. go to *scratch* buffer
> 3. Type C-x RET 8 LEFT SINGLE QUOTATION MARK
> 
> At first sight, it seems that a hard quote gets inserted
> instead. Examining it with `describe-char' (below) reveals that it is indeed a
> round quote, but the display table is hiding it.
> Note that the display table hides it even on the Help buffer itself!
> 
> The same happens for double quotes. And it's not exlusive to elisp
> mode (I tested fundamental and text modes as well).
> I haven't managed to follow all of the quote-gate conversation, but
> I'm assuming this is a bug, as I can't think of a situation where it
> would be right to mask a double quote the user has explicitly typed.

I cannot reproduce this.  What does the below say in that session?

  M-: (char-displayable-p #x2018) RET







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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 13:14   ` Artur Malabarba
@ 2015-06-29 15:02     ` Eli Zaretskii
  2015-06-29 15:10       ` Artur Malabarba
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2015-06-29 15:02 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: 20926

> Date: Mon, 29 Jun 2015 14:14:42 +0100
> From: Artur Malabarba <bruce.connor.am@gmail.com>
> 
> Just to add some more information.
> On the help buffer describing the character, all of the following
> lines display a hard ascii quote
> 
> >             character: ‘ (displayed as ‘) (codepoint 8216, #o20030, #x2018)
> >               display: by display table entry [?'] (see below)
> > ': xft:-unknown-Ubuntu Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x0A)
> 
> On the other hand, the decomposition line below actually displays a
> proper round left quotation mark (between two plain quotes, of
> course).

Go to that left quotation mark on the decomposition line, and type
"C-u C-x =".  That should give you a hint about what's going on there.

> So I know that emacs can display them.

Yes, but does Emacs know that?

The display table is used when Emacs decides at startup that these
characters cannot be displayed.  The code which makes that decision is
in 'set-locale-environment' (see mule-cmds.el, and search for
"char-displayable-p"), which is run at startup.  Can you see what's
going on there?

Also, do you call 'set-locale-environment' in your non-Q session?





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 14:56 ` Eli Zaretskii
@ 2015-06-29 15:08   ` Artur Malabarba
  0 siblings, 0 replies; 19+ messages in thread
From: Artur Malabarba @ 2015-06-29 15:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20926

>> The same happens for double quotes. And it's not exlusive to elisp
>> mode (I tested fundamental and text modes as well).
>> I haven't managed to follow all of the quote-gate conversation, but
>> I'm assuming this is a bug, as I can't think of a situation where it
>> would be right to mask a double quote the user has explicitly typed.
>
> I cannot reproduce this.  What does the below say in that session?
>
>   M-: (char-displayable-p #x2018) RET

#<font-object "-unknown-Ubuntu
Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1">


And allow me to correct myself.
I tried this on latest master (with -Q) and the left quotation mark is
displayed as a grave accent (not as a hard quote). The right quotation
mark is displayed as a hardquote. And both left and right double
quotation marks are displayed as a hard double quote.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 15:02     ` Eli Zaretskii
@ 2015-06-29 15:10       ` Artur Malabarba
  2015-06-29 15:22         ` Artur Malabarba
  2015-06-29 19:23         ` Artur Malabarba
  0 siblings, 2 replies; 19+ messages in thread
From: Artur Malabarba @ 2015-06-29 15:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20926

> Go to that left quotation mark on the decomposition line, and type
> "C-u C-x =".  That should give you a hint about what's going on there.
>
>> So I know that emacs can display them.
>
> Yes, but does Emacs know that?
>
> The display table is used when Emacs decides at startup that these
> characters cannot be displayed.  The code which makes that decision is
> in 'set-locale-environment' (see mule-cmds.el, and search for
> "char-displayable-p"), which is run at startup.  Can you see what's
> going on there?

I'll try to follow up on these later today.

> Also, do you call 'set-locale-environment' in your non-Q session?

Not that I'm aware. And grep shows no instances of it inside my .emacs.d





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 15:10       ` Artur Malabarba
@ 2015-06-29 15:22         ` Artur Malabarba
  2015-06-29 15:32           ` Eli Zaretskii
  2015-06-29 19:23         ` Artur Malabarba
  1 sibling, 1 reply; 19+ messages in thread
From: Artur Malabarba @ 2015-06-29 15:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20926

2015-06-29 16:10 GMT+01:00 Artur Malabarba <bruce.connor.am@gmail.com>:
>> Go to that left quotation mark on the decomposition line, and type
>> "C-u C-x =".  That should give you a hint about what's going on there.

Here's the output of doing that.
It's slightly different from the previous help buffer. I've added some
comments to describe how it shows up for me.

             position: 967 of 1036 (93%), column: 26
#                 Hard v               v Round
            character: ” (displayed as ”) (codepoint 8221, #o20035, #x201d)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x201D
               script: symbol
               syntax: . which means: punctuation
             category: .:Base, c:Chinese, h:Korean, j:Japanese
             to input: type "C-x 8 RET 201d" or "C-x 8 RET RIGHT
DOUBLE QUOTATION MARK"
          buffer code: #xE2 #x80 #x9D
            file code: not encodable by coding system iso-latin-1-unix
#                                          Hard v
              display: by display table entry [?"] (see below)

The display table entry is displayed by these fonts (glyph codes):
#v Hard
": xft:-unknown-Ubuntu
Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x05)

Composed by the rule:
#         v Round
(TAB ?” TAB)
The component character(s) are displayed by these fonts (glyph codes):
#v Round
 ”: xft:-unknown-Ubuntu
Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x71)
See the variable `reference-point-alist' for the meaning of the rule.

Character code properties: customize what to show
  name: RIGHT DOUBLE QUOTATION MARK
  old-name: DOUBLE COMMA QUOTATION MARK
  general-category: Pf (Punctuation, Final quote)
#                         v Round
  decomposition: (8221) ('”')

There are text properties here:
  composition          [Show]     The value here is (4 1 [9 8221 9])


[back]





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 15:22         ` Artur Malabarba
@ 2015-06-29 15:32           ` Eli Zaretskii
  2015-06-29 15:38             ` Artur Malabarba
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2015-06-29 15:32 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: 20926

> Date: Mon, 29 Jun 2015 16:22:49 +0100
> From: Artur Malabarba <bruce.connor.am@gmail.com>
> Cc: 20926@debbugs.gnu.org
> 
> 2015-06-29 16:10 GMT+01:00 Artur Malabarba <bruce.connor.am@gmail.com>:
> >> Go to that left quotation mark on the decomposition line, and type
> >> "C-u C-x =".  That should give you a hint about what's going on there.
> 
> Here's the output of doing that.

I knew how it will look, I wanted _you_ to see it. ;-)

This is the crucial part:

> Composed by the rule:
> #         v Round
> (TAB ?” TAB)

That's why this displays differently: it uses a composition rule,
which makes the display engine take a different path through the code.

This means that there's a hole in our machinery that takes care of
terminals incapable of displaying these characters: that machinery
doesn't catch auto-composed characters.

This doesn't explain why you see the original problem, but it should
explain why "C-u C-x =" shows the Unicode characters nonetheless.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 15:32           ` Eli Zaretskii
@ 2015-06-29 15:38             ` Artur Malabarba
  2015-06-29 16:18               ` Artur Malabarba
  0 siblings, 1 reply; 19+ messages in thread
From: Artur Malabarba @ 2015-06-29 15:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20926

I see, so it was a bug within the bug... :)

2015-06-29 16:32 GMT+01:00 Eli Zaretskii <eliz@gnu.org>:
>> Date: Mon, 29 Jun 2015 16:22:49 +0100
>> From: Artur Malabarba <bruce.connor.am@gmail.com>
>> Cc: 20926@debbugs.gnu.org
>>
>> 2015-06-29 16:10 GMT+01:00 Artur Malabarba <bruce.connor.am@gmail.com>:
>> >> Go to that left quotation mark on the decomposition line, and type
>> >> "C-u C-x =".  That should give you a hint about what's going on there.
>>
>> Here's the output of doing that.
>
> I knew how it will look, I wanted _you_ to see it. ;-)
>
> This is the crucial part:
>
>> Composed by the rule:
>> #         v Round
>> (TAB ?” TAB)
>
> That's why this displays differently: it uses a composition rule,
> which makes the display engine take a different path through the code.
>
> This means that there's a hole in our machinery that takes care of
> terminals incapable of displaying these characters: that machinery
> doesn't catch auto-composed characters.
>
> This doesn't explain why you see the original problem, but it should
> explain why "C-u C-x =" shows the Unicode characters nonetheless.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 15:38             ` Artur Malabarba
@ 2015-06-29 16:18               ` Artur Malabarba
  2015-06-29 16:57                 ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Artur Malabarba @ 2015-06-29 16:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20926

Also, any idea why it would be mode-dependant?

2015-06-29 16:38 GMT+01:00 Artur Malabarba <bruce.connor.am@gmail.com>:
> I see, so it was a bug within the bug... :)
>
> 2015-06-29 16:32 GMT+01:00 Eli Zaretskii <eliz@gnu.org>:
>>> Date: Mon, 29 Jun 2015 16:22:49 +0100
>>> From: Artur Malabarba <bruce.connor.am@gmail.com>
>>> Cc: 20926@debbugs.gnu.org
>>>
>>> 2015-06-29 16:10 GMT+01:00 Artur Malabarba <bruce.connor.am@gmail.com>:
>>> >> Go to that left quotation mark on the decomposition line, and type
>>> >> "C-u C-x =".  That should give you a hint about what's going on there.
>>>
>>> Here's the output of doing that.
>>
>> I knew how it will look, I wanted _you_ to see it. ;-)
>>
>> This is the crucial part:
>>
>>> Composed by the rule:
>>> #         v Round
>>> (TAB ?” TAB)
>>
>> That's why this displays differently: it uses a composition rule,
>> which makes the display engine take a different path through the code.
>>
>> This means that there's a hole in our machinery that takes care of
>> terminals incapable of displaying these characters: that machinery
>> doesn't catch auto-composed characters.
>>
>> This doesn't explain why you see the original problem, but it should
>> explain why "C-u C-x =" shows the Unicode characters nonetheless.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 16:18               ` Artur Malabarba
@ 2015-06-29 16:57                 ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2015-06-29 16:57 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: 20926

> Date: Mon, 29 Jun 2015 17:18:54 +0100
> From: Artur Malabarba <bruce.connor.am@gmail.com>
> Cc: 20926@debbugs.gnu.org
> 
> Also, any idea why it would be mode-dependant?

Perhaps the setting of the display table depends on the mode.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 15:10       ` Artur Malabarba
  2015-06-29 15:22         ` Artur Malabarba
@ 2015-06-29 19:23         ` Artur Malabarba
  1 sibling, 0 replies; 19+ messages in thread
From: Artur Malabarba @ 2015-06-29 19:23 UTC (permalink / raw)
  Cc: 20926

2015-06-29 16:10 GMT+01:00 Artur Malabarba <bruce.connor.am@gmail.com>:
>> Go to that left quotation mark on the decomposition line, and type
>> "C-u C-x =".  That should give you a hint about what's going on there.
>>
>>> So I know that emacs can display them.
>>
>> Yes, but does Emacs know that?
>>
>> The display table is used when Emacs decides at startup that these
>> characters cannot be displayed.  The code which makes that decision is
>> in 'set-locale-environment' (see mule-cmds.el, and search for
>> "char-displayable-p"), which is run at startup.  Can you see what's
>> going on there?
>
> I'll try to follow up on these later today.

Just to keep things posted, I can't reproduce this at home. So I'll
have to follow yup at work.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-06-29 12:42 bug#20926: 25.0.50; Quotation marks always display as hard quotes Artur Malabarba
  2015-06-29 12:48 ` bruce.connor.am
  2015-06-29 14:56 ` Eli Zaretskii
@ 2015-07-02  5:42 ` Paul Eggert
  2015-07-02 10:12   ` Artur Malabarba
  2015-07-02 14:46   ` Eli Zaretskii
  2 siblings, 2 replies; 19+ messages in thread
From: Paul Eggert @ 2015-07-02  5:42 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: 20926

I reproduced the originally-reported bug and installed a patch as master commit 
bb35a21c0e8a4b82ac04fa26a53f6ca394afbb24.

I'm not quite following the "hole in our machinery" a.k.a. "bug within the bug" 
issue.  Perhaps a separate bug report should be filed for the other bug? 
Anyway, I think the original bug is fixed now; please give it a try.

By the way, after giving the fix a try I suggest changing your locale from 
'en_GB' to 'en_GB.utf8', most likely by setting the LC_ALL or LANG environment 
variables.  I don't know why utf8 is not the default encoding, but these days 
it's probably what you want.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-07-02  5:42 ` Paul Eggert
@ 2015-07-02 10:12   ` Artur Malabarba
  2015-07-02 14:11     ` Paul Eggert
  2015-07-02 14:46   ` Eli Zaretskii
  1 sibling, 1 reply; 19+ messages in thread
From: Artur Malabarba @ 2015-07-02 10:12 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 20926

2015-07-02 6:42 GMT+01:00 Paul Eggert <eggert@cs.ucla.edu>:
> I reproduced the originally-reported bug and installed a patch as master
> commit bb35a21c0e8a4b82ac04fa26a53f6ca394afbb24.

Thanks Paul, I can confirm it's fixed for me

> I'm not quite following the "hole in our machinery" a.k.a. "bug within the
> bug" issue.  Perhaps a separate bug report should be filed for the other
> bug?

The point was that even though Emacs thought that the "left quotation
mark" character was not displayable, the composition engine still
tried displaying it in the help buffer. But I'm not sure that's a bug
at all.

> By the way, after giving the fix a try I suggest changing your locale from
> 'en_GB' to 'en_GB.utf8', most likely by setting the LC_ALL or LANG
> environment variables.  I don't know why utf8 is not the default encoding,
> but these days it's probably what you want.

Will do, thanks.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-07-02 10:12   ` Artur Malabarba
@ 2015-07-02 14:11     ` Paul Eggert
  0 siblings, 0 replies; 19+ messages in thread
From: Paul Eggert @ 2015-07-02 14:11 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: 20926-done

Artur Malabarba wrote:
> Thanks Paul, I can confirm it's fixed for me

Thanks for checking; marking this as done.






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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-07-02  5:42 ` Paul Eggert
  2015-07-02 10:12   ` Artur Malabarba
@ 2015-07-02 14:46   ` Eli Zaretskii
  2015-07-02 16:34     ` Paul Eggert
  1 sibling, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2015-07-02 14:46 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 20926, bruce.connor.am

> Date: Wed, 01 Jul 2015 22:42:56 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: Eli Zaretskii <eliz@gnu.org>, 20926@debbugs.gnu.org
> 
> I reproduced the originally-reported bug and installed a patch as master commit 
> bb35a21c0e8a4b82ac04fa26a53f6ca394afbb24.

Thanks.

But what will that change do to "emacs -batch", where you earlier
arranged for use of the display table?  AFAIU, the new code will not
set up the display table in batch mode, is that correct?  If so,
messages and documentation displayed in batch mode might be illegible
on some text terminals.

> I'm not quite following the "hole in our machinery" a.k.a. "bug within the bug" 
> issue.  Perhaps a separate bug report should be filed for the other bug? 

No, it's the same issue.  The problem is that, although both
char-displayable-p and describe-char-padded-string (called by
"C-u C-x =" to display a character without risking its composition
with the neighboring ones) call the same primitive to find out whether
the character can be displayed, the latter does that dynamically at
run time, whereas the code which runs during startup and determines
whether to set up the display table does that only once.  So, for
example, if the user changes her font configuration without restarting
the session, and the quote characters change their display-ability,
"C-u C-x =" will pick that up, but the display table will not be
recomputed.

That's the "hole" I alluded to.  We need somehow to make sure that
whenever fonts are changed or the encoding of a TTY frame changes, the
display table is recomputed accordingly.

> Anyway, I think the original bug is fixed now; please give it a try.
> 
> By the way, after giving the fix a try I suggest changing your locale from 
> 'en_GB' to 'en_GB.utf8', most likely by setting the LC_ALL or LANG environment 
> variables.  I don't know why utf8 is not the default encoding, but these days 
> it's probably what you want.

How is the locale's codeset relevant here?  The issue was encountered
in a GUI session, where that should be unimportant.  Only the fonts
that are available should be important.





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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-07-02 14:46   ` Eli Zaretskii
@ 2015-07-02 16:34     ` Paul Eggert
  2015-07-02 16:41       ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Paul Eggert @ 2015-07-02 16:34 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20926, bruce.connor.am

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

Eli Zaretskii wrote:
> messages and documentation displayed in batch mode might be illegible
> on some text terminals.

Thanks, I hadn't thought of that, and overoptimized.  Easy enough to do the 
check even if -batch.  I installed the attached patch.

> How is the locale's codeset relevant here?  The issue was encountered
> in a GUI session, where that should be unimportant.

Yes, but the bug was that Emacs hadn't initialized the GUI yet and so 
char-displayable-p acted as if in a tty session.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-batch-should-not-affect-display.patch --]
[-- Type: text/x-diff; name="0001-batch-should-not-affect-display.patch", Size: 1603 bytes --]

From 28217db57c7f1853a4c98ed0a32c2051a2a37807 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 2 Jul 2015 09:29:51 -0700
Subject: [PATCH] =?UTF-8?q?-batch=20should=20not=20affect=20=E2=80=98?=
 =?UTF-8?q?=E2=80=99=20->=20`'=20display?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/startup.el (command-line): Do the ‘’ -> `' check even if
-batch (Bug#20926).
---
 lisp/startup.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index 4f1e315..cfe2269 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1018,12 +1018,11 @@ please check its value")
     (setq no-blinking-cursor t))
 
   ;; If curved quotes don't work, display ASCII approximations.
-  (unless noninteractive
-    (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)))))
+  (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))))
 
   ;; Re-evaluate predefined variables whose initial value depends on
   ;; the runtime context.
-- 
2.1.0


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

* bug#20926: 25.0.50; Quotation marks always display as hard quotes
  2015-07-02 16:34     ` Paul Eggert
@ 2015-07-02 16:41       ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2015-07-02 16:41 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 20926, bruce.connor.am

> Date: Thu, 02 Jul 2015 09:34:44 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: bruce.connor.am@gmail.com, 20926@debbugs.gnu.org
> 
> > messages and documentation displayed in batch mode might be illegible
> > on some text terminals.
> 
> Thanks, I hadn't thought of that, and overoptimized.  Easy enough to do the 
> check even if -batch.  I installed the attached patch.

Thanks.

> > How is the locale's codeset relevant here?  The issue was encountered
> > in a GUI session, where that should be unimportant.
> 
> Yes, but the bug was that Emacs hadn't initialized the GUI yet and so 
> char-displayable-p acted as if in a tty session.

Sure, but that was part of the bug, now fixed.  So now the locale's
codeset should not matter in that use case, as expected.





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

end of thread, other threads:[~2015-07-02 16:41 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 12:42 bug#20926: 25.0.50; Quotation marks always display as hard quotes Artur Malabarba
2015-06-29 12:48 ` bruce.connor.am
2015-06-29 13:14   ` Artur Malabarba
2015-06-29 15:02     ` Eli Zaretskii
2015-06-29 15:10       ` Artur Malabarba
2015-06-29 15:22         ` Artur Malabarba
2015-06-29 15:32           ` Eli Zaretskii
2015-06-29 15:38             ` Artur Malabarba
2015-06-29 16:18               ` Artur Malabarba
2015-06-29 16:57                 ` Eli Zaretskii
2015-06-29 19:23         ` Artur Malabarba
2015-06-29 14:56 ` Eli Zaretskii
2015-06-29 15:08   ` Artur Malabarba
2015-07-02  5:42 ` Paul Eggert
2015-07-02 10:12   ` Artur Malabarba
2015-07-02 14:11     ` Paul Eggert
2015-07-02 14:46   ` Eli Zaretskii
2015-07-02 16:34     ` Paul Eggert
2015-07-02 16:41       ` Eli Zaretskii

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).