GNU bug report logs - #34018
EWW: Face property changes around newlines

Previous Next

Package: emacs;

Reported by: "T.V Raman" <raman <at> google.com>

Date: Tue, 8 Jan 2019 21:43:02 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34018 in the body.
You can then email your comments to 34018 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34018; Package emacs. (Tue, 08 Jan 2019 21:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "T.V Raman" <raman <at> google.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Jan 2019 21:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "T.V Raman" <raman <at> google.com>
To: emacs-devel <at> gnu.org
Cc: bug-gnu-emacs <at> gnu.org
Subject: EWW: Face property changes around newlines 
Date: Tue, 08 Jan 2019 13:41:42 -0800
In general, font-lock in emacs tends to set properties  like so:

If you have a doc string that is multiline, the whitespace in that
comment -- including the newline chars-- get the  same font/face property.

EWW appears to work differently -- if you take a plain paragraph that
spans multiple lines, the text uses "variable-pitch" as  the face
property -- except that that property is not set on the newline
characters within the paragraph. 

I'm sure this makes no visible difference to the layout -- but it
affects Emacspeak's logic for breaking content into meaningful
clauses. Could EWW be made consistent with the rest of Emacs' font-lock
in this regard?
-- 
Id: kg:/m/0285kf1 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34018; Package emacs. (Wed, 09 Jan 2019 15:02:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "T.V Raman" <raman <at> google.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: bug-gnu-emacs <at> gnu.org, emacs-devel <at> gnu.org
Subject: Re: EWW: Face property changes around newlines
Date: Wed, 09 Jan 2019 07:01:02 -0800
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:


Hi Stefan --

Here is the problem; it's not that easy from the emacspeak side -- see
below.

Emacspeak uses the following algorithm to split text into chunks before
sending to the TTS engine.

1. Split by clauses -- where "clause" is determined by the buffer's
syntax table.

2. Next, split the clause into chunks based on property changes -- since
"changing voice params on any TTS engine triggres a clause boundary.
3. (2) is achieved by calling next-single-property-change

4. Result -- in EWW buffers, next-single-property-change always goes to
the newline  char when on text that isn't otherwise decorated
i.e. variable-pitch->nil for the 'face property.

For now I discovered the shr-use-fonts option and turned it off --- that
appears to fix my problem in large part. 

>> EWW appears to work differently -- if you take a plain paragraph that
>> spans multiple lines, the text uses "variable-pitch" as  the face
>> property -- except that that property is not set on the newline
>> characters within the paragraph.
>
> I'm not sure how hard/easy it may be to change SHR (used by EWW) to do
> that, but I have the impression that it may be non-trivial.
>
>> I'm sure this makes no visible difference to the layout -- but it
>> affects Emacspeak's logic for breaking content into meaningful
>> clauses.
>
> Maybe it would be simpler to change Emacspeak so it ignores face
> properties on whitespace?
>
>
>         Stefan
>
>

-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34018; Package emacs. (Wed, 09 Jan 2019 21:17:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: "T.V Raman" <raman <at> google.com>
Cc: bug-gnu-emacs <at> gnu.org, emacs-devel <at> gnu.org
Subject: Re: EWW: Face property changes around newlines
Date: Wed, 09 Jan 2019 16:15:59 -0500
> 2. Next, split the clause into chunks based on property changes -- since
> "changing voice params on any TTS engine triggres a clause boundary.
> 3. (2) is achieved by calling next-single-property-change

What I was thinking is that after calling next-single-property-change,
skip the subsequent whitespace and check to see if the property is back
to its previous value after the whitespace.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34018; Package emacs. (Wed, 09 Jan 2019 21:20:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "T.V Raman" <raman <at> google.com>
To: monnier <at> IRO.UMontreal.CA
Cc: bug-gnu-emacs <at> gnu.org, emacs-devel <at> gnu.org, raman <at> google.com
Subject: Re: EWW: Face property changes around newlines
Date: Wed, 9 Jan 2019 13:19:17 -0800
Yes, that would work --- 
Stefan Monnier writes:
 > > 2. Next, split the clause into chunks based on property changes -- since
 > > "changing voice params on any TTS engine triggres a clause boundary.
 > > 3. (2) is achieved by calling next-single-property-change
 > 
 > What I was thinking is that after calling next-single-property-change,
 > skip the subsequent whitespace and check to see if the property is back
 > to its previous value after the whitespace.
 > 
 > 
 >         Stefan

-- 
Id: kg:/m/0285kf1 

-- 
Id: kg:/m/0285kf1 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34018; Package emacs. (Mon, 13 May 2019 18:01:01 GMT) Full text and rfc822 format available.

Message #17 received at 34018 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "T.V Raman" <raman <at> google.com>
Cc: 34018 <at> debbugs.gnu.org, monnier <at> IRO.UMontreal.CA, emacs-devel <at> gnu.org
Subject: Re: bug#34018: EWW: Face property changes around newlines
Date: Mon, 13 May 2019 14:00:32 -0400
"T.V Raman" <raman <at> google.com> writes:

> Yes, that would work --- 

OK; seems like this doesn't require any changes in eww, then, so I'm
closing the bug report.

(The reason shr doesn't apply (some of the) face properties to the
newline character is that that things like underline would then extend
to the end of the line, which looks very ugly.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 13 May 2019 18:01:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 34018 <at> debbugs.gnu.org and "T.V Raman" <raman <at> google.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 13 May 2019 18:01:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Jun 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.