Gnus development mailing list
 help / color / mirror / Atom feed
* small highlight problem with shr.el
@ 2010-10-20 19:28 Ted Zlatanov
  2010-10-21  1:09 ` Katsumi Yamaoka
  2010-10-21  1:44 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 10+ messages in thread
From: Ted Zlatanov @ 2010-10-20 19:28 UTC (permalink / raw)
  To: ding

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

I use a wide screen (200+ columns) but articles are wrapped at 80
columns.  So I often see this (any highlight will do, as long as it
changes the background color):

text text text <b>BOLD BOLD[column 80]bbbbbbbbbbbbbbbb[column 200]
BOLD</b> text text

Where "bbbbbbbbbbbbbbbb" is a continuation of the background
highlight to the next line.  It looks ugly.  Here's a screenshot:


[-- Attachment #2: highlight-goes-on.png --]
[-- Type: image/png, Size: 4511 bytes --]

[-- Attachment #3: Type: text/plain, Size: 5 bytes --]


Ted

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

* Re: small highlight problem with shr.el
  2010-10-20 19:28 small highlight problem with shr.el Ted Zlatanov
@ 2010-10-21  1:09 ` Katsumi Yamaoka
  2010-10-21  1:32   ` Lars Magne Ingebrigtsen
  2010-10-21  1:44 ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 10+ messages in thread
From: Katsumi Yamaoka @ 2010-10-21  1:09 UTC (permalink / raw)
  To: ding

Ted Zlatanov wrote:
> I use a wide screen (200+ columns) but articles are wrapped at 80
> columns.  So I often see this (any highlight will do, as long as it
> changes the background color):

> text text text <b>BOLD BOLD[column 80]bbbbbbbbbbbbbbbb[column 200]
> BOLD</b> text text

> Where "bbbbbbbbbbbbbbbb" is a continuation of the background
> highlight to the next line.  It looks ugly.  Here's a screenshot:

I often see it in the customization buffer for string (or function,
etc.) options.  But it seems troublesome to make ELisp code exclude
newlines while highlighting text.  How about asking Emacs team to
introduce a new user option?  It defaults to t and newlines will
never be highlighted.



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

* Re: small highlight problem with shr.el
  2010-10-21  1:09 ` Katsumi Yamaoka
@ 2010-10-21  1:32   ` Lars Magne Ingebrigtsen
  2010-10-21  1:41     ` Katsumi Yamaoka
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-21  1:32 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I often see it in the customization buffer for string (or function,
> etc.) options.  But it seems troublesome to make ELisp code exclude
> newlines while highlighting text.  How about asking Emacs team to
> introduce a new user option?  It defaults to t and newlines will
> never be highlighted.

That would be generally useful, but I'm not sure it would help in shr.
If you have indented text like this:

    Text that is
    underlined over two lines

Then you don't want the indentation to have the underline, and you don't
want to the newline to have it, either.  So I think the shr highlighting
code has to insert split font properties anyway...

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: small highlight problem with shr.el
  2010-10-21  1:32   ` Lars Magne Ingebrigtsen
@ 2010-10-21  1:41     ` Katsumi Yamaoka
  2010-10-21  1:45       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Katsumi Yamaoka @ 2010-10-21  1:41 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> I often see it in the customization buffer for string (or function,
>> etc.) options.  But it seems troublesome to make ELisp code exclude
>> newlines while highlighting text.  How about asking Emacs team to
>> introduce a new user option?  It defaults to t and newlines will
>> never be highlighted.

> That would be generally useful, but I'm not sure it would help in shr.
> If you have indented text like this:

>     Text that is
>     underlined over two lines

> Then you don't want the indentation to have the underline, and you don't
> want to the newline to have it, either.  So I think the shr highlighting
> code has to insert split font properties anyway...

The new user option can be a regexp like " *\n *".  ;-p



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

* Re: small highlight problem with shr.el
  2010-10-20 19:28 small highlight problem with shr.el Ted Zlatanov
  2010-10-21  1:09 ` Katsumi Yamaoka
@ 2010-10-21  1:44 ` Lars Magne Ingebrigtsen
  2010-10-21 18:22   ` Ted Zlatanov
  1 sibling, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-21  1:44 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Where "bbbbbbbbbbbbbbbb" is a continuation of the background
> highlight to the next line.  It looks ugly.  Here's a screenshot:

Should be fixed now.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: small highlight problem with shr.el
  2010-10-21  1:41     ` Katsumi Yamaoka
@ 2010-10-21  1:45       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-21  1:45 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> The new user option can be a regexp like " *\n *".  ;-p

:-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: small highlight problem with shr.el
  2010-10-21  1:44 ` Lars Magne Ingebrigtsen
@ 2010-10-21 18:22   ` Ted Zlatanov
  2010-10-26 14:14     ` Ted Zlatanov
  0 siblings, 1 reply; 10+ messages in thread
From: Ted Zlatanov @ 2010-10-21 18:22 UTC (permalink / raw)
  To: ding

On Thu, 21 Oct 2010 03:44:53 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Where "bbbbbbbbbbbbbbbb" is a continuation of the background
>> highlight to the next line.  It looks ugly.  Here's a screenshot:

LMI> Should be fixed now.

Confirmed.  Thank you!

Ted




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

* Re: small highlight problem with shr.el
  2010-10-21 18:22   ` Ted Zlatanov
@ 2010-10-26 14:14     ` Ted Zlatanov
  2010-10-29 23:03       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Ted Zlatanov @ 2010-10-26 14:14 UTC (permalink / raw)
  To: ding

On Thu, 21 Oct 2010 13:22:48 -0500 Ted Zlatanov <tzz@lifelogs.com> wrote: 

TZ> On Thu, 21 Oct 2010 03:44:53 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 
LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>>> Where "bbbbbbbbbbbbbbbb" is a continuation of the background
>>> highlight to the next line.  It looks ugly.  Here's a screenshot:

LMI> Should be fixed now.

TZ> Confirmed.  Thank you!

I noticed this highlight problem happens with mouse hover.  When a link
spans a newline and the pointer hovers over the link, the newline is
highlighted to the end of the window.  It's a really minor issue but I
thought I'd mention it.

Ted




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

* Re: small highlight problem with shr.el
  2010-10-26 14:14     ` Ted Zlatanov
@ 2010-10-29 23:03       ` Lars Magne Ingebrigtsen
  2010-10-30  4:41         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-29 23:03 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> I noticed this highlight problem happens with mouse hover.  When a link
> spans a newline and the pointer hovers over the link, the newline is
> highlighted to the end of the window.  It's a really minor issue but I
> thought I'd mention it.

That's actually not easy to fix.  :-/  shr uses `widget-convert-button'
to make stuff into buttons, and that takes a region.  If shr were to
break up the region, then there would be two buttons, and `TAB' would
stop twice in the same link...

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: small highlight problem with shr.el
  2010-10-29 23:03       ` Lars Magne Ingebrigtsen
@ 2010-10-30  4:41         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-30  4:41 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> If shr were to break up the region, then there would be two buttons,
> and `TAB' would stop twice in the same link...

This is what happens with buttons in tables, by the way, and it's
slightly annoying.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

end of thread, other threads:[~2010-10-30  4:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-20 19:28 small highlight problem with shr.el Ted Zlatanov
2010-10-21  1:09 ` Katsumi Yamaoka
2010-10-21  1:32   ` Lars Magne Ingebrigtsen
2010-10-21  1:41     ` Katsumi Yamaoka
2010-10-21  1:45       ` Lars Magne Ingebrigtsen
2010-10-21  1:44 ` Lars Magne Ingebrigtsen
2010-10-21 18:22   ` Ted Zlatanov
2010-10-26 14:14     ` Ted Zlatanov
2010-10-29 23:03       ` Lars Magne Ingebrigtsen
2010-10-30  4:41         ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).