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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16015 invoked from network); 13 Aug 2021 16:50:47 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 13 Aug 2021 16:50:47 -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.2) (envelope-from ) id 1mEaOK-00GdBc-3i for ml@inbox.vuxu.org; Fri, 13 Aug 2021 11:50:44 -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 1mEaOJ-00Eyz1-RD for ml@inbox.vuxu.org; Fri, 13 Aug 2021 11:50:43 -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 1mEaOH-00Eyyt-H5 for ding@lists.math.uh.edu; Fri, 13 Aug 2021 11:50:41 -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.2) (envelope-from ) id 1mEaOC-00GdBR-D4 for ding@lists.math.uh.edu; Fri, 13 Aug 2021 11:50:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=u/EpqJ02wkOxtlQZ5nlSvei4pPeOF625Fqjuk5pDb14=; b=s7s5COyLpMZ12HE/CO2i1Vk7qn uSkbSJq+Vz4om3vCRYciYYFzKkm4mK8OmQKLK3DDxJhhrYUVEBfs9vvFKhoJW5OpF60tdNRrhYUKq 3RtAjiG3H0otGg5+mgFLqp/lce2EPJaXmxZhAsFrqNce4u0Y0M9abZt+fKJ3JnNjb5hY=; Received: from mail.ericabrahamsen.net ([52.70.2.18]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEaO1-0006CU-IB for ding@gnus.org; Fri, 13 Aug 2021 18:50:29 +0200 Received: from localhost (c-71-197-184-122.hsd1.wa.comcast.net [71.197.184.122]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 5AFABFA086; Fri, 13 Aug 2021 16:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1628873422; bh=u/EpqJ02wkOxtlQZ5nlSvei4pPeOF625Fqjuk5pDb14=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fCPiBOhjIo+/GPuM3blLnfPb3CqA7JYmJMkkaw6h0fx6ikWdrNX5qI7/WUrbYoUAa 5A0ZkjpQETtI9Hmt33PM/vo1DkR9fTQH/lU+aEMjyUh3J3+/n059iGfCY4TnKBT45+ BSbUJtXzxdI+nNCDq2K0zL4QMeCS+bI6gYV34xIc= From: Eric Abrahamsen To: Daniel Jensen Cc: ding@gnus.org Subject: Re: Help testing gnus-search fixups References: <87sg12uejj.fsf@ericabrahamsen.net> <87a6n9ov0e.fsf@tullinup.koldfront.dk> <87zgv97x1u.fsf@ku.dk> <87pmw4ly9a.fsf@tullinup.koldfront.dk> <87k0mclxo8.fsf@tullinup.koldfront.dk> <87zgv7thls.fsf@ericabrahamsen.net> <87bl6tuqcb.fsf@posteo.org> <87mtqd83f7.fsf@ericabrahamsen.net> <87bl6sual8.fsf@posteo.org> <87h7gj9x2w.fsf@ericabrahamsen.net> <87fsw21w3k.fsf@posteo.org> <86bl6j650f.fsf@phe.ftfl.ca> <87r1ffoatn.fsf@posteo.org> <87lf5ntupj.fsf@ericabrahamsen.net> <87pmur4xuk.fsf@ericabrahamsen.net> <87a6lvu0oo.fsf@posteo.org> <868s1fwsnk.fsf@phe.ftfl.ca> <8735rn60vv.fsf@ericabrahamsen.net> <86y29fvafr.fsf@phe.ftfl.ca> <87sfzl1bn8.fsf@ericabrahamsen.net> <877dgtrbz7.fsf@bigwalter.net> Date: Fri, 13 Aug 2021 09:50:20 -0700 In-Reply-To: <877dgtrbz7.fsf@bigwalter.net> (Daniel Jensen's message of "Tue, 10 Aug 2021 09:32:44 +0200") Message-ID: <87wnop5lwz.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk Daniel Jensen writes: > Eric, > > I tried your latest gnus-search code, but it didn't work for me. I > noticed that in gnus-search-indexed-parse-output the `group' variable > was wrong, resulting in nnmaildir-base-name-to-article-number returning > nil. This is my setup, having multiple secondary nnmaildir servers: > > (setq gnus-secondary-select-methods > '((nnmaildir "One" (directory "~/Mail/one/")) > (nnmaildir "Two" (directory "~/Mail/two/")) > ...) > gnus-search-default-engines > '((nnmaildir . notmuch))) > > I found that I could make it work by giving `prefix' its value from the > servers at the start of the function. Like so: > > (let ((prefix (or (nnmaildir--srv-dir > (alist-get (string-remove-prefix "nnmaildir:" server) > nnmaildir--servers nil nil #'equal)) > "")) > ...)) > > This uses the correct prefix "~/Mail/one/" and so on, not just "~/Mail/" > from the engine. I have no idea what a general solution would look like. > It could be my setup that is wrong, I don't know. Sorry for the slow response, I was camping... If you're only using one notmuch index, it's enough to set the global options like `gnus-search-notmuch-remove-prefix'. If you've got two nnmaildir servers each with its own notmuch index, you'll have to specific the different prefixes within the engine configuration: ((nnmaildir "One" (directory "~/Mail/one/" (gnus-search-engine gnus-search-notmuch (remove-prefix "~/Mail/one/")))) (nnmaildir "Two" (directory "~/Mail/two/" (gnus-search-engine gnus-search-notmuch (remove-prefix "~/Mail/two/"))))) Note how the sexps are nested, it's important that the engine-related variables go within the engine configuration sexp. I realize that 'remove-prefix is redundant with the nnmaildir 'directory setting here, and hope to eventually be able to get rid of that. Hope that helps, Eric