From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_LOW autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29439 invoked from network); 25 Sep 2020 17:47:57 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with ESMTPUTF8; 25 Sep 2020 17:47:57 -0000 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1kLroZ-00GNDF-9z; Fri, 25 Sep 2020 12:47:23 -0500 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kLroT-00GNBM-Dy for ding@lists.math.uh.edu; Fri, 25 Sep 2020 12:47:17 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kLroR-002dSs-ME for ding@lists.math.uh.edu; Fri, 25 Sep 2020 12:47:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=VCRv/Kceio7+QF0/jR6vdeEbJWD3cNHCVRIgCJiwm0w=; b=CkVpXnmi/lHxYs0UzhWL1bn9eu 0lo4SYn9I3PqXc+UbjhYXCG6nUq8KNCwUcCRVJACTvxNRRXkSlSCW5HI44fEemwc6heTF57JXSNL6 LMEqqOnMreDpscFtGScVif1VtC4Nx4NZpTDyTXkVZVNxgNAtx8ggnvIiWRRCjcZAwiNI=; Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by quimby with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kLroK-0004sj-T1 for ding@gnus.org; Fri, 25 Sep 2020 19:47:11 +0200 Received: by mail-pg1-x52b.google.com with SMTP id 197so3195855pge.8 for ; Fri, 25 Sep 2020 10:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=VCRv/Kceio7+QF0/jR6vdeEbJWD3cNHCVRIgCJiwm0w=; b=BE3ahyNHlCKRVbyugBfdkg+YbhLcSnkHdxa4QYIkEa8U1Qv97Fjn3zB0whvtj/d3vr OEqpJA5g4vh3edvvSJZ3wtYGRS7y/nuTkSTOnEL+M02WNbmkiVgOvj/V9v8F5t8ITmT2 IlpLXNvuG+R+NCIvwRpFH0OAb6tIGULnavrD26dQ7EykevDI/zOPC1isAoBRfI2kftB7 VH+7RIr29xEhVeEz6Uj4P/IiverdfGA2eH+yh4rF+oUad5SUESawNfG16vocwusw5QEm Ps78U9AkgEGpXc4GXnlqNkfWhluOW0BfbSHUCv+8xE3NozN4daxZJkn4jXMwULvne4yv lEWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=VCRv/Kceio7+QF0/jR6vdeEbJWD3cNHCVRIgCJiwm0w=; b=eSGSyJI23U3rMneVOWSBKYnW/joHEj0ufNZITV4VxsAh06CwT4JAOe5OgElGXWJOUQ M9AlqTurCC4QzWeMIQMHmaXIt2rBa3my3jDpkeNo78IBWQ6ToH8tymxH47EKoGbyoQEU hcpQVQiMD0qoR483Pv0kWyttCWhUdIIt9i2ebCUr3F5J52vLEaDSOBi3HOGIivS3dUFB Juq77W7OQZ2VjrA2vTIjtw+4J/vFDjpV4Kbrsrwdo27rvekvbIaJtQYQQRhnNdYmeB2s rJ4hZXRfbf3Vtwh+MYS9lfbWI9Z8JfAEo3MUNBkkziY1res2/DYgnUG4OP7JKPBSAYao NdnQ== X-Gm-Message-State: AOAM533UrfJ4I+K89DTswJxKupg307DTV9GoMol6RW0u63VIvVW3+lHv hTch2y/INaV5xekWS0sWJGBn0Nc1PZDfQQ== X-Google-Smtp-Source: ABdhPJyqr5eDCkQi+zeJA40XxyHMamJqK/lbzor/MZq8jusfouuk9m48o4OeXjW1XqbO6+hCdegkdQ== X-Received: by 2002:a17:902:eb05:b029:d1:8c50:b1bc with SMTP id l5-20020a170902eb05b02900d18c50b1bcmr514474plb.35.1601056025225; Fri, 25 Sep 2020 10:47:05 -0700 (PDT) Received: from BigBook.local ([2405:201:5c06:7085:3465:874d:a087:e76b]) by smtp.gmail.com with ESMTPSA id h12sm3239693pfo.68.2020.09.25.10.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 10:47:04 -0700 (PDT) From: Pankaj Jangid To: Eric Abrahamsen Cc: Pankaj Jangid , Adam =?utf-8?Q?Sj=C3=B8gren?= , ding@gnus.org Subject: Re: Does Gnus automatically run 'notmuch new' if configured? Organization: Code Is Great Foundation References: <875z83njo0.fsf@tullinup.koldfront.dk> <87o8luz39v.fsf@ucl.ac.uk> <87o8lukxsm.fsf@tullinup.koldfront.dk> <873635akcz.fsf@ericabrahamsen.net> X-Face: #1mZPTdyZkzei|Hk$MhE?f(3T[Uxh9MW'Ewn610"\p9Q@7LjiO{4>uH&z3p'6Y?_,h)GQ'Y A;.i)[28BKd`Ton]]cOd|#isdz)&E!jRx@DX8N/*63[|x&JqwC,AmukEFVvt&AA*2H..Z'wxqs([H> kbp(Q/\fTwAm% !C}\xG0DS7(DaXPynsU3VED[SbY_:*`C`U'@;vp[YQ6I\#>E/slE#fLI4ap(^kSLS\*/ ]XNNMD6#b9KK\|:=(=DFek9%)L-ZTg3n#$0B Date: Fri, 25 Sep 2020 23:17:00 +0530 In-Reply-To: <873635akcz.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 25 Sep 2020 09:31:40 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk On Fri, Sep 25 2020, Eric Abrahamsen wrote: > Ahem, I may have led you astray with `async-shell-command', which is > mostly meant to be called interactively -- in which case you usually > want to see the output. In lisp code that runs in the background, > you're better off using `start-process', where you can tell it not to > keep the output: I had explored a little bit of `start-process` and `call-process` when I was reading help on `async-shell-comman`. But then I thought these are low level methods and I don't need that much control. > (start-process "unnecessary label" nil "/path/to/notmuch" '("new")) This is nice. I am using this now. Just a correction. Last argument is not list. List was giving error. I am using below code, (start-process "notmuch" "*Notmuch*" "notmuch" "new") Now, I have another related question - which hook is best for the purpose? Currently I am using `gnus-after-getting-new-news-hook`. But that is run only when I press `g` (gnus-group-get-new-news). It seems that the hook is not invoked when I start Gnus. Also the hook is probably invoked before splitting. Since I am using `nnml` backend, there are couple of choices for my use-case. One is `nnmail-read-incoming-mail`. The documentation also says, "use this hook to notify any mail watch programs". But I also use simple splittig (`nnmail-split-methods`). And the documentation also has a `nnmail-split-hook`. But from the documentation it looks like that this hook is run, after the splitting has started, and not after the splitting is over - --8<---------------cut here---------------start------------->8--- =E2=80=98nnmail-split-hook=E2=80=99 Hook run in the buffer where the mail headers of each message is kept just before the splitting based on these headers is done. The hook is free to modify the buffer contents in any way it sees fit=E2=80=94the buffer is discarded after the splitting has been done,= and no changes performed in the buffer will show up in any files. =E2=80=98gnus-article-decode-encoded-words=E2=80=99 is one likely func= tion to add to this hook. --8<---------------cut here---------------end--------------->8--- In such case if I run `notmuch new` then the indexing might create links to non-existing paths. Any other hook that you can think of?