Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-label suggestion request
@ 2004-05-04 15:54 Chris Green
  2004-05-04 15:57 ` Chris Green
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Green @ 2004-05-04 15:54 UTC (permalink / raw)


Hey folks,

I've gotten far enough w/ gnus label that I think it's completely
feasible but I'm wondering how I should expose the user customizable
stuff and how I should integrate with gnus-summary-highlight.  It's
ugly (and also the most complicated elisp I've done) and I'm going to
spend a good bit of time cleaning up the failed experiments.


(defconst gnus-label-alist '((?i . '("Important" "darkred"))
			     (?w . '("Work" "darkblue"))
			     (?t . '("Todo" "darkgreen"))
			     (?l . '("Later" "brown4"))
			     (?f . '("Fun" "purple4")))
  "Alist of label names to key mappings")


I've created a new gnus-summary-highlight-line that includes
label-name and label-face as entries that can be used in
gnus-summary-highlight.  Would it be better to override
gnus-summary-highlight-line-function?  I couldn't find a good hook to
do that from and I didn't really know what gnus-tree was supposed to
be doing with that function.

Right now I have a list of labels with a color and the faces get
generated automatically.  Would people prefer to just give a face name
proper?  I was trying to make it so that I only had to configure
gnus-label in one spot so I could avoid having to defface each time I
added a new category.  I'm struggling with a good way to make marks &
labels cooperate.

Thanks,
Chris
-- 
Chris Green <cmg@dok.org>
A good pun is its own reword.




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

* Re: gnus-label suggestion request
  2004-05-04 15:54 gnus-label suggestion request Chris Green
@ 2004-05-04 15:57 ` Chris Green
  2004-05-04 16:33 ` Wes Hardaker
  2004-05-12 15:23 ` Ted Zlatanov
  2 siblings, 0 replies; 6+ messages in thread
From: Chris Green @ 2004-05-04 15:57 UTC (permalink / raw)


Of course I forgot to say where you could could see the code:

http://cmg.dok.org/code/gnus-label.el
-- 
Chris Green <cmg@dok.org>
 "Not everyone holds these truths to be self-evident, so we've worked
                  up a proof of them as Appendix A." --  Paul Prescod




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

* Re: gnus-label suggestion request
  2004-05-04 15:54 gnus-label suggestion request Chris Green
  2004-05-04 15:57 ` Chris Green
@ 2004-05-04 16:33 ` Wes Hardaker
  2004-05-04 18:14   ` Chris Green
  2004-05-12 15:23 ` Ted Zlatanov
  2 siblings, 1 reply; 6+ messages in thread
From: Wes Hardaker @ 2004-05-04 16:33 UTC (permalink / raw)
  Cc: ding

>>>>> On Tue, 04 May 2004 11:54:34 -0400, Chris Green <cmg@dok.org> said:

Chris> I've gotten far enough w/ gnus label that I think it's
Chris> completely feasible but I'm wondering how I should expose the
Chris> user customizable stuff and how I should integrate with
Chris> gnus-summary-highlight.  It's ugly (and also the most
Chris> complicated elisp I've done) and I'm going to spend a good bit
Chris> of time cleaning up the failed experiments.

IMHO, you could consider using my gnus-highlight mode instead (or an
extension to it).  It makes face customization trivial and
partial-line highlighting (IE, you could tell it to just highlight a
particular field which indicated the label in question).

( http://www.hardakers.net/elisp/ if you haven't seen it )

-- 
"In the bathtub of history the truth is harder to hold than the soap,
 and much more difficult to find."  -- Terry Pratchett



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

* Re: gnus-label suggestion request
  2004-05-04 16:33 ` Wes Hardaker
@ 2004-05-04 18:14   ` Chris Green
  2004-05-16 11:51     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Green @ 2004-05-04 18:14 UTC (permalink / raw)
  Cc: ding

Wes Hardaker <wes@hardakers.net> writes:

> IMHO, you could consider using my gnus-highlight mode instead (or an
> extension to it).  It makes face customization trivial and
> partial-line highlighting (IE, you could tell it to just highlight a
> particular field which indicated the label in question).

Hrm.   I do like the way you configure face colors..

What I need to be able to do is get the current article id from a
particular point in the summary buffer.  I could let the def in the
mapcar in highlight-line-by-expression also accept forms and do that
customization there. Are you thinking of something else?

Another thing I hadn't thought of yet was putting the label directly
in the summary line which should be pretty simple
-- 
Chris Green <cmg@dok.org>
This is my signature. There are many like it but this one is mine.



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

* Re: gnus-label suggestion request
  2004-05-04 15:54 gnus-label suggestion request Chris Green
  2004-05-04 15:57 ` Chris Green
  2004-05-04 16:33 ` Wes Hardaker
@ 2004-05-12 15:23 ` Ted Zlatanov
  2 siblings, 0 replies; 6+ messages in thread
From: Ted Zlatanov @ 2004-05-12 15:23 UTC (permalink / raw)
  Cc: ding

On Tue, 04 May 2004, cmg@dok.org wrote:

> Right now I have a list of labels with a color and the faces get
> generated automatically.  Would people prefer to just give a face
> name proper?

How about accepting both?  If stringp assume it's a color, otherwise...

Ted



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

* Re: gnus-label suggestion request
  2004-05-04 18:14   ` Chris Green
@ 2004-05-16 11:51     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-05-16 11:51 UTC (permalink / raw)


Chris Green <cmg@dok.org> writes:

> What I need to be able to do is get the current article id from a
> particular point in the summary buffer.

Well, `(gnus-summary-article-number)' will return the article number,
if that's what you mean, but I'm probably misunderstanding.  :-)

> Another thing I hadn't thought of yet was putting the label directly
> in the summary line which should be pretty simple

Or you could put some text properties on the line, if that helps.
(But it's kinda slow.)

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




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

end of thread, other threads:[~2004-05-16 11:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-04 15:54 gnus-label suggestion request Chris Green
2004-05-04 15:57 ` Chris Green
2004-05-04 16:33 ` Wes Hardaker
2004-05-04 18:14   ` Chris Green
2004-05-16 11:51     ` Lars Magne Ingebrigtsen
2004-05-12 15:23 ` Ted Zlatanov

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