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=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17555 invoked from network); 24 Jun 2021 15:21:51 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 24 Jun 2021 15:21:51 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lwRAr-007Zsq-Tl for ml@inbox.vuxu.org; Thu, 24 Jun 2021 10:21:49 -0500 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 1lwRAr-004q10-9g for ml@inbox.vuxu.org; Thu, 24 Jun 2021 10:21:49 -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 1lwRAq-004q0v-AQ for ding@lists.math.uh.edu; Thu, 24 Jun 2021 10:21:48 -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 1lwRAo-007ZsF-4P for ding@lists.math.uh.edu; Thu, 24 Jun 2021 10:21:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CmIX2kzQ7wsmvfcIz4oErnI1RTzGw7Te54TT6Y5O5fM=; b=Twlt7jCsFIL5JK/60C2kkrDoDX JP8Iwd6nczjXXOY1sWtrcaYlfQKaIw5jhhnIIcBiVJSClPZBGj0pbntBCOLhDeiVpHJ43qYqjxLJK vlRfYLOV+u1YRgCMifTiqG84YQDVn81y+JcZEhr4VMNu/dThIlOavieeirpJF0tIKnS8=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwRAg-0001eS-BA for ding@gnus.org; Thu, 24 Jun 2021 17:21:40 +0200 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lwRAf-0002qM-Hk for ding@gnus.org; Thu, 24 Jun 2021 17:21:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: emacs 28 search not working with nnml Date: Thu, 24 Jun 2021 08:21:31 -0700 Message-ID: <87v9631e6c.fsf@ericabrahamsen.net> References: <87bl7wzqpf.fsf@ku.dk> <87mtrgd6zw.fsf@ucl.ac.uk> <87mtrg39r8.fsf@ericabrahamsen.net> <87h7hn3jf6.fsf@ku.dk> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:bjL4tW11tVQgSCcNmQ40xzFGrEQ= List-ID: Precedence: bulk Thomas Alexander Gerds writes: > Eric(1): thank you so much, this helped and solved my problem! > Eric(2): you are right: the hack is not needed and my search functions work > smoothly without it. not sure what remaining bug there might > be, The remaining bug is subtler: if you search a group whose name is a substring of a different group, the code will also attempt to return results from that other group, which will fail. > but you may want to consider to change the default value here for > people like me who use "mail" instead of "Mail": Wait, which default value are you referring to here? `gnus-directory'? > (defcustom gnus-search-notmuch-remove-prefix gnus-directory > "The prefix to remove from each file name returned by notmuch > in order to get a group name (albeit with / instead of .). This is a > regular expression. > > This variable can also be set per-server." > :type 'regexp > :version "28.1") > > cheers Thomas > > Eric Abrahamsen writes: > >> Eric S Fraga writes: >> >>> On Wednesday, 23 Jun 2021 at 14:54, Thomas Alexander Gerds wrote: >>>> I am using nnml and have all my email downloaded to my laptop using >>> >>> I have a similar configuration. My settings look like this: >>> >>> #+begin_src emacs-lisp >>> (setq gnus-secondary-select-methods >>> '((nnml "work" >>> (gnus-search-engine gnus-search-notmuch >>> (remove-prefix "/HOME/Mail") >>> (config-file "/HOME/.notmuch-config") >>> ) >>> (get-new-mail t)))) >>> >>> (add-to-list 'gnus-search-default-engines '(nnml . notmuch)) >>> (setq gnus-search-notmuch-remove-prefix "/HOME/Mail") >>> (with-eval-after-load "gnus-search" >>> (cl-defmethod gnus-search-indexed-parse-output :around >>> ((e gnus-search-notmuch) s q groups) >>> (let ((gs (mapcar (lambda (g) (replace-regexp-in-string "\\." "/" g)) >>> groups))) >>> (cl-call-next-method e s q gs)))) >>> #+end_src >>> >>> where HOME in various places above should be replaced by your home >>> directory. I have gnus splitting email into various sub-directories of >>> Mail/. >>> >>> The last bit was suggested by Jose A. Ortega Ruiz on the gnus newsgroup >>> [1] sometime in late 2020 and proved to be necessary (at that time) to >>> get the new search engine to work with nnml. It basically changes the >>> file paths from . to / separators. >> >> FWIW, this hack isn't necessary any more, if you're running a recent >> Emacs from master (looks like since early February of this year). >> >> Thomas, the bug you're seeing is something I'm aware of, I just haven't >> come up with a great solution for it yet (actually I'd forgotten about >> it). I'll get that fixed soon, and report back here. >> >> Eric >> >> >> >>