unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* gnus: how to improve searching for articles
@ 2009-06-27 14:03 Francis Moreau
  2009-06-27 17:29 ` Johan Bockgård
  2009-06-28  0:02 ` Giorgos Keramidas
  0 siblings, 2 replies; 22+ messages in thread
From: Francis Moreau @ 2009-06-27 14:03 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I sometimes need to search for a word in all articles from one group. For
that I use:

        `M-s'
             Search through all subsequent (raw) articles for a regexp
             (`gnus-summary-search-article-forward').

This would be wonderfull if the match in the article could be
highlighted (a la 'grep --color' for example) because it's pretty hard
to know where the match has been found in the article at first glance.

The previous command actually does an incremental search. However
sometimes it may be more convenient to do a global a search and get the
list of all articles that containing a match in an other window. It's
actually a 'M-x grep' command but which works on group's articles. Does
this command exist ?

Also I'm wondering how to search a pattern in the body of an article
only.

Thanks for any suggestions.
-- 
Francis


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

* Re: gnus: how to improve searching for articles
  2009-06-27 14:03 gnus: how to improve searching for articles Francis Moreau
@ 2009-06-27 17:29 ` Johan Bockgård
  2009-06-28  0:02 ` Giorgos Keramidas
  1 sibling, 0 replies; 22+ messages in thread
From: Johan Bockgård @ 2009-06-27 17:29 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:

> The previous command actually does an incremental search. However
> sometimes it may be more convenient to do a global a search and get
> the list of all articles that containing a match in an other window.
> It's actually a 'M-x grep' command but which works on group's
> articles. Does this command exist ?

`& RET foo RET #' will mark articles containing a match for "foo".






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

* Re: gnus: how to improve searching for articles
  2009-06-27 14:03 gnus: how to improve searching for articles Francis Moreau
  2009-06-27 17:29 ` Johan Bockgård
@ 2009-06-28  0:02 ` Giorgos Keramidas
  2009-06-29  6:15   ` Francis Moreau
  1 sibling, 1 reply; 22+ messages in thread
From: Giorgos Keramidas @ 2009-06-28  0:02 UTC (permalink / raw)
  To: help-gnu-emacs

On Sat, 27 Jun 2009 16:03:22 +0200, Francis Moreau <francis.moro@gmail.com> wrote:
> Hello,
>
> I sometimes need to search for a word in all articles from one group. For
> that I use:
>
>         `M-s'
>              Search through all subsequent (raw) articles for a regexp
>              (`gnus-summary-search-article-forward').
>
> This would be wonderfull if the match in the article could be
> highlighted (a la 'grep --color' for example) because it's pretty hard
> to know where the match has been found in the article at first glance.
>
> The previous command actually does an incremental search. However
> sometimes it may be more convenient to do a global a search and get the
> list of all articles that containing a match in an other window. It's
> actually a 'M-x grep' command but which works on group's articles. Does
> this command exist ?
>
> Also I'm wondering how to search a pattern in the body of an article
> only.

Hi Francis,

One way is to use '& RET regexp RET #' in the summary buffer.  If you
don't type a header in the prompt of '&' it searches the entire article,
including both headers and body.  The '#' command marks the matching
articles with the '#' mark, and then you can:

  1) Limit the summary buffer to the matching articles by typing `/ n', or

  2) Run a command that understand `process-mark', i.e. commands to copy
     the articles to other groups, mass-followup commands, and so on.

In Emacs 23.X there is also a plugin for searching local group folders
with mairix(1).  This requires an external utility and I have only
tested it with nnml folders, but when its external search database has
been synchronized with all the `nnml:*' folders it is blazingly fast and
it supports its own mini-language for searches, i.e.:

    - Search for posts by an author whose name includes `francis' and
      one of the recipients (in `To:' or `Cc:' matches `emacs'):

          f:francis tc:emacs

    - Search for posts whose body matches `emacs' and their subject
      includes the word `debian':

          b:emacs s:debian

When you have installed mairix and have configured it to generate a
search database for nnml folders, have a look at the Info node `Top >
Group Buffer > Searching > nnmairix'.  This part of the manual describes
how you can integrate mairix into Gnus.

If it helps at all, here is my `~/.mairixrc' file for nnml folders
stored at nnml folders in `~/Mail/mail/*' and their sub-folders:

    # This file is a Configuration file for indexing email messages with
    # the `mairix' indexing utility.
    #
    # The particular setup defined by this file has been customized to
    # match my personal setup of Gnus, so some of the non-standard
    # options only make sense on my own user account.
    #
    # The format of this configuration file is quite easy to parse
    # though, and all the options used here are well documented in the
    # mairixrc(5) manpage.  Please check that manpage if you find it
    # difficult to read some parts of this file.

    # The base directory of my Gnus mail folders.
    base=/home/keramida/Mail

    # Index all subfolders by default, but omit `mail.junk' where all
    # the messages tagged as spam end up, and `mail.mairix' where mairix
    # will store search results.
    mh=posted:mail...
    omit=mail/junk:mail/mairix

    # When mailrix performs a search, this is the folder where search
    # results will be saved, and the format of the result folder.
    mfolder=mail/mairix
    mformat=mh

    # The path to the indexing database of mairix.  Currently mairix
    # will only place a single file at the location specified here.
    # A future version of mairix may convert this to a directory with
    # multiple files stored in the directory.
    database=~/Mail/mairix-db

HTH,
Giorgos



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

* Re: gnus: how to improve searching for articles
  2009-06-28  0:02 ` Giorgos Keramidas
@ 2009-06-29  6:15   ` Francis Moreau
  2009-06-30 18:33     ` Giorgos Keramidas
  0 siblings, 1 reply; 22+ messages in thread
From: Francis Moreau @ 2009-06-29  6:15 UTC (permalink / raw)
  To: help-gnu-emacs

Hello Giorgos,

Giorgos Keramidas <keramida@ceid.upatras.gr> writes:
>
> One way is to use '& RET regexp RET #' in the summary buffer.  If you
> don't type a header in the prompt of '&' it searches the entire
> article,
> including both headers and body.  The '#' command marks the matching
> articles with the '#' mark, and then you can:
>
>   1) Limit the summary buffer to the matching articles by typing `/
>   n', or
>
>   2) Run a command that understand `process-mark', i.e. commands to
>   copy
>      the articles to other groups, mass-followup commands, and so on.

Actually I just realize that search including the body is really
expensive since gnus needs to download all article's bodies in order
to
perform the search.

I don't know nntp protocol but that would be great if it had a search
command.

BTW I tried to use the google search thing ('G w' in the group buffer)
but unfortunately it always failed:

             Couldn't request group: No matching articles

That's sad since it's one of the most attracting feature that google
offers when using its interface. Does it work for you ?

>
> In Emacs 23.X there is also a plugin for searching local group folders
> with mairix(1).

Yes it's usesfull but only for _local_ search.

Thanks
--
Francis


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

* Re: gnus: how to improve searching for articles
  2009-06-29  6:15   ` Francis Moreau
@ 2009-06-30 18:33     ` Giorgos Keramidas
  2009-07-01  8:31       ` Francis Moreau
  0 siblings, 1 reply; 22+ messages in thread
From: Giorgos Keramidas @ 2009-06-30 18:33 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, 28 Jun 2009 23:15:33 -0700 (PDT), Francis Moreau <francis.moro@gmail.com> wrote:
>Giorgos Keramidas <keramida@ceid.upatras.gr> writes:
>>
>> One way is to use '& RET regexp RET #' in the summary buffer.  If you
>> don't type a header in the prompt of '&' it searches the entire article,
>> including both headers and body.  The '#' command marks the matching
>> articles with the '#' mark, and then you can:
>>
>>   1) Limit the summary buffer to the matching articles by typing `/ n', or
>>
>>   2) Run a command that understand `process-mark', i.e. commands to copy
>>      the articles to other groups, mass-followup commands, and so on.
>
> Actually I just realize that search including the body is really
> expensive since gnus needs to download all article's bodies in order to
> perform the search.

Yes, that's an unfortunate thing indeed.  I am not sure if nnmairix can
be tuned a bit to use the agent.  I download most of the groups I read
in a local Gnus agent cache, and then read them from the cache.  So I
will try to see if nnmairix can 'peek into the cache' instead of
fetching the articles over the wire.



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

* Re: gnus: how to improve searching for articles
  2009-06-30 18:33     ` Giorgos Keramidas
@ 2009-07-01  8:31       ` Francis Moreau
  2009-07-01 17:25         ` Setting up nnmairix (was: gnus: how to improve searching for articles) David Engster
       [not found]         ` <mailman.1665.1246507878.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-01  8:31 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 30, 8:33 pm, Giorgos Keramidas <keram...@ceid.upatras.gr>
wrote:
>
> Yes, that's an unfortunate thing indeed.  I am not sure if nnmairix can
> be tuned a bit to use the agent.  I download most of the groups I read
> in a local Gnus agent cache, and then read them from the cache.  So I
> will try to see if nnmairix can 'peek into the cache' instead of
> fetching the articles over the wire.

Hmm that sounds a bit strange to me since I use newsgroups because I
don't want to be subscribed to a lot of mailing list and hence avoid
to receive tons of emails...

BTW, I tried to use mairix in gnus and I'm confused when creating a
nnmairix server  (G b c): gnus asks me for "the name of the *back end
server* where mairix should store its searches. So I created before a
nnml group which I named 'mairix'. But now I did some searches (G b s)
or permanent searches (G b g) but the group 'mairix' which I
previously created is never used... All search I did end up creating a
group named "zz_mairix-*-1".

Could you tell me what I'm missing ?

thanks


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

* Setting up nnmairix (was: gnus: how to improve searching for articles)
  2009-07-01  8:31       ` Francis Moreau
@ 2009-07-01 17:25         ` David Engster
       [not found]         ` <mailman.1665.1246507878.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: David Engster @ 2009-07-01 17:25 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
> On Jun 30, 8:33 pm, Giorgos Keramidas <keram...@ceid.upatras.gr>
> wrote:
>>
>> Yes, that's an unfortunate thing indeed.  I am not sure if nnmairix can
>> be tuned a bit to use the agent.  I download most of the groups I read
>> in a local Gnus agent cache, and then read them from the cache.  So I
>> will try to see if nnmairix can 'peek into the cache' instead of
>> fetching the articles over the wire.
>
> Hmm that sounds a bit strange to me since I use newsgroups because I
> don't want to be subscribed to a lot of mailing list and hence avoid
> to receive tons of emails...
>
> BTW, I tried to use mairix in gnus and I'm confused when creating a
> nnmairix server  (G b c): gnus asks me for "the name of the *back end
> server* where mairix should store its searches. So I created before a
> nnml group which I named 'mairix'. But now I did some searches (G b s)
> or permanent searches (G b g) but the group 'mairix' which I
> previously created is never used... All search I did end up creating a
> group named "zz_mairix-*-1".
>
> Could you tell me what I'm missing ?

You can use the following kludge

(setq gnus-auto-subscribed-groups
 "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")

to avoid the zz_mairix-* groups being auto-subscribed.

The term "back end" does not denote a group, but a server where groups
reside, in your case your local nnml server. You do not have to create
any groups manually, since nnmairix will create those groups for
you. They should directly pop up in your Group buffer.

-David





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

* Re: Setting up nnmairix (was: gnus: how to improve searching for articles)
       [not found]         ` <mailman.1665.1246507878.2239.help-gnu-emacs@gnu.org>
@ 2009-07-02 13:58           ` Francis Moreau
  2009-07-02 22:28             ` Setting up nnmairix David Engster
       [not found]             ` <mailman.1718.1246573745.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-02 13:58 UTC (permalink / raw)
  To: help-gnu-emacs

David Engster <deng@randomsample.de> writes:

>
> You can use the following kludge
>
> (setq gnus-auto-subscribed-groups
>  "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
>
> to avoid the zz_mairix-* groups being auto-subscribed.

Isn't the below more simple ?

    (setq gnus-options-not-subscribe "zz_mairix-.*")

> The term "back end" does not denote a group, but a server where groups
> reside, in your case your local nnml server.

I'm not sure why I need to specify this at all...

> You do not have to create any groups manually, since nnmairix will
> create those groups for you. They should directly pop up in your Group
> buffer.

Indeed that's what is happening

Thanks
-- 
Francis


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

* Re: Setting up nnmairix
  2009-07-02 13:58           ` Francis Moreau
@ 2009-07-02 22:28             ` David Engster
       [not found]             ` <mailman.1718.1246573745.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: David Engster @ 2009-07-02 22:28 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
> David Engster <deng@randomsample.de> writes:
>> You can use the following kludge
>>
>> (setq gnus-auto-subscribed-groups
>>  "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
>>
>> to avoid the zz_mairix-* groups being auto-subscribed.
>
> Isn't the below more simple ?
>
>     (setq gnus-options-not-subscribe "zz_mairix-.*")

It is, but it doesn't work. Somehow gnus-options-subscribe and
gnus-auto-subscribed-groups have precedence over
gnus-options-not-subscribe. I reported that issue some time ago, but
didn't get a response.

>> The term "back end" does not denote a group, but a server where groups
>> reside, in your case your local nnml server.
>
> I'm not sure why I need to specify this at all...

It's a feature. ;-)

Some people are not comfortable with some program creating new folders
on their primary mail back end, so you can simply create another (nnml
or nnmaildir) and let nnmairix use that one. Also, you can have several
nnmairix servers (e.g. for current and archived mail, or for local and
remote), and then you have to specify different back ends for them so
they don't mess each other up.

-David





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

* Re: Setting up nnmairix
       [not found]             ` <mailman.1718.1246573745.2239.help-gnu-emacs@gnu.org>
@ 2009-07-06 15:21               ` Francis Moreau
  2009-07-06 18:38                 ` David Engster
       [not found]                 ` <mailman.1938.1246905508.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-06 15:21 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

On Jul 3, 12:28 am, David Engster <d...@randomsample.de> wrote:
>
> Some people are not comfortable with some program creating new folders
> on their primary mail back end, so you can simply create another (nnml
> or nnmaildir) and let nnmairix use that one.

Hmm, this isn't what I got I think...

I created a nnml backend called 'mairix' but it's simply almost empty:

$ tree -a Mail/mairix
Mail/mairix
|-- .marks
`-- mairix
    `-- .marks

And after a search (G b s), results go to Mail/zz_mairix-mairix-1
directory, but I thought it would go to Mail/mairix...

Here is what I got when I look at the mairix group parameters:

(nnmairix "mairix"
          (nnmairix-backend nnml)
          (nnmairix-backend-server "")
          (nnmairix-mairix-command "mairix")
          (nnmairix-hidden-folders nil)
          (nnmairix-default-group "mairix"))

Do you see something weird ?

thanks



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

* Re: Setting up nnmairix
  2009-07-06 15:21               ` Francis Moreau
@ 2009-07-06 18:38                 ` David Engster
  2009-07-06 18:42                   ` David Engster
       [not found]                 ` <mailman.1938.1246905508.2239.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 22+ messages in thread
From: David Engster @ 2009-07-06 18:38 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
> On Jul 3, 12:28 am, David Engster <d...@randomsample.de> wrote:
>>
>> Some people are not comfortable with some program creating new folders
>> on their primary mail back end, so you can simply create another (nnml
>> or nnmaildir) and let nnmairix use that one.

> I created a nnml backend called 'mairix' but it's simply almost empty:
>
> $ tree -a Mail/mairix
> Mail/mairix
> |-- .marks
> `-- mairix
>     `-- .marks
>
> And after a search (G b s), results go to Mail/zz_mairix-mairix-1
> directory, but I thought it would go to Mail/mairix...
>
> Here is what I got when I look at the mairix group parameters:
>
> (nnmairix "mairix"
>           (nnmairix-backend nnml)
>           (nnmairix-backend-server "")
>           (nnmairix-mairix-command "mairix")
>           (nnmairix-hidden-folders nil)
>           (nnmairix-default-group "mairix"))

Your nnmairix server uses the "nnml:" default server (see the
nnmairix-backend-server variable).

For example, a possible setup could look like this

(setq gnus-secondary-select-methods 
      '((nnml ""))
      '((nnml "mairixresults" (nnml-directory "~/mairixresults"))))

As you can see, the nnml-directory for the second server is not in
~/Mail. Otherwise, the default nnml server, which lives in ~/Mail, could
mess with the mairix results.

Now you could delete all your old mairix groups, restart Gnus, and
create a new nnmairix server. This time, simply choose
nnml:mairixresults as the back end.

Just to make things clear: you do not have to use a different nnml
server for the mairix results; it will work with your default nnml back
end just fine.

-David





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

* Re: Setting up nnmairix
  2009-07-06 18:38                 ` David Engster
@ 2009-07-06 18:42                   ` David Engster
  0 siblings, 0 replies; 22+ messages in thread
From: David Engster @ 2009-07-06 18:42 UTC (permalink / raw)
  To: help-gnu-emacs

David Engster <deng@randomsample.de> writes:
> (setq gnus-secondary-select-methods 
>       '((nnml ""))
>       '((nnml "mairixresults" (nnml-directory "~/mairixresults"))))

This should read

 (setq gnus-secondary-select-methods 
       '((nnml "")
         (nnml "mairixresults" (nnml-directory "~/mairixresults"))))

-David





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

* Re: Setting up nnmairix
       [not found]                 ` <mailman.1938.1246905508.2239.help-gnu-emacs@gnu.org>
@ 2009-07-07  7:26                   ` Francis Moreau
  2009-07-08  7:40                   ` gnus active file has been overwritten [was Re: Setting up nnmairix ] Francis Moreau
  1 sibling, 0 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-07  7:26 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 6, 8:38 pm, David Engster <d...@randomsample.de> wrote:
> Francis Moreau <francis.m...@gmail.com> writes:
> > On Jul 3, 12:28 am, David Engster <d...@randomsample.de> wrote:
>
> >> Some people are not comfortable with some program creating new folders
> >> on their primary mail back end, so you can simply create another (nnml
> >> or nnmaildir) and let nnmairix use that one.
> > I created a nnml backend called 'mairix' but it's simply almost empty:
>
> > $ tree -a Mail/mairix
> > Mail/mairix
> > |-- .marks
> > `-- mairix
> >     `-- .marks
>
> > And after a search (G b s), results go to Mail/zz_mairix-mairix-1
> > directory, but I thought it would go to Mail/mairix...
>
> > Here is what I got when I look at the mairix group parameters:
>
> > (nnmairix "mairix"
> >           (nnmairix-backend nnml)
> >           (nnmairix-backend-server "")
> >           (nnmairix-mairix-command "mairix")
> >           (nnmairix-hidden-folders nil)
> >           (nnmairix-default-group "mairix"))
>
> Your nnmairix server uses the "nnml:" default server (see the
> nnmairix-backend-server variable).
>
> For example, a possible setup could look like this
>
> (setq gnus-secondary-select-methods
>       '((nnml ""))
>       '((nnml "mairixresults" (nnml-directory "~/mairixresults"))))
>
> As you can see, the nnml-directory for the second server is not in
> ~/Mail. Otherwise, the default nnml server, which lives in ~/Mail, could
> mess with the mairix results.
>
> Now you could delete all your old mairix groups, restart Gnus, and
> create a new nnmairix server. This time, simply choose
> nnml:mairixresults as the back end.
>

yes that works as you described except I still have that almost empty
Mail/mairix directory:

$ tree -a Mail/mairix
Mail/mairix
   `-- .marks

Thanks


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

* gnus active file has been overwritten [was Re: Setting up nnmairix ]
       [not found]                 ` <mailman.1938.1246905508.2239.help-gnu-emacs@gnu.org>
  2009-07-07  7:26                   ` Francis Moreau
@ 2009-07-08  7:40                   ` Francis Moreau
  2009-07-08  9:12                     ` gnus active file has been overwritten David Engster
       [not found]                     ` <mailman.2048.1247044367.2239.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-08  7:40 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 6, 8:38 pm, David Engster <d...@randomsample.de> wrote:
> Francis Moreau <francis.m...@gmail.com> writes:
> > On Jul 3, 12:28 am, David Engster <d...@randomsample.de> wrote:
>
> >> Some people are not comfortable with some program creating new folders
> >> on their primary mail back end, so you can simply create another (nnml
> >> or nnmaildir) and let nnmairix use that one.
> > I created a nnml backend called 'mairix' but it's simply almost empty:
>
> > $ tree -a Mail/mairix
> > Mail/mairix
> > |-- .marks
> > `-- mairix
> >     `-- .marks
>
> > And after a search (G b s), results go to Mail/zz_mairix-mairix-1
> > directory, but I thought it would go to Mail/mairix...
>
> > Here is what I got when I look at the mairix group parameters:
>
> > (nnmairix "mairix"
> >           (nnmairix-backend nnml)
> >           (nnmairix-backend-server "")
> >           (nnmairix-mairix-command "mairix")
> >           (nnmairix-hidden-folders nil)
> >           (nnmairix-default-group "mairix"))
>
> Your nnmairix server uses the "nnml:" default server (see the
> nnmairix-backend-server variable).
>
> For example, a possible setup could look like this
>
> (setq gnus-secondary-select-methods
>       '((nnml ""))
>       '((nnml "mairixresults" (nnml-directory "~/mairixresults"))))
>
> As you can see, the nnml-directory for the second server is not in
> ~/Mail. Otherwise, the default nnml server, which lives in ~/Mail, could
> mess with the mairix results.
>
> Now you could delete all your old mairix groups, restart Gnus, and
> create a new nnmairix server. This time, simply choose
> nnml:mairixresults as the back end.
>
> Just to make things clear: you do not have to use a different nnml
> server for the mairix results; it will work with your default nnml back
> end just fine.
>

Now I hate gnus !

It's the second time that I opened gnus and all my nnml groups and all
my remote groups are no more subscribted !

This happened because my active file is almost empty:

$ cat Mail/active
x.zz_mairix-search-1 4277 4274 y

So does anybody know why this happened at all and how I can restore my
previous active file ?

I don't know if that helps but I saw this in my message buffer:

nnmairix-request-group: Wrong type argument: number-or-marker-p, x
\.zz_mairix-search-1

thanks for any help.


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

* Re: gnus active file has been overwritten
  2009-07-08  7:40                   ` gnus active file has been overwritten [was Re: Setting up nnmairix ] Francis Moreau
@ 2009-07-08  9:12                     ` David Engster
       [not found]                     ` <mailman.2048.1247044367.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: David Engster @ 2009-07-08  9:12 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
> Now I hate gnus !
>
> It's the second time that I opened gnus and all my nnml groups and all
> my remote groups are no more subscribted !
>
> This happened because my active file is almost empty:
>
> $ cat Mail/active
> x.zz_mairix-search-1 4277 4274 y
>
> So does anybody know why this happened at all and how I can restore my
> previous active file ?

Sorry for the problems you're having.

For rebuilding the active file, enter the server buffer by hitting "^",
then go over the nnml server and hit "g" (regenerate).

> I don't know if that helps but I saw this in my message buffer:
>
> nnmairix-request-group: Wrong type argument: number-or-marker-p, x
> \.zz_mairix-search-1

I thought I've fixed this. Are you using the latest version? In Gnus
CVS, nnmairix should be revision 7.14, in Emacs CVS it's revision 1.13
(which is also in the latest pretest, 23.0.95).

If you have the latest version, please do M-x toggle-debug-on-error to
get full backtrace of the error.

-David





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

* Re: gnus active file has been overwritten
       [not found]                     ` <mailman.2048.1247044367.2239.help-gnu-emacs@gnu.org>
@ 2009-07-08  9:38                       ` Francis Moreau
  2009-07-08  9:53                         ` David Engster
       [not found]                         ` <mailman.2053.1247046818.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-08  9:38 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 8, 11:12 am, David Engster <d...@randomsample.de> wrote:
> Francis Moreau <francis.m...@gmail.com> writes:
> > Now I hate gnus !
>
> > It's the second time that I opened gnus and all my nnml groups and all
> > my remote groups are no more subscribted !
>
> > This happened because my active file is almost empty:
>
> > $ cat Mail/active
> > x.zz_mairix-search-1 4277 4274 y
>
> > So does anybody know why this happened at all and how I can restore my
> > previous active file ?
>
> Sorry for the problems you're having.
>

no problem.

> For rebuilding the active file, enter the server buffer by hitting "^",
> then go over the nnml server and hit "g" (regenerate).

OK, thanks.

>
> > I don't know if that helps but I saw this in my message buffer:
>
> > nnmairix-request-group: Wrong type argument: number-or-marker-p, x
> > \.zz_mairix-search-1
>
> I thought I've fixed this. Are you using the latest version? In Gnus
> CVS, nnmairix should be revision 7.14, in Emacs CVS it's revision 1.13
> (which is also in the latest pretest, 23.0.95).

Hm, I got Emacs sources from git mirror at git://git.sv.gnu.org/emacs.git.
Emacs version is GNU Emacs 23.0.94.1 and it seems that nnmairix
revision is only 0.6, I read this from the header of lisp/gnus/
nnmairix.el. So it seems pretty old.

I'm going to update my emacs sources, but is revision 1.13 going to
fix the issue I encountered ?

[me updating emacs source]

OK I got EMACS_PRETEST_23_0_95 and the revision of nnmairix is still
0.6... but I'm not sure about which branch or tag I should use since
the repo branches/tags looks very messy IMHO.

Also I'm suprised about the difference between the revision from Gnus
CVS and Emacs CVS...

thanks


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

* Re: gnus active file has been overwritten
  2009-07-08  9:38                       ` Francis Moreau
@ 2009-07-08  9:53                         ` David Engster
       [not found]                         ` <mailman.2053.1247046818.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: David Engster @ 2009-07-08  9:53 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
>> > I don't know if that helps but I saw this in my message buffer:
>>
>> > nnmairix-request-group: Wrong type argument: number-or-marker-p, x
>> > \.zz_mairix-search-1
>>
>> I thought I've fixed this. Are you using the latest version? In Gnus
>> CVS, nnmairix should be revision 7.14, in Emacs CVS it's revision 1.13
>> (which is also in the latest pretest, 23.0.95).
>
> Hm, I got Emacs sources from git mirror at git://git.sv.gnu.org/emacs.git.
> Emacs version is GNU Emacs 23.0.94.1 and it seems that nnmairix
> revision is only 0.6, I read this from the header of lisp/gnus/
> nnmairix.el. So it seems pretty old.

I'm talking about the revisions which are shown by CVS, i.e. by "cvs log
nnmairix.el". The "0.6" is my old versioning before nnmairix was
included into Gnus. I know this is confusing; I should probably remove
that.

> I'm going to update my emacs sources, but is revision 1.13 going to
> fix the issue I encountered ?

I think so. I explicitly disabled the regeneration of the active file in
the latest version.

> OK I got EMACS_PRETEST_23_0_95 and the revision of nnmairix is still
> 0.6... but I'm not sure about which branch or tag I should use since
> the repo branches/tags looks very messy IMHO.

The 23.0.95 pretest contains the latest version.

> Also I'm suprised about the difference between the revision from Gnus
> CVS and Emacs CVS...

Well, those are different repositories, so they have different
versioning.

-David





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

* Re: gnus active file has been overwritten
       [not found]                         ` <mailman.2053.1247046818.2239.help-gnu-emacs@gnu.org>
@ 2009-07-08 11:48                           ` Francis Moreau
  2009-07-08 13:59                             ` David Engster
       [not found]                             ` <mailman.2066.1247061569.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-08 11:48 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 8, 11:53 am, David Engster <d...@randomsample.de> wrote:
> Francis Moreau <francis.m...@gmail.com> writes:
> >> > I don't know if that helps but I saw this in my message buffer:
>
> >> > nnmairix-request-group: Wrong type argument: number-or-marker-p, x
> >> > \.zz_mairix-search-1
>
> >> I thought I've fixed this. Are you using the latest version? In Gnus
> >> CVS, nnmairix should be revision 7.14, in Emacs CVS it's revision 1.13
> >> (which is also in the latest pretest, 23.0.95).
>
> > Hm, I got Emacs sources from git mirror at git://git.sv.gnu.org/emacs.git.
> > Emacs version is GNU Emacs 23.0.94.1 and it seems that nnmairix
> > revision is only 0.6, I read this from the header of lisp/gnus/
> > nnmairix.el. So it seems pretty old.
>
> I'm talking about the revisions which are shown by CVS, i.e. by "cvs log
> nnmairix.el". The "0.6" is my old versioning before nnmairix was
> included into Gnus. I know this is confusing; I should probably remove
> that.

ah ok.

So I don't know exactly which revision I'm using so I'm not sure if it
has still the bug.

I'm putting the diff between the revision I'm using and the one I got
from the last emacs source. Could you tell me if the bug is still
there ?

thanks

--- /dev/shm/nnmairix.el	2009-07-08 13:43:26.320776000 +0200
+++ lisp/gnus/nnmairix.el	2009-06-09 11:02:32.000000000 +0200
@@ -23,9 +23,6 @@

 ;;; Commentary:

-;; THIS IS BETA SOFTWARE! This back end should not mess up or
-;; even delete your mails, but having a backup is always a good idea.
-
 ;; This is a back end for using the mairix search engine with
 ;; Gnus.  Mairix is a tool for searching words in locally stored
 ;; mail.  Mairix is very fast which allows using it efficiently for
@@ -35,32 +32,6 @@
 ;;
 ;; Mairix is written by Richard Curnow.  More information can be
found at
 ;; http://www.rpcurnow.force9.co.uk/mairix/
-;;
-;; For details about setting up mairix&Gnus&nnmairix.el, look at the
-;; emacswiki:
-;;
-;; http://www.emacswiki.org/cgi-bin/wiki/GnusMairix
-;;
-;; The newest version of nnmairix.el can be found at
-;;
-;; http://www.emacswiki.org/cgi-bin/emacs/nnmairix.el
-
-;; For impatient people, here's the setup in a nutshell:
-;;
-;; This back end requires an installed mairix binary which is
-;; configured to index your mail folder.  You don't have to specify a
-;; search folder (but it does no harm, either).  Visit the man page
of
-;; mairix and mairixrc for details.
-;;
-;; Put nnmairix.el into your search path and "(require 'nnmarix)"
into
-;; your .gnus.  Then call nnmairix-create-default-group (or 'G b
-;; c'). This function will ask for all necessary information to
create
-;; a mairix server in Gnus with the default search folder.  This
-;; default search folder will be used for all temporary searches:
call
-;; nnmairix-search ('G b s') and enter a mairix query (like
-;; f:test@example.com). To create a mairix group for one specific
-;; search query, use 'G b g'.  See the emacswiki or the source for
more
-;; information.

 ;; Commentary on the code: nnmairix sits between Gnus and the "real"
 ;; back end which handles the mail (currently nnml, nnimap and
@@ -522,7 +493,7 @@
 	(when (eq nnmairix-backend 'nnml)
 	  (when nnmairix-rename-files-for-nnml
 	    (nnmairix-rename-files-consecutively mfolder))
-	  (nnml-generate-nov-databases-directory mfolder))
+	  (nnml-generate-nov-databases-directory mfolder nil t))
 	(nnmairix-call-backend
 	 "request-scan" folder nnmairix-backend-server)
 	(if (and fast allowfast)
@@ -585,8 +556,13 @@
 	    (mapcar
 	     (lambda (arg) (- arg numcorr))
 	     articles)))
-    (setq rval (nnmairix-call-backend
-		"retrieve-headers" articles folder nnmairix-backend-server fetch-
old))
+    (setq rval
+	  (if (eq nnmairix-backend 'nnimap)
+	      (let ((gnus-nov-is-evil t))
+		(nnmairix-call-backend
+		 "retrieve-headers" articles folder nnmairix-backend-server fetch-
old))
+	    (nnmairix-call-backend
+	     "retrieve-headers" articles folder nnmairix-backend-server
fetch-old)))
     (when (eq rval 'nov)
       (nnmairix-replace-group-and-numbers articles folder group
numcorr)
       rval)))
@@ -1223,7 +1199,8 @@
 	  (unless (and skipdefault
 		       (string= (car cur) default))
 	    (gnus-group-jump-to-group (car cur))
-	    (gnus-group-get-new-news-this-group)))))))
+	    (gnus-group-mark-group 1)))
+	(gnus-group-get-new-news-this-group)))))

 (defun nnmairix-remove-tick-mark-original-article ()
   "Remove tick mark from original article.
@@ -1692,6 +1669,11 @@
   (nnmairix-open-server server)
   (while (string-match "[<>]" mid)
     (setq mid (replace-match "" t t mid)))
+  ;; mairix somehow does not like '$' in message-id
+  (when (string-match "\\$" mid)
+    (setq mid (concat mid "=")))
+  (while (string-match "\\$" mid)
+    (setq mid (replace-match "=," t t mid)))
   (let (allgroups)
     (if (zerop (nnmairix-call-mairix-binary-raw
 		(split-string nnmairix-mairix-command)



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

* Re: gnus active file has been overwritten
  2009-07-08 11:48                           ` Francis Moreau
@ 2009-07-08 13:59                             ` David Engster
       [not found]                             ` <mailman.2066.1247061569.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 22+ messages in thread
From: David Engster @ 2009-07-08 13:59 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
> So I don't know exactly which revision I'm using so I'm not sure if it
> has still the bug.
>
> I'm putting the diff between the revision I'm using and the one I got
> from the last emacs source. Could you tell me if the bug is still
> there ?

> -	  (nnml-generate-nov-databases-directory mfolder))
> +	  (nnml-generate-nov-databases-directory mfolder nil t))

This is what should fix it, so yes, this is the latest version.

-David





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

* Re: gnus active file has been overwritten
       [not found]                             ` <mailman.2066.1247061569.2239.help-gnu-emacs@gnu.org>
@ 2009-07-08 14:55                               ` Francis Moreau
  2009-07-08 21:22                                 ` David Engster
  2009-07-21  7:47                                 ` Francis Moreau
  0 siblings, 2 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-08 14:55 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 8, 3:59 pm, David Engster <d...@randomsample.de> wrote:
> Francis Moreau <francis.m...@gmail.com> writes:
> > So I don't know exactly which revision I'm using so I'm not sure if it
> > has still the bug.
>
> > I'm putting the diff between the revision I'm using and the one I got
> > from the last emacs source. Could you tell me if the bug is still
> > there ?
> > -    (nnml-generate-nov-databases-directory mfolder))
> > +    (nnml-generate-nov-databases-directory mfolder nil t))
>
> This is what should fix it, so yes, this is the latest version.

So I'm using the old version.

I'm going to update and see if it's happening again.

Also I'm planning to use a not persistent temporary directory for my
mairix result directory (the one given by (nnml "mairix" (nnml-
directory "~/mairix")). Do you think it's going to work ?

Thanks


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

* Re: gnus active file has been overwritten
  2009-07-08 14:55                               ` Francis Moreau
@ 2009-07-08 21:22                                 ` David Engster
  2009-07-21  7:47                                 ` Francis Moreau
  1 sibling, 0 replies; 22+ messages in thread
From: David Engster @ 2009-07-08 21:22 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
> Also I'm planning to use a not persistent temporary directory for my
> mairix result directory (the one given by (nnml "mairix" (nnml-
> directory "~/mairix")). Do you think it's going to work ?

I don't know, but since mairix creates the output directories if
necessary, it could work.

-David





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

* Re: gnus active file has been overwritten
  2009-07-08 14:55                               ` Francis Moreau
  2009-07-08 21:22                                 ` David Engster
@ 2009-07-21  7:47                                 ` Francis Moreau
  1 sibling, 0 replies; 22+ messages in thread
From: Francis Moreau @ 2009-07-21  7:47 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

On Jul 8, 4:55 pm, Francis Moreau <francis.m...@gmail.com> wrote:
> On Jul 8, 3:59 pm, David Engster <d...@randomsample.de> wrote:
>
> > Francis Moreau <francis.m...@gmail.com> writes:
> > > So I don't know exactly which revision I'm using so I'm not sure if it
> > > has still the bug.
>
> > > I'm putting the diff between the revision I'm using and the one I got
> > > from the last emacs source. Could you tell me if the bug is still
> > > there ?
> > > -    (nnml-generate-nov-databases-directory mfolder))
> > > +    (nnml-generate-nov-databases-directory mfolder nil t))
>
> > This is what should fix it, so yes, this is the latest version.
>
> So I'm using the old version.
>
> I'm going to update and see if it's happening again.
>

Just to let you know that the issue is gone now.

However I got sometimes this error when starting gnus:

opening input file: no such file or directory, /home/fmoreau/mairix/
zz_mairix-search-1/891

that's probably because the article #891 has been erased.

How can I solve this ?

thanks


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

end of thread, other threads:[~2009-07-21  7:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-27 14:03 gnus: how to improve searching for articles Francis Moreau
2009-06-27 17:29 ` Johan Bockgård
2009-06-28  0:02 ` Giorgos Keramidas
2009-06-29  6:15   ` Francis Moreau
2009-06-30 18:33     ` Giorgos Keramidas
2009-07-01  8:31       ` Francis Moreau
2009-07-01 17:25         ` Setting up nnmairix (was: gnus: how to improve searching for articles) David Engster
     [not found]         ` <mailman.1665.1246507878.2239.help-gnu-emacs@gnu.org>
2009-07-02 13:58           ` Francis Moreau
2009-07-02 22:28             ` Setting up nnmairix David Engster
     [not found]             ` <mailman.1718.1246573745.2239.help-gnu-emacs@gnu.org>
2009-07-06 15:21               ` Francis Moreau
2009-07-06 18:38                 ` David Engster
2009-07-06 18:42                   ` David Engster
     [not found]                 ` <mailman.1938.1246905508.2239.help-gnu-emacs@gnu.org>
2009-07-07  7:26                   ` Francis Moreau
2009-07-08  7:40                   ` gnus active file has been overwritten [was Re: Setting up nnmairix ] Francis Moreau
2009-07-08  9:12                     ` gnus active file has been overwritten David Engster
     [not found]                     ` <mailman.2048.1247044367.2239.help-gnu-emacs@gnu.org>
2009-07-08  9:38                       ` Francis Moreau
2009-07-08  9:53                         ` David Engster
     [not found]                         ` <mailman.2053.1247046818.2239.help-gnu-emacs@gnu.org>
2009-07-08 11:48                           ` Francis Moreau
2009-07-08 13:59                             ` David Engster
     [not found]                             ` <mailman.2066.1247061569.2239.help-gnu-emacs@gnu.org>
2009-07-08 14:55                               ` Francis Moreau
2009-07-08 21:22                                 ` David Engster
2009-07-21  7:47                                 ` Francis Moreau

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 read-only IMAP folder(s) and NNTP newsgroup(s).