Gnus development mailing list
 help / color / mirror / Atom feed
* Using the registry for `gnus-refer-article-method'
@ 2009-07-31 15:09 Ludovic Courtès
  2009-07-31 17:44 ` Ted Zlatanov
  2009-08-17 15:16 ` [PATCH] Add `nnregistry', for use in `gnus-refer-article-method' Ludovic Courtès
  0 siblings, 2 replies; 32+ messages in thread
From: Ludovic Courtès @ 2009-07-31 15:09 UTC (permalink / raw)
  To: ding

Hello,

(I haven't gotten any answer from this list so far, but let's try with
this one.)

The capabilities of `gnus-refer-article-method' are back-end-dependent.
In particular, `nnimap' is only able to locate articles that have been
posted to the current group (info "(gnus) Finding the Parent"), which is
quite limiting.

Would it be possible to use the registry to work around such
limitations?

Thanks,
Ludo'.




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

* Re: Using the registry for `gnus-refer-article-method'
  2009-07-31 15:09 Using the registry for `gnus-refer-article-method' Ludovic Courtès
@ 2009-07-31 17:44 ` Ted Zlatanov
  2009-07-31 22:26   ` Ludovic Courtès
  2009-08-17 15:16 ` [PATCH] Add `nnregistry', for use in `gnus-refer-article-method' Ludovic Courtès
  1 sibling, 1 reply; 32+ messages in thread
From: Ted Zlatanov @ 2009-07-31 17:44 UTC (permalink / raw)
  To: ding

On Fri, 31 Jul 2009 17:09:35 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> The capabilities of `gnus-refer-article-method' are back-end-dependent.
LC> In particular, `nnimap' is only able to locate articles that have been
LC> posted to the current group (info "(gnus) Finding the Parent"), which is
LC> quite limiting.

LC> Would it be possible to use the registry to work around such
LC> limitations?

The registry will tell you the group for a message ID (it has some other
data but this is what you're looking for).  You still have to go to that
group and get the message with that ID.  I don't believe this
functionality has been written so far, but it shouldn't be too hard.

Ted




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

* Re: Using the registry for `gnus-refer-article-method'
  2009-07-31 17:44 ` Ted Zlatanov
@ 2009-07-31 22:26   ` Ludovic Courtès
  0 siblings, 0 replies; 32+ messages in thread
From: Ludovic Courtès @ 2009-07-31 22:26 UTC (permalink / raw)
  To: ding

Hi,

Ted Zlatanov <tzz@lifelogs.com> writes:

> The registry will tell you the group for a message ID (it has some other
> data but this is what you're looking for).  You still have to go to that
> group and get the message with that ID.  I don't believe this
> functionality has been written so far, but it shouldn't be too hard.

Indeed, `gnus-registry-fetch-group' should come in handy.

I'll look into it when I return from holidays.

Thanks!
Ludo'.




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

* [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2009-07-31 15:09 Using the registry for `gnus-refer-article-method' Ludovic Courtès
  2009-07-31 17:44 ` Ted Zlatanov
@ 2009-08-17 15:16 ` Ludovic Courtès
  2009-08-20 21:52   ` Ted Zlatanov
  2010-07-10 15:07   ` Ludovic Courtès
  1 sibling, 2 replies; 32+ messages in thread
From: Ludovic Courtès @ 2009-08-17 15:16 UTC (permalink / raw)
  To: ding


[-- Attachment #1.1: Type: text/plain, Size: 644 bytes --]

Hello!

As a follow-up to this thread, attached is `nnregistry', a dumb back-end
whose sole purpose is to allow `gnus-summary-refer-parent-article' and
similar functions to work across back-ends.  It can be used like this:

--8<---------------cut here---------------start------------->8---
(setq gnus-refer-article-method
      '(current
	(nnregistry)
	(nnweb "gmane" (nnweb-type gmane))))
--8<---------------cut here---------------end--------------->8---

What do you think of the approach and code?

It's my first time hacking Gnus so I'd appreciate reviews.

Thanks,
Ludo'.

PS: I don't (yet) have a copyright assignment on file for Emacs.


[-- Attachment #1.2: nnregistry --]
[-- Type: application/emacs-lisp, Size: 2004 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2009-08-17 15:16 ` [PATCH] Add `nnregistry', for use in `gnus-refer-article-method' Ludovic Courtès
@ 2009-08-20 21:52   ` Ted Zlatanov
  2009-08-20 23:53     ` Ludovic Courtès
  2009-08-21  6:47     ` Reiner Steib
  2010-07-10 15:07   ` Ludovic Courtès
  1 sibling, 2 replies; 32+ messages in thread
From: Ted Zlatanov @ 2009-08-20 21:52 UTC (permalink / raw)
  To: ding

On Mon, 17 Aug 2009 17:16:23 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> As a follow-up to this thread, attached is `nnregistry', a dumb back-end
LC> whose sole purpose is to allow `gnus-summary-refer-parent-article' and
LC> similar functions to work across back-ends.  It can be used like this:
LC> (setq gnus-refer-article-method
LC>       '(current
LC> 	(nnregistry)
LC> 	(nnweb "gmane" (nnweb-type gmane))))

LC> What do you think of the approach and code?

It's cool.  The only issue is that the registry doesn't keep all
articles, so this may not work reliably.  Still, it's very useful.

LC> It's my first time hacking Gnus so I'd appreciate reviews.

It looks fine.  Thanks for taking the time.  If you have any other
ideas, please share them.

LC> PS: I don't (yet) have a copyright assignment on file for Emacs.

I think you need papers for Gnus, not Emacs.  Reiner?

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2009-08-20 21:52   ` Ted Zlatanov
@ 2009-08-20 23:53     ` Ludovic Courtès
  2009-08-21 19:00       ` Ted Zlatanov
  2009-08-21  6:47     ` Reiner Steib
  1 sibling, 1 reply; 32+ messages in thread
From: Ludovic Courtès @ 2009-08-20 23:53 UTC (permalink / raw)
  To: ding

Hi,

Ted Zlatanov <tzz@lifelogs.com> writes:

> It's cool.  The only issue is that the registry doesn't keep all
> articles, so this may not work reliably.  Still, it's very useful.

Hmm, I didn't know that.  Which messages does it ignore or discard?

Thanks,
Ludo'.




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2009-08-20 21:52   ` Ted Zlatanov
  2009-08-20 23:53     ` Ludovic Courtès
@ 2009-08-21  6:47     ` Reiner Steib
  1 sibling, 0 replies; 32+ messages in thread
From: Reiner Steib @ 2009-08-21  6:47 UTC (permalink / raw)
  To: Ted Zlatanov, Ludovic Courtès; +Cc: ding

On Thu, Aug 20 2009, Ted Zlatanov wrote:

> LC> PS: I don't (yet) have a copyright assignment on file for Emacs.
>
> I think you need papers for Gnus, not Emacs.  Reiner?

Papers for Emacs cover Gnus as well, so either options is fine.  I
recommend to sign papers for Emacs to reduce administrative burden in
case the contributor will also contribute to other parts of Emacs.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2009-08-20 23:53     ` Ludovic Courtès
@ 2009-08-21 19:00       ` Ted Zlatanov
  0 siblings, 0 replies; 32+ messages in thread
From: Ted Zlatanov @ 2009-08-21 19:00 UTC (permalink / raw)
  To: ding

On Fri, 21 Aug 2009 01:53:51 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> Ted Zlatanov <tzz@lifelogs.com> writes:

>> It's cool.  The only issue is that the registry doesn't keep all
>> articles, so this may not work reliably.  Still, it's very useful.

LC> Hmm, I didn't know that.  Which messages does it ignore or discard?

The registry respects:

gnus-registry-unfollowed-groups 
gnus-registry-max-entries

Those two will cause entries to be dropped.  It's not a problem, really,
just a caveat you may want to note in your code.

I think it's fine otherwise.

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2009-08-17 15:16 ` [PATCH] Add `nnregistry', for use in `gnus-refer-article-method' Ludovic Courtès
  2009-08-20 21:52   ` Ted Zlatanov
@ 2010-07-10 15:07   ` Ludovic Courtès
  2010-09-27 16:28     ` Lars Magne Ingebrigtsen
  2010-09-27 18:31     ` Ted Zlatanov
  1 sibling, 2 replies; 32+ messages in thread
From: Ludovic Courtès @ 2010-07-10 15:07 UTC (permalink / raw)
  To: ding

Hello!

My copyright assignment is now on file (at last), and I’d like
‘nnregistry’ to “get in” (see the referred message).  Can somebody look
into it?  I still have to update the manual.

In addition, I think it’d be great to change the default value of
‘gnus-refer-article-method’ to include ‘nnregistry’, and also change the
default value of ‘gnus-registry-max-entries’ to at least 5000.

What do you think?

Thanks,
Ludo’.




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-07-10 15:07   ` Ludovic Courtès
@ 2010-09-27 16:28     ` Lars Magne Ingebrigtsen
  2010-09-27 18:28       ` Ted Zlatanov
  2010-09-27 21:01       ` Ludovic Courtès
  2010-09-27 18:31     ` Ted Zlatanov
  1 sibling, 2 replies; 32+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-09-27 16:28 UTC (permalink / raw)
  To: ding; +Cc: ludo

ludo@gnu.org (Ludovic Courtès) writes:

> My copyright assignment is now on file (at last), and I’d like
> ‘nnregistry’ to “get in” (see the referred message).  Can somebody look
> into it?  I still have to update the manual.

Was this really sent in July?  It popped up on Gmane today...

> In addition, I think it’d be great to change the default value of
> ‘gnus-refer-article-method’ to include ‘nnregistry’, and also change the
> default value of ‘gnus-registry-max-entries’ to at least 5000.
>
> What do you think?

Could you post the patch here?

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




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-27 16:28     ` Lars Magne Ingebrigtsen
@ 2010-09-27 18:28       ` Ted Zlatanov
  2010-09-27 21:01       ` Ludovic Courtès
  1 sibling, 0 replies; 32+ messages in thread
From: Ted Zlatanov @ 2010-09-27 18:28 UTC (permalink / raw)
  To: ding

On Mon, 27 Sep 2010 18:28:04 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> ludo@gnu.org (Ludovic Courtès) writes:
>> My copyright assignment is now on file (at last), and I’d like
>> ‘nnregistry’ to “get in” (see the referred message).  Can somebody look
>> into it?  I still have to update the manual.

LMI> Was this really sent in July?  It popped up on Gmane today...

See:

http://thread.gmane.org/gmane.emacs.gnus.general/68857/focus=68915

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-07-10 15:07   ` Ludovic Courtès
  2010-09-27 16:28     ` Lars Magne Ingebrigtsen
@ 2010-09-27 18:31     ` Ted Zlatanov
  2010-09-27 18:44       ` Lars Magne Ingebrigtsen
  2010-09-27 20:57       ` Ludovic Courtès
  1 sibling, 2 replies; 32+ messages in thread
From: Ted Zlatanov @ 2010-09-27 18:31 UTC (permalink / raw)
  To: ding

On Sat, 10 Jul 2010 17:07:13 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> My copyright assignment is now on file (at last), and I’d like
LC> ‘nnregistry’ to “get in” (see the referred message).  Can somebody look
LC> into it?  I still have to update the manual.

Thanks for working on that.  I don't think the backend interface has
changed but maybe Lars has a comment.  Have you tested it with the
latest Gnus?

LC> In addition, I think it’d be great to change the default value of
LC> ‘gnus-refer-article-method’ to include ‘nnregistry’

Is it safe if the registry is not enabled?

LC> and also change the default value of ‘gnus-registry-max-entries’ to
LC> at least 5000.

That's kind of dangerous.  Searching the registry is pretty fast
(although still O(n) unless you know the exact message-ID) but saving
and loading it can get really slow, plus memory usage will get worse.
So I'd make this a recommendation in the manual but not a default.

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-27 18:31     ` Ted Zlatanov
@ 2010-09-27 18:44       ` Lars Magne Ingebrigtsen
  2010-09-27 20:57       ` Ludovic Courtès
  1 sibling, 0 replies; 32+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-09-27 18:44 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Thanks for working on that.  I don't think the backend interface has
> changed but maybe Lars has a comment. 

The backend interface hasn't changed much.  Mainly gained a few
functions.

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




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-27 18:31     ` Ted Zlatanov
  2010-09-27 18:44       ` Lars Magne Ingebrigtsen
@ 2010-09-27 20:57       ` Ludovic Courtès
  2010-09-27 21:04         ` Ted Zlatanov
  1 sibling, 1 reply; 32+ messages in thread
From: Ludovic Courtès @ 2010-09-27 20:57 UTC (permalink / raw)
  To: ding

Hi Ted,

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Sat, 10 Jul 2010 17:07:13 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 
>
> LC> My copyright assignment is now on file (at last), and I’d like
> LC> ‘nnregistry’ to “get in” (see the referred message).  Can somebody look
> LC> into it?  I still have to update the manual.
>
> Thanks for working on that.  I don't think the backend interface has
> changed but maybe Lars has a comment.  Have you tested it with the
> latest Gnus?

No.  I’m planning to switch to No Gnus real soon but haven’t dared yet.
:-)

> LC> In addition, I think it’d be great to change the default value of
> LC> ‘gnus-refer-article-method’ to include ‘nnregistry’
>
> Is it safe if the registry is not enabled?

It calls ‘gnus-registry-fetch-group’, which should just return ‘nil’ if
the registry is not enabled (IIUC), so that should be safe.

> LC> and also change the default value of ‘gnus-registry-max-entries’ to
> LC> at least 5000.
>
> That's kind of dangerous.  Searching the registry is pretty fast
> (although still O(n) unless you know the exact message-ID) but saving
> and loading it can get really slow, plus memory usage will get worse.
> So I'd make this a recommendation in the manual but not a default.

Hmm, OK.

Thanks,
Ludo’.




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-27 16:28     ` Lars Magne Ingebrigtsen
  2010-09-27 18:28       ` Ted Zlatanov
@ 2010-09-27 21:01       ` Ludovic Courtès
  2010-09-27 21:34         ` Ted Zlatanov
  2010-09-29 14:41         ` Lars Magne Ingebrigtsen
  1 sibling, 2 replies; 32+ messages in thread
From: Ludovic Courtès @ 2010-09-27 21:01 UTC (permalink / raw)
  To: ding


[-- Attachment #1.1: Type: text/plain, Size: 561 bytes --]

Hi Lars,

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> My copyright assignment is now on file (at last), and I’d like
>> ‘nnregistry’ to “get in” (see the referred message).  Can somebody look
>> into it?  I still have to update the manual.
>
> Was this really sent in July?  It popped up on Gmane today...

Yes, I resent it today (it had been swallowed by Gmane or something last
time.)

> Could you post the patch here?

Find ‘nnregistry.el’ attached.

Thanks,
Ludo’.


[-- Attachment #1.2: the new file --]
[-- Type: application/emacs-lisp, Size: 2031 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-27 20:57       ` Ludovic Courtès
@ 2010-09-27 21:04         ` Ted Zlatanov
  0 siblings, 0 replies; 32+ messages in thread
From: Ted Zlatanov @ 2010-09-27 21:04 UTC (permalink / raw)
  To: ding

On Mon, 27 Sep 2010 22:57:54 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> No.  I’m planning to switch to No Gnus real soon but haven’t dared yet.
LC> :-)
...
LC> It calls ‘gnus-registry-fetch-group’, which should just return ‘nil’ if
LC> the registry is not enabled (IIUC), so that should be safe.

If you could test with No Gnus somehow, that would be great (so we don't
have to go back and forth if there are problems).  If not, let me know
and I'll test it when I have a chance.

Thanks
Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-27 21:01       ` Ludovic Courtès
@ 2010-09-27 21:34         ` Ted Zlatanov
  2010-09-29 14:41         ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 32+ messages in thread
From: Ted Zlatanov @ 2010-09-27 21:34 UTC (permalink / raw)
  To: ding

On Mon, 27 Sep 2010 23:01:15 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> ;;; nnregistry.el --- access to articles via Gnus' message-id registry

I was thinking this could do even more.  It could, for example, do a
search across the registry for a particular sender or subject (because
we need Yet Another Search Interface), or for a particular registry
mark.  Just some ideas in case you're feeling frisky :)

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-27 21:01       ` Ludovic Courtès
  2010-09-27 21:34         ` Ted Zlatanov
@ 2010-09-29 14:41         ` Lars Magne Ingebrigtsen
  2010-09-30 14:28           ` Ludovic Courtès
  1 sibling, 1 reply; 32+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-09-29 14:41 UTC (permalink / raw)
  To: ding

ludo@gnu.org (Ludovic Courtès) writes:

> Find ‘nnregistry.el’ attached.

Thanks; I've now added it to the repository.

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




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-29 14:41         ` Lars Magne Ingebrigtsen
@ 2010-09-30 14:28           ` Ludovic Courtès
  2010-09-30 15:14             ` Ted Zlatanov
  0 siblings, 1 reply; 32+ messages in thread
From: Ludovic Courtès @ 2010-09-30 14:28 UTC (permalink / raw)
  To: ding

Hi,

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Find ‘nnregistry.el’ attached.
>
> Thanks; I've now added it to the repository.

Great, thanks!

What about adding ‘nnregistry’ to the default value of
‘gnus-refer-article-method’?

Ludo’.




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-30 14:28           ` Ludovic Courtès
@ 2010-09-30 15:14             ` Ted Zlatanov
  2010-09-30 16:19               ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 32+ messages in thread
From: Ted Zlatanov @ 2010-09-30 15:14 UTC (permalink / raw)
  To: ding

On Thu, 30 Sep 2010 16:28:13 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> What about adding ‘nnregistry’ to the default value of
LC> ‘gnus-refer-article-method’?

Maybe `gnus-registry-initialize' should do that?

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-30 15:14             ` Ted Zlatanov
@ 2010-09-30 16:19               ` Lars Magne Ingebrigtsen
  2010-09-30 22:14                 ` Ted Zlatanov
  0 siblings, 1 reply; 32+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-09-30 16:19 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> LC> What about adding ‘nnregistry’ to the default value of
> LC> ‘gnus-refer-article-method’?
>
> Maybe `gnus-registry-initialize' should do that?

Sounds reasonable.

And nnregistry should be documented in gnus.texi.

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




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-30 16:19               ` Lars Magne Ingebrigtsen
@ 2010-09-30 22:14                 ` Ted Zlatanov
  2010-09-30 22:39                   ` Ted Zlatanov
  0 siblings, 1 reply; 32+ messages in thread
From: Ted Zlatanov @ 2010-09-30 22:14 UTC (permalink / raw)
  To: ding

On Thu, 30 Sep 2010 18:19:36 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
LC> What about adding ‘nnregistry’ to the default value of
LC> ‘gnus-refer-article-method’?
>> 
>> Maybe `gnus-registry-initialize' should do that?

LMI> Sounds reasonable.

I think it's done properly now.  But nnregistry needs to be loaded
first.  Hmm.

LMI> And nnregistry should be documented in gnus.texi.

Ludovic?

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-30 22:14                 ` Ted Zlatanov
@ 2010-09-30 22:39                   ` Ted Zlatanov
  2010-10-01 16:27                     ` Ludovic Courtès
  0 siblings, 1 reply; 32+ messages in thread
From: Ted Zlatanov @ 2010-09-30 22:39 UTC (permalink / raw)
  To: ding

On Thu, 30 Sep 2010 17:14:49 -0500 Ted Zlatanov <tzz@lifelogs.com> wrote: 

TZ> On Thu, 30 Sep 2010 18:19:36 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 
LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
LC> What about adding ‘nnregistry’ to the default value of
LC> ‘gnus-refer-article-method’?
>>> 
>>> Maybe `gnus-registry-initialize' should do that?

LMI> Sounds reasonable.

TZ> I think it's done properly now.  But nnregistry needs to be loaded
TZ> first.  Hmm.

OK, so my best recommendation is to say

;; Put this in your startup file (~/.gnus.el for instance)

;; (require 'nnregistry) ;; optional
;; (setq gnus-registry-max-entries 2500
;;       gnus-registry-use-long-group-names t)

;; (gnus-registry-initialize)

in the gnus-registry header.  WDYT?

LMI> And nnregistry should be documented in gnus.texi.

TZ> Ludovic?

Probably it should be in the gnus-registry section of the manual (with a
minimal link elsewhere), explaining that it has to be loaded *after*
gnus-registry.el but *before* gnus-registry-initialize is called.

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-09-30 22:39                   ` Ted Zlatanov
@ 2010-10-01 16:27                     ` Ludovic Courtès
  2010-10-01 16:36                       ` Ted Zlatanov
  0 siblings, 1 reply; 32+ messages in thread
From: Ludovic Courtès @ 2010-10-01 16:27 UTC (permalink / raw)
  To: ding

Hi!

Ted Zlatanov <tzz@lifelogs.com> writes:

> LMI> And nnregistry should be documented in gnus.texi.
>
> TZ> Ludovic?

Yes, sure.

> Probably it should be in the gnus-registry section of the manual (with a
> minimal link elsewhere), explaining that it has to be loaded *after*
> gnus-registry.el but *before* gnus-registry-initialize is called.

Hmm, why before ‘gnus-registry-initialize’ is called?

Thanks,
Ludo’.




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-10-01 16:27                     ` Ludovic Courtès
@ 2010-10-01 16:36                       ` Ted Zlatanov
  2010-10-01 22:33                         ` Ludovic Courtès
  0 siblings, 1 reply; 32+ messages in thread
From: Ted Zlatanov @ 2010-10-01 16:36 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: ding

On Fri, 01 Oct 2010 18:27:25 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> Hi!
LC> Ted Zlatanov <tzz@lifelogs.com> writes:

LMI> And nnregistry should be documented in gnus.texi.
>> 
TZ> Ludovic?

LC> Yes, sure.

Can you write some documentation for the manual?

>> Probably it should be in the gnus-registry section of the manual (with a
>> minimal link elsewhere), explaining that it has to be loaded *after*
>> gnus-registry.el but *before* gnus-registry-initialize is called.

LC> Hmm, why before ‘gnus-registry-initialize’ is called?

Because `gnus-refer-article-method' should not contain 'nnregistry
automatically.  So ‘gnus-registry-initialize’ needs to check for the
'nnregistry feature.  I had that check in
`gnus-registry-install-nnregistry' but moved it one level higher so
users can call it directly if they want.  See the revised docs I just pushed.

Ted



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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-10-01 16:36                       ` Ted Zlatanov
@ 2010-10-01 22:33                         ` Ludovic Courtès
  2010-10-04 16:42                           ` Ted Zlatanov
  2010-10-08 15:50                           ` Ted Zlatanov
  0 siblings, 2 replies; 32+ messages in thread
From: Ludovic Courtès @ 2010-10-01 22:33 UTC (permalink / raw)
  To: ding


[-- Attachment #1.1: Type: text/plain, Size: 1379 bytes --]

Hi,

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Fri, 01 Oct 2010 18:27:25 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 
>
> LC> Hi!
> LC> Ted Zlatanov <tzz@lifelogs.com> writes:
>
> LMI> And nnregistry should be documented in gnus.texi.
>>> 
> TZ> Ludovic?
>
> LC> Yes, sure.
>
> Can you write some documentation for the manual?

Yes, really.  :-)

See the attached patch.  What do you think?

>>> Probably it should be in the gnus-registry section of the manual (with a
>>> minimal link elsewhere), explaining that it has to be loaded *after*
>>> gnus-registry.el but *before* gnus-registry-initialize is called.
>
> LC> Hmm, why before ‘gnus-registry-initialize’ is called?
>
> Because `gnus-refer-article-method' should not contain 'nnregistry
> automatically.  So ‘gnus-registry-initialize’ needs to check for the
> 'nnregistry feature.  I had that check in
> `gnus-registry-install-nnregistry' but moved it one level higher so
> users can call it directly if they want.  See the revised docs I just pushed.

Hmm, I’m not convinced by ‘gnus-registry-install-nnregistry’ because:

  1. it does things under the hood;

  2. it /appends/ ‘nnregistry’ to ‘gnus-refer-article-method’, whereas
     it’s likely to perform better if it appears right after ‘current’.

What do you think?

Thanks,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: the patch --]
[-- Type: text/x-patch, Size: 3620 bytes --]

From 24dd8d7c7cb01c317861c4053cbfa83ba37d6a4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Sat, 2 Oct 2010 00:29:48 +0200
Subject: [PATCH] Document `nnregistry'.

* texi/gnus.texi (Finding the Parent): Add xref to `Registry Article
  Refer Method'.
  (The Gnus Registry): Mention the refer method.
  (Registry Article Refer Method): New node.
---
 texi/gnus.texi |   51 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/texi/gnus.texi b/texi/gnus.texi
index 2858990..cb1648f 100644
--- a/texi/gnus.texi
+++ b/texi/gnus.texi
@@ -10989,9 +10989,12 @@ do not do a particularly excellent job at it.  That is, @code{nnmbox},
 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
 only able to locate articles that have been posted to the current
-group.  (Anything else would be too time consuming.)  @code{nnmh} does
-not support this at all.
+group.  @code{nnmh} does not support this at all.
 
+Fortunately, the special @code{nnregistry} back end is able to locate
+articles in any groups, regardless of their back end (@pxref{Registry
+Article Refer Method, fetching by @code{Message-ID} using the
+registry}).
 
 @node Alternative Approaches
 @section Alternative Approaches
@@ -25427,6 +25430,13 @@ the sender in addition to the Message-ID.  Several strategies are
 available.
 
 @item
+Refer to messages by ID
+
+Commands like @code{gnus-summary-refer-parent-article} can take
+advantage of the registry to jump to the referred article, regardless
+of the group the message is in.
+
+@item
 Store custom flags and keywords
 
 The registry can store custom flags and keywords for a message.  For
@@ -25445,6 +25455,7 @@ of all messages matching a particular set of criteria.
 @menu
 * Setup::
 * Fancy splitting to parent::
+* Registry Article Refer Method::
 * Store custom flags and keywords::
 * Store arbitrary data::
 @end menu
@@ -25521,6 +25532,42 @@ registry will keep.
 The file where the registry will be stored between Gnus sessions.
 @end defvar
 
+@node Registry Article Refer Method
+@subsection Fetching by @code{Message-ID} Using the Registry
+
+The registry knows how to map each @code{Message-ID} to the group it's
+in.  This can be leveraged to enhance the ``article refer method'',
+the thing that tells Gnus how to look up an article given its
+Message-ID (@pxref{Finding the Parent}).
+
+@vindex nnregistry
+@vindex gnus-refer-article-method
+
+The @code{nnregistry} refer method does exactly that.  It has the
+advantage that an article may be found regardless of the group it's
+in---provided its @code{Message-ID} is known to the registry.  It can
+be enabled by augmenting the start-up file with something along these
+lines:
+
+@example
+;; Keep enough entries to have a good hit rate when referring to an
+;; article using the registry.  Use long group names so that Gnus
+;; knows where the article is.
+(setq gnus-registry-max-entries 2500
+      gnus-registry-use-long-group-names t)
+
+(gnus-registry-initialize)
+
+(setq gnus-refer-article-method
+      '(current
+	(nnregistry)
+	(nnweb "gmane" (nnweb-type gmane))))
+@end example
+
+The example above instructs Gnus to first look up the article in the
+current group, or, alternatively, using the registry, and finally, if
+all else fails, using Gmane.
+
 @node Fancy splitting to parent
 @subsection Fancy splitting to parent
 
-- 
1.7.0


[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-10-01 22:33                         ` Ludovic Courtès
@ 2010-10-04 16:42                           ` Ted Zlatanov
  2010-10-05 10:05                             ` Ludovic Courtès
  2010-10-08 15:50                           ` Ted Zlatanov
  1 sibling, 1 reply; 32+ messages in thread
From: Ted Zlatanov @ 2010-10-04 16:42 UTC (permalink / raw)
  To: ding

On Sat, 02 Oct 2010 00:33:29 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> Hmm, I’m not convinced by ‘gnus-registry-install-nnregistry’ because:

LC>   1. it does things under the hood;

Where else would it operate?  Do you mean that every user should
customize gnus-refer-article-method themselves?  I guess that's possible
but much easier to screw up.

LC>   2. it /appends/ ‘nnregistry’ to ‘gnus-refer-article-method’, whereas
LC>      it’s likely to perform better if it appears right after ‘current’.

For the vast majority of Gnus users the two are the same.  But certainly
we can do this if you think it's necessary.

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-10-04 16:42                           ` Ted Zlatanov
@ 2010-10-05 10:05                             ` Ludovic Courtès
  2010-10-05 13:14                               ` Ted Zlatanov
  0 siblings, 1 reply; 32+ messages in thread
From: Ludovic Courtès @ 2010-10-05 10:05 UTC (permalink / raw)
  To: ding

Hi!

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Sat, 02 Oct 2010 00:33:29 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 
>
> LC> Hmm, I’m not convinced by ‘gnus-registry-install-nnregistry’ because:
>
> LC>   1. it does things under the hood;
>
> Where else would it operate?  Do you mean that every user should
> customize gnus-refer-article-method themselves?

Yes.  Personally I prefer setting the variable once for all, so it’s
purely declarative and clearer (to me).

> I guess that's possible but much easier to screw up.
>
> LC>   2. it /appends/ ‘nnregistry’ to ‘gnus-refer-article-method’, whereas
> LC>      it’s likely to perform better if it appears right after ‘current’.
>
> For the vast majority of Gnus users the two are the same.

It depends.  For instance, I have ‘(nnweb "gmane" (nnweb-type gmane))’
as the last resort, which is presumably slower than nnregistry.

WDYT?

Thanks,
Ludo’.




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-10-05 10:05                             ` Ludovic Courtès
@ 2010-10-05 13:14                               ` Ted Zlatanov
  2010-10-05 14:36                                 ` Ludovic Courtès
  0 siblings, 1 reply; 32+ messages in thread
From: Ted Zlatanov @ 2010-10-05 13:14 UTC (permalink / raw)
  To: ding

On Tue, 05 Oct 2010 12:05:48 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> Ted Zlatanov <tzz@lifelogs.com> writes:

>> On Sat, 02 Oct 2010 00:33:29 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 
>> 
LC> Hmm, I’m not convinced by ‘gnus-registry-install-nnregistry’ because:
>> 
LC> 1. it does things under the hood;
>> 
>> Where else would it operate?  Do you mean that every user should
>> customize gnus-refer-article-method themselves?

LC> Yes.  Personally I prefer setting the variable once for all, so it’s
LC> purely declarative and clearer (to me).

OK.  Do your docs include the instructions to do that?

LC> 2. it /appends/ ‘nnregistry’ to ‘gnus-refer-article-method’, whereas
LC> it’s likely to perform better if it appears right after ‘current’.
>> 
>> For the vast majority of Gnus users the two are the same.

LC> It depends.  For instance, I have ‘(nnweb "gmane" (nnweb-type gmane))’
LC> as the last resort, which is presumably slower than nnregistry.

You are unusual.  The vast majority of Gnus users don't customize or
even know about `gnus-refer-article-method'.  But it doesn't matter
since we're removing this anyhow.  Just mention it in the docs if you
haven't already (I haven't reviewed your patch, sorry!)

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-10-05 13:14                               ` Ted Zlatanov
@ 2010-10-05 14:36                                 ` Ludovic Courtès
  0 siblings, 0 replies; 32+ messages in thread
From: Ludovic Courtès @ 2010-10-05 14:36 UTC (permalink / raw)
  To: ding

Hi Ted!

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Tue, 05 Oct 2010 12:05:48 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 
>
> LC> Ted Zlatanov <tzz@lifelogs.com> writes:
>
>>> On Sat, 02 Oct 2010 00:33:29 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 
>>> 
> LC> Hmm, I’m not convinced by ‘gnus-registry-install-nnregistry’ because:
>>> 
> LC> 1. it does things under the hood;
>>> 
>>> Where else would it operate?  Do you mean that every user should
>>> customize gnus-refer-article-method themselves?
>
> LC> Yes.  Personally I prefer setting the variable once for all, so it’s
> LC> purely declarative and clearer (to me).
>
> OK.  Do your docs include the instructions to do that?

Yes, the example explains this:

--8<---------------cut here---------------start------------->8---
(setq gnus-refer-article-method
      '(current
        (nnregistry)
        (nnweb "gmane" (nnweb-type gmane))))
--8<---------------cut here---------------end--------------->8---


> LC> 2. it /appends/ ‘nnregistry’ to ‘gnus-refer-article-method’, whereas
> LC> it’s likely to perform better if it appears right after ‘current’.
>>> 
>>> For the vast majority of Gnus users the two are the same.
>
> LC> It depends.  For instance, I have ‘(nnweb "gmane" (nnweb-type gmane))’
> LC> as the last resort, which is presumably slower than nnregistry.
>
> You are unusual.

Well yes, otherwise I wouldn’t be using Gnus in the first place.  :-)

> The vast majority of Gnus users don't customize or even know about
> `gnus-refer-article-method'.  But it doesn't matter since we're
> removing this anyhow.  Just mention it in the docs if you haven't
> already (I haven't reviewed your patch, sorry!)

The doc patch I posted should be OK, let me know what you think.

Thanks,
Ludo’.





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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-10-01 22:33                         ` Ludovic Courtès
  2010-10-04 16:42                           ` Ted Zlatanov
@ 2010-10-08 15:50                           ` Ted Zlatanov
  2010-10-11 20:20                             ` Ludovic Courtès
  1 sibling, 1 reply; 32+ messages in thread
From: Ted Zlatanov @ 2010-10-08 15:50 UTC (permalink / raw)
  To: ding

On Sat, 02 Oct 2010 00:33:29 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> Hmm, I’m not convinced by ‘gnus-registry-install-nnregistry’ because:

LC>   1. it does things under the hood;

LC>   2. it /appends/ ‘nnregistry’ to ‘gnus-refer-article-method’, whereas
LC>      it’s likely to perform better if it appears right after ‘current’.

OK, I removed it.

On Tue, 05 Oct 2010 16:36:48 +0200 ludo@gnu.org (Ludovic Courtès) wrote: 

LC> The doc patch I posted should be OK, let me know what you think.

Yes.  I added a pointer to the manual in nnregistry.el in case impatient
users look there first.  Also I added a pointer in gnus-registry.el.

Thanks for your help.

Ted




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

* Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method'
  2010-10-08 15:50                           ` Ted Zlatanov
@ 2010-10-11 20:20                             ` Ludovic Courtès
  0 siblings, 0 replies; 32+ messages in thread
From: Ludovic Courtès @ 2010-10-11 20:20 UTC (permalink / raw)
  To: ding

Thanks, Ted!

Ludo’.




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

end of thread, other threads:[~2010-10-11 20:20 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-31 15:09 Using the registry for `gnus-refer-article-method' Ludovic Courtès
2009-07-31 17:44 ` Ted Zlatanov
2009-07-31 22:26   ` Ludovic Courtès
2009-08-17 15:16 ` [PATCH] Add `nnregistry', for use in `gnus-refer-article-method' Ludovic Courtès
2009-08-20 21:52   ` Ted Zlatanov
2009-08-20 23:53     ` Ludovic Courtès
2009-08-21 19:00       ` Ted Zlatanov
2009-08-21  6:47     ` Reiner Steib
2010-07-10 15:07   ` Ludovic Courtès
2010-09-27 16:28     ` Lars Magne Ingebrigtsen
2010-09-27 18:28       ` Ted Zlatanov
2010-09-27 21:01       ` Ludovic Courtès
2010-09-27 21:34         ` Ted Zlatanov
2010-09-29 14:41         ` Lars Magne Ingebrigtsen
2010-09-30 14:28           ` Ludovic Courtès
2010-09-30 15:14             ` Ted Zlatanov
2010-09-30 16:19               ` Lars Magne Ingebrigtsen
2010-09-30 22:14                 ` Ted Zlatanov
2010-09-30 22:39                   ` Ted Zlatanov
2010-10-01 16:27                     ` Ludovic Courtès
2010-10-01 16:36                       ` Ted Zlatanov
2010-10-01 22:33                         ` Ludovic Courtès
2010-10-04 16:42                           ` Ted Zlatanov
2010-10-05 10:05                             ` Ludovic Courtès
2010-10-05 13:14                               ` Ted Zlatanov
2010-10-05 14:36                                 ` Ludovic Courtès
2010-10-08 15:50                           ` Ted Zlatanov
2010-10-11 20:20                             ` Ludovic Courtès
2010-09-27 18:31     ` Ted Zlatanov
2010-09-27 18:44       ` Lars Magne Ingebrigtsen
2010-09-27 20:57       ` Ludovic Courtès
2010-09-27 21:04         ` 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).