Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* 2 x summary buffer line color
@ 2012-11-29 16:41 Emanuel Berg
  2012-11-29 19:20 ` Oleksandr Gavenko
       [not found] ` <mailman.14077.1354216834.855.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Emanuel Berg @ 2012-11-29 16:41 UTC (permalink / raw)
  To: info-gnus-english

1) I'd like a line in the summary buffer only to tell author and
subject, but I'd like those elements to be in different colors.

This is how far I got (in .gnus):

(setq gnus-summary-line-format "%U%R%I%a: %s\n")

Is there a markup for colors?

2) How do you define your own highlighting as for read and unread
articles? Again, I added this to .gnus, but it fell short because I
don't know how to define those last elements of the association list
element (they are not Emacs variables, and not Emacs functions, and
those are the only things I know how to track (with C-h v and C-h f,
respectively)).

(setq gnus-summary-highlight
      '(((eq mark gnus-unread-mark) . gnus-summary-normal-unread)
        (t . gnus-summary-normal-read) ))

Thank you :)
-- 
Emanuel Berg - programmer (hire me!)
CV + code + screenshots: http://user.it.uu.se/~embe8573

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

* Re: 2 x summary buffer line color
  2012-11-29 16:41 2 x summary buffer line color Emanuel Berg
@ 2012-11-29 19:20 ` Oleksandr Gavenko
       [not found] ` <mailman.14077.1354216834.855.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Oleksandr Gavenko @ 2012-11-29 19:20 UTC (permalink / raw)
  To: info-gnus-english

On 2012-11-29, Emanuel Berg wrote:

> 2) How do you define your own highlighting as for read and unread
> articles? Again, I added this to .gnus, but it fell short because I
> don't know how to define those last elements of the association list
> element (they are not Emacs variables, and not Emacs functions, and
> those are the only things I know how to track (with C-h v and C-h f,
> respectively)).
>
> (setq gnus-summary-highlight
>       '(((eq mark gnus-unread-mark) . gnus-summary-normal-unread)
>         (t . gnus-summary-normal-read) ))

I just copy piece in some way relevant code from my '.emacs':

;; Especially highlight my message and replays to me.
(eval-after-load 'gnus-sum
  '(progn
     (defface my-gnus-own-unread-face nil
       "Use this face to display own postings in Summary Buffer")
     (copy-face 'gnus-summary-high-unread-face 'my-gnus-own-unread-face)
     (set-face-background 'my-gnus-own-unread-face "linen")
     (add-to-list 'gnus-summary-highlight
                  '((and (> score 190) (eq mark gnus-unread-mark)) . my-gnus-own-unread-face))
     (defface my-gnus-own-ancient-face nil
       "Use this face to display own postings in Summary Buffer")
     (copy-face 'gnus-summary-high-ancient-face 'my-gnus-own-ancient-face)
     (set-face-background 'my-gnus-own-ancient-face "linen")
     (add-to-list 'gnus-summary-highlight
                  '((and (> score 190) (eq mark gnus-ancient-mark)) . my-gnus-own-ancient-face))
     (defface my-gnus-own-ticked-face nil
       "Use this face to display own postings in Summary Buffer")
     (copy-face 'gnus-summary-high-ticked-face 'my-gnus-own-ticked-face)
     (set-face-background 'my-gnus-own-ticked-face "linen")
     (add-to-list 'gnus-summary-highlight
                  '((and (> score 190) (or (eq mark gnus-dormant-mark) (eq mark gnus-ticked-mark))) . my-gnus-own-ticked-face))
     (defface my-gnus-fup-face nil
       "Use this face to display direct fups to my postings.")
     (copy-face 'gnus-summary-high-unread-face 'my-gnus-fup-face)
     (set-face-background 'my-gnus-fup-face "honeydew")
     (add-to-list 'gnus-summary-highlight
                  '((and (<= 90 score) (<= score 110) (eq mark gnus-unread-mark)) . my-gnus-fup-face))
     ))

-- 
Best regards!

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

* Re: 2 x summary buffer line color
       [not found] ` <mailman.14077.1354216834.855.info-gnus-english@gnu.org>
@ 2012-11-29 23:10   ` Emanuel Berg
  2012-11-29 23:16     ` Emanuel Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Emanuel Berg @ 2012-11-29 23:10 UTC (permalink / raw)
  To: info-gnus-english

Oleksandr Gavenko <gavenkoa@gmail.com> writes:

> ;; Especially highlight my message and replays to me.
> (eval-after-load 'gnus-sum
>   '(progn
>      (defface my-gnus-own-unread-face nil
>        "Use this face to display own postings in Summary Buffer")
>      (copy-face 'gnus-summary-high-unread-face 'my-gnus-own-unread-face)
>      (set-face-background 'my-gnus-own-unread-face "linen")
>      (add-to-list 'gnus-summary-highlight
>                   '((and (> score 190) (eq mark gnus-unread-mark)) . my-gnus-own-unread-face))
>      (defface my-gnus-own-ancient-face nil
>        "Use this face to display own postings in Summary Buffer")
>      (copy-face 'gnus-summary-high-ancient-face 'my-gnus-own-ancient-face)
>      (set-face-background 'my-gnus-own-ancient-face "linen")
>      (add-to-list 'gnus-summary-highlight
>                   '((and (> score 190) (eq mark gnus-ancient-mark)) . my-gnus-own-ancient-face))
>      (defface my-gnus-own-ticked-face nil
>        "Use this face to display own postings in Summary Buffer")
>      (copy-face 'gnus-summary-high-ticked-face 'my-gnus-own-ticked-face)
>      (set-face-background 'my-gnus-own-ticked-face "linen")
>      (add-to-list 'gnus-summary-highlight
>                   '((and (> score 190) (or (eq mark gnus-dormant-mark) (eq mark gnus-ticked-mark))) . my-gnus-own-ticked-face))
>      (defface my-gnus-fup-face nil
>        "Use this face to display direct fups to my postings.")
>      (copy-face 'gnus-summary-high-unread-face 'my-gnus-fup-face)
>      (set-face-background 'my-gnus-fup-face "honeydew")
>      (add-to-list 'gnus-summary-highlight
>                   '((and (<= 90 score) (<= score 110) (eq mark gnus-unread-mark)) . my-gnus-fup-face))
>      ))

OK, that worked, but it would probably look better if you either
changed the attributes of those standard faces, or, defined you own
faces. All that copying is a bit "hackish" :) (But like I said, it
worked, so thanks.)

I wonder though, you say, my articles, replies to me, etc., but, for
example in the first case, will that not simply highlight all articles
that you've not read?

-- 
Emanuel Berg - programmer (hire me!)
CV + code + screenshots: http://user.it.uu.se/~embe8573

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

* Re: 2 x summary buffer line color
  2012-11-29 23:10   ` Emanuel Berg
@ 2012-11-29 23:16     ` Emanuel Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2012-11-29 23:16 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> I wonder though, you say, my articles, replies to me, etc., but, for
> example in the first case, will that not simply highlight all articles
> that you've not read?

Or, is this determined by the score? Then it makes sense, my mistake.

-- 
Emanuel Berg - programmer (hire me!)
CV + code + screenshots: http://user.it.uu.se/~embe8573

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

end of thread, other threads:[~2012-11-29 23:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29 16:41 2 x summary buffer line color Emanuel Berg
2012-11-29 19:20 ` Oleksandr Gavenko
     [not found] ` <mailman.14077.1354216834.855.info-gnus-english@gnu.org>
2012-11-29 23:10   ` Emanuel Berg
2012-11-29 23:16     ` Emanuel Berg

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