Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: [REQ] Feature Request : "fancy" gnus-posting-styles
       [not found] ` <m31y3gudaz.fsf@quimbies.gnus.org>
@ 2003-01-14  7:28   ` François-David Collin
  2003-01-14 18:03     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: François-David Collin @ 2003-01-14  7:28 UTC (permalink / raw)


>>>>> In article <m31y3gudaz.fsf@quimbies.gnus.org>,
>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:


    Lars> I think it sounds like a good idea.  It could definitely be
    Lars> useful.

Well, after the countless posts in answer of mine, that's what we
could deduce :-)

So, let's go.

I looked at the function gnus-configure-posting-styles, and I realize
that I really don't want to touch it. To implement the thing, I'm
thinking, in a first approach, of a wrapper wich converts the tree in
a flat standard gnus-posting-styles, in short : for each leaf in the
tree, reached by a in-depth walk, we provide a boolean expression to
insert as a standard match the gnus-posting-styles, along with the
posting attributes of the leaf. This sounds undoubtfully familiar to
all the tree-algorithms-addicts we all are :-)


They're two drawbacks :

- the gnus-posting-style variable won't be human-readable, perhaps
  should be hidden

- if the tree is complex, the leaf expressions could be very long, the
  gnus-configure will slowly parses a very very big structure. I don't
  think we will encounter such a situation, but who knows. If speed
  matters, providing a global function which stores a walk-state in
  the tree, and using this function in match-clause of
  gnus-posting-styles should do the trick.

Comments?
-- 
F.-D.


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

* Re: [REQ] Feature Request : "fancy" gnus-posting-styles
  2003-01-14  7:28   ` [REQ] Feature Request : "fancy" gnus-posting-styles François-David Collin
@ 2003-01-14 18:03     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-14 18:03 UTC (permalink / raw)


Francois-David.Collin@wanadoo.fr (François-David Collin) writes:

> I looked at the function gnus-configure-posting-styles, and I realize
> that I really don't want to touch it. To implement the thing, I'm
> thinking, in a first approach, of a wrapper wich converts the tree in
> a flat standard gnus-posting-styles, 

[...]

> They're two drawbacks :
>
> - the gnus-posting-style variable won't be human-readable, perhaps
>   should be hidden

That could be dealt with by adding an additional variable that this
complex spec would have control over, and letting
`gnus-configure-posting-styles' use that as well.

> - if the tree is complex, the leaf expressions could be very long, the
>   gnus-configure will slowly parses a very very big structure. I don't
>   think we will encounter such a situation, but who knows. If speed
>   matters, providing a global function which stores a walk-state in
>   the tree, and using this function in match-clause of
>   gnus-posting-styles should do the trick.

I think that might be a problem.

`gnus-configure-posting-styles' is a quite long function, but it
isn't all that complex.  I think you should be able to shoe-horn in a
predicate-like spec in there without too much problem.

A third method would be to use `gnus-make-predicate' to just make a
function out of the predicates, but it might be difficult to make it
fit in there...

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


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

end of thread, other threads:[~2003-01-14 18:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <uvg0t1f1m.fsf@wanadoo.fr>
     [not found] ` <m31y3gudaz.fsf@quimbies.gnus.org>
2003-01-14  7:28   ` [REQ] Feature Request : "fancy" gnus-posting-styles François-David Collin
2003-01-14 18:03     ` 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).