Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Pankaj Jangid <pankaj@codeisgreat.org>
Cc: "Adam Sjøgren" <asjo@koldfront.dk>, ding@gnus.org
Subject: Re: Does Gnus automatically run 'notmuch new' if configured?
Date: Thu, 24 Sep 2020 23:05:22 -0700	[thread overview]
Message-ID: <87r1qq9ysd.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <m24knmcxph.fsf@codeisgreat.org> (Pankaj Jangid's message of "Fri, 25 Sep 2020 09:30:26 +0530")

Pankaj Jangid <pankaj@codeisgreat.org> writes:

> On Thu, Sep 24 2020, Adam Sjøgren wrote:
>
>>> does Gnus automatically run "notmuch new" if notmuch is the configured
>>> search engine.
>>
>> If you want it run every time you have fetched mail, I think you could
>> add calling it to a hook, maybe gnus-after-getting-new-news-hook?
>
> Are hooks asynchronous? Eric had also suggested a similar solution. He
> suggested to put this at the time of startup. But my question is - will
> it increase the waiting time? I am fetching emails from multiple sources
> and it already takes 4-5 seconds to fetch emails when I press 'g'.

It's not the hook that's synchronous or asynchronous, it's the call to
the external process. You can use `shell-command' for a synchronous call
(probably not what you want), or `async-shell-command' for... async.

The async call should return more or less instantly. I'm sure notmuch is
capable of continuing to handle search queries while it's in the middle
of an update, so there's not actually any harm in calling it more often,
apart from burning CPU cycles.

Otherwise, your wait while Gnus fetches new mail is totally unrelated to
notmuch updating its index, as that happens in a completely separate
process.

HTH,
Eric


  reply	other threads:[~2020-09-25  6:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  8:32 Pankaj Jangid
2020-09-24 16:42 ` Eric Abrahamsen
2020-09-24 17:55 ` Adam Sjøgren
2020-09-25  4:00   ` Pankaj Jangid
2020-09-25  6:05     ` Eric Abrahamsen [this message]
2020-09-25  7:51       ` Pankaj Jangid
2020-09-25  8:09   ` Eric S Fraga
2020-09-25  9:31     ` Adam Sjøgren
2020-09-25 14:44       ` Pankaj Jangid
2020-09-25 16:31         ` Eric Abrahamsen
2020-09-25 17:47           ` Pankaj Jangid
2020-09-25 18:16             ` Adam Sjøgren
2020-09-25 18:45             ` Eric Abrahamsen
2020-09-25 18:52               ` Adam Sjøgren
2020-09-26  1:29               ` Pankaj Jangid
2020-09-26 11:48                 ` Adam Sjøgren
2020-09-26 17:08                   ` Pankaj Jangid
2020-09-25 18:25       ` Adam Sjøgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1qq9ysd.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=asjo@koldfront.dk \
    --cc=ding@gnus.org \
    --cc=pankaj@codeisgreat.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).