* -request-set-mark interface
@ 2001-02-16 15:45 Paul Jarc
2001-02-16 16:28 ` Simon Josefsson
0 siblings, 1 reply; 3+ messages in thread
From: Paul Jarc @ 2001-02-16 15:45 UTC (permalink / raw)
The 5.8.8 info says:
#`(nnchoke-request-set-mark GROUP ACTION &optional SERVER)'
...
# ACTION is a list of mark setting requests, having this format:
#
# (RANGE ACTION MARK)
#
# Range is a range of articles you wish to update marks on.
...
# An example action list:
#
# (((5 12 30) 'del '(tick))
# ((10 . 90) 'add '(read expire))
# ((92 94) 'del '(read)))
Is this right? It seems that the second action should be:
(((10 . 90)) 'add '(read expire))
Can RANGE really be a single range (a number or cons of two numbers),
or is it always a list of ranges?
paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: -request-set-mark interface
2001-02-16 15:45 -request-set-mark interface Paul Jarc
@ 2001-02-16 16:28 ` Simon Josefsson
2001-02-16 16:51 ` ShengHuo ZHU
0 siblings, 1 reply; 3+ messages in thread
From: Simon Josefsson @ 2001-02-16 16:28 UTC (permalink / raw)
Cc: ding
On 16 Feb 2001, Paul Jarc wrote:
> The 5.8.8 info says:
> #`(nnchoke-request-set-mark GROUP ACTION &optional SERVER)'
> ...
> # ACTION is a list of mark setting requests, having this format:
> #
> # (RANGE ACTION MARK)
> #
> # Range is a range of articles you wish to update marks on.
> ...
> # An example action list:
> #
> # (((5 12 30) 'del '(tick))
> # ((10 . 90) 'add '(read expire))
> # ((92 94) 'del '(read)))
>
> Is this right? It seems that the second action should be:
> (((10 . 90)) 'add '(read expire))
> Can RANGE really be a single range (a number or cons of two numbers),
> or is it always a list of ranges?
RANGE can be a cons of two numbers (like in the example, which I think is
correct). I don't think ranges are allowed to be a single number. The
range EBNF don't indicate that, and the gnus-range-* functions doesn't
seem to handle it either.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: -request-set-mark interface
2001-02-16 16:28 ` Simon Josefsson
@ 2001-02-16 16:51 ` ShengHuo ZHU
0 siblings, 0 replies; 3+ messages in thread
From: ShengHuo ZHU @ 2001-02-16 16:51 UTC (permalink / raw)
Simon Josefsson <jas@extundo.com> writes:
> On 16 Feb 2001, Paul Jarc wrote:
>
> > The 5.8.8 info says:
> > #`(nnchoke-request-set-mark GROUP ACTION &optional SERVER)'
> > ...
> > # ACTION is a list of mark setting requests, having this format:
> > #
> > # (RANGE ACTION MARK)
> > #
> > # Range is a range of articles you wish to update marks on.
> > ...
> > # An example action list:
> > #
> > # (((5 12 30) 'del '(tick))
> > # ((10 . 90) 'add '(read expire))
> > # ((92 94) 'del '(read)))
> >
> > Is this right? It seems that the second action should be:
> > (((10 . 90)) 'add '(read expire))
> > Can RANGE really be a single range (a number or cons of two numbers),
> > or is it always a list of ranges?
>
> RANGE can be a cons of two numbers (like in the example, which I think is
> correct). I don't think ranges are allowed to be a single number. The
> range EBNF don't indicate that, and the gnus-range-* functions doesn't
> seem to handle it either.
Some range functions can handle a single range, such as
gnus-uncompress-range (search for "(listp (cdr", you will find many).
Unfortunately, some of them possibly return a single range. The below
function normalizes ranges. I've put it into oGnus.
(defsubst gnus-range-normalize (range)
"Normalize RANGE.
If RANGE is a single range, return (RANGE). Otherwise, return RANGE."
(if (listp (cdr range)) (list range) range))
ShengHuo
--
(setq gnus-posting-styles
'((".*" (signature (format "(setq gnus-posting-styles
'%S)" gnus-posting-styles)))))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-02-16 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-16 15:45 -request-set-mark interface Paul Jarc
2001-02-16 16:28 ` Simon Josefsson
2001-02-16 16:51 ` ShengHuo ZHU
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).