Gnus development mailing list
 help / color / mirror / Atom feed
* Colouring ins and del tags?
@ 2016-02-06 20:46 Adam Sjøgren
  2016-02-06 20:57 ` Adam Sjøgren
  2016-02-07  2:05 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 10+ messages in thread
From: Adam Sjøgren @ 2016-02-06 20:46 UTC (permalink / raw)
  To: ding

How about colouring <ins> tags green and <del> tags red in shr by default?


  Best regards,

    Adam

-- 
 "Hur långt man än har kommit                                 Adam Sjøgren
  är det alltid längre kvar"                             asjo@koldfront.dk




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

* Re: Colouring ins and del tags?
  2016-02-06 20:46 Colouring ins and del tags? Adam Sjøgren
@ 2016-02-06 20:57 ` Adam Sjøgren
  2016-02-07  2:12   ` Lars Ingebrigtsen
  2016-02-07  2:05 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2016-02-06 20:57 UTC (permalink / raw)
  To: ding

Adam writes:

> How about colouring <ins> tags green and <del> tags red in shr by default?

Something like this, perhaps:

(defun shr-tag-ins (cont)
  (let* ((start (point))
         (color "green")
         (shr-stylesheet (nconc (list (cons 'color color))
				shr-stylesheet)))
    (shr-generic cont)
    (shr-colorize-region start (point) color
                         (cdr (assq 'background-color shr-stylesheet)))))

(defun shr-tag-del (cont)
  (let* ((start (point))
         (color "red")
         (shr-stylesheet (nconc (list (cons 'color color))
				shr-stylesheet)))
    (shr-fontize-cont cont 'shr-strike-through)
    (shr-colorize-region start (point) color
                         (cdr (assq 'background-color shr-stylesheet)))))


  Best regards,

    Adam

-- 
 "HENCE, I think that all UNIXs should have an EMACS,         Adam Sjøgren
  and everybody should run UNIX!"                        asjo@koldfront.dk




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

* Re: Colouring ins and del tags?
  2016-02-06 20:46 Colouring ins and del tags? Adam Sjøgren
  2016-02-06 20:57 ` Adam Sjøgren
@ 2016-02-07  2:05 ` Lars Ingebrigtsen
  2016-02-07  5:16   ` Random832
  1 sibling, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-07  2:05 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> How about colouring <ins> tags green and <del> tags red in shr by default?

I've not heard about <ins> or <del> before, but <del> is for marking
text that has been deleted?  How about using -overstrike-?

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



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

* Re: Colouring ins and del tags?
  2016-02-06 20:57 ` Adam Sjøgren
@ 2016-02-07  2:12   ` Lars Ingebrigtsen
  2016-02-07 12:39     ` Adam Sjøgren
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-07  2:12 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

>     (shr-fontize-cont cont 'shr-strike-through)

Oh, you already did that.

I've now installed your changes in the Emacs trunk (with some changes).

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



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

* Re: Colouring ins and del tags?
  2016-02-07  2:05 ` Lars Ingebrigtsen
@ 2016-02-07  5:16   ` Random832
  2016-02-08  5:11     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Random832 @ 2016-02-07  5:16 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> asjo@koldfront.dk (Adam Sjøgren) writes:
>
>> How about colouring <ins> tags green and <del> tags red in shr by default?
>
> I've not heard about <ins> or <del> before, but <del> is for marking
> text that has been deleted?  How about using -overstrike-?

Traditionally (on web browsers, that is) <ins> is marked with underline,
and <del> with strike through.




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

* Re: Colouring ins and del tags?
  2016-02-07  2:12   ` Lars Ingebrigtsen
@ 2016-02-07 12:39     ` Adam Sjøgren
  0 siblings, 0 replies; 10+ messages in thread
From: Adam Sjøgren @ 2016-02-07 12:39 UTC (permalink / raw)
  To: ding

Lars writes:

> asjo@koldfront.dk (Adam Sjøgren) writes:
>
>>     (shr-fontize-cont cont 'shr-strike-through)
>
> Oh, you already did that.

shr already did so, I just didn't notice.

> I've now installed your changes in the Emacs trunk (with some
> changes).

Thanks! (I was doing the old copy/paste-o-coding, so...)


  Best regards,

    Adam

-- 
 "There's such a glut of celebrities that they'll soon        Adam Sjøgren
  have to begin storing the surplus in silos in Iowa."   asjo@koldfront.dk




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

* Re: Colouring ins and del tags?
  2016-02-07  5:16   ` Random832
@ 2016-02-08  5:11     ` Lars Ingebrigtsen
  2016-02-08  5:37       ` Adam Sjøgren
  2016-02-08 15:24       ` Random832
  0 siblings, 2 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-08  5:11 UTC (permalink / raw)
  To: Random832; +Cc: ding

Random832 <random832@fastmail.com> writes:

> Traditionally (on web browsers, that is) <ins> is marked with underline,
> and <del> with strike through.

Then perhaps we should just be doing that instead of adding colours,
too?

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



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

* Re: Colouring ins and del tags?
  2016-02-08  5:11     ` Lars Ingebrigtsen
@ 2016-02-08  5:37       ` Adam Sjøgren
  2016-02-08  5:47         ` Lars Ingebrigtsen
  2016-02-08 15:24       ` Random832
  1 sibling, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2016-02-08  5:37 UTC (permalink / raw)
  To: ding

Lars writes:

> Random832 <random832@fastmail.com> writes:
>
>> Traditionally (on web browsers, that is) <ins> is marked with underline,
>> and <del> with strike through.

> Then perhaps we should just be doing that instead of adding colours,
> too?

Perhaps. I'm not sure about how traditional the underline thing is.
Strike through seems obvious. The HTML5 standard doesn't mention either,
though.

Does shr have a "user defined stylesheet", that could be used for this
kind of preferences?


  Best regards,

    Adam

-- 
 "Gav                                                         Adam Sjøgren
  Strik"                                                 asjo@koldfront.dk




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

* Re: Colouring ins and del tags?
  2016-02-08  5:37       ` Adam Sjøgren
@ 2016-02-08  5:47         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-08  5:47 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Perhaps. I'm not sure about how traditional the underline thing is.
> Strike through seems obvious. The HTML5 standard doesn't mention either,
> though.
>
> Does shr have a "user defined stylesheet", that could be used for this
> kind of preferences?

Nope.  Well, I don't think so.  In any case, the defaults should be...
as unsurprising as possible.  :-)

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



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

* Re: Colouring ins and del tags?
  2016-02-08  5:11     ` Lars Ingebrigtsen
  2016-02-08  5:37       ` Adam Sjøgren
@ 2016-02-08 15:24       ` Random832
  1 sibling, 0 replies; 10+ messages in thread
From: Random832 @ 2016-02-08 15:24 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ding

On Mon, Feb 8, 2016, at 00:11, Lars Ingebrigtsen wrote:
> Random832 <random832@fastmail.com> writes:
> 
> > Traditionally (on web browsers, that is) <ins> is marked with underline,
> > and <del> with strike through.
> 
> Then perhaps we should just be doing that instead of adding colours,
> too?

There's a disadvantage there, that most text-mode terminals do not
support strike-through, and many don't support underline (or "support"
it with an arbitrarily chosen color, often blue). I think faces can be
set up in a way that they depend on attributes of the terminal - maybe
use underline/strikeout if supported, otherwise use colors (green/red),
and if neither is supported, use +ins+/-del- (I don't think faces can do
this, but you could use the same mechanism as file-name-shadow.)

For another data point: lynx brackets ins and del text in [DEL: deleted
:DEL] and [INS: inserted :INS]. (It also treats "s" as del, but ignores
"u")



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

end of thread, other threads:[~2016-02-08 15:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-06 20:46 Colouring ins and del tags? Adam Sjøgren
2016-02-06 20:57 ` Adam Sjøgren
2016-02-07  2:12   ` Lars Ingebrigtsen
2016-02-07 12:39     ` Adam Sjøgren
2016-02-07  2:05 ` Lars Ingebrigtsen
2016-02-07  5:16   ` Random832
2016-02-08  5:11     ` Lars Ingebrigtsen
2016-02-08  5:37       ` Adam Sjøgren
2016-02-08  5:47         ` Lars Ingebrigtsen
2016-02-08 15:24       ` Random832

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