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 30818 invoked from network); 18 Nov 2020 00:49:35 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 18 Nov 2020 00:49:35 -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 1kfBd4-006cDU-W2; Tue, 17 Nov 2020 18:47:23 -0600 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 1kfBd3-00Bn2P-Pk; Tue, 17 Nov 2020 18:47:21 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kfBcz-00Bn0k-GE for ding@lists.math.uh.edu; Tue, 17 Nov 2020 18:47:17 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kfBcx-00DBKu-5c for ding@lists.math.uh.edu; Tue, 17 Nov 2020 18:47:17 -0600 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:Date:References: In-Reply-To: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=rPzvgAsF3CM8bnjbCSWY7BcVd63Rwvbf2LWGM2Xh15o=; b=dWuwwA6rl9Sgfx+f54l6banzLk rgNhL+GyiM7icnIJzB2Mh44Y3yeMGKTJz4GfkncJC8WNgQT5nO5eRDlwifigr+gKq/bExcrGXush7 1OGzFJO+Rt+jUJtbJzBNBOH5jtMDFXowYz4pXPjssGPH+a49QR+Lgm9wUefdMpUx0XZk=; Received: from eggs.gnu.org ([2001:470:142:3::10]) by quimby.gnus.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfBck-0004fi-2a for ding@gnus.org; Wed, 18 Nov 2020 01:47:10 +0100 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38953) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfBce-0005qR-JQ; Tue, 17 Nov 2020 19:46:57 -0500 Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247]:50648 helo=osgiliath.local) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1kfBce-0005Ky-8Z; Tue, 17 Nov 2020 19:46:56 -0500 Received: by osgiliath.local (Postfix, from userid 1000) id 25B0840497; Wed, 18 Nov 2020 00:46:54 +0000 (GMT) From: "Jose A. Ortega Ruiz" To: Eric Abrahamsen Cc: Eric S Fraga , ding@gnus.org Subject: Re: New "gnus-search" syntax and interface In-Reply-To: <87lfezlemj.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 17 Nov 2020 15:58:44 -0800") References: <87blgdavsb.fsf@ericabrahamsen.net> <877dqpikh5.fsf@ucl.ac.uk> <87sg9dctwu.fsf@hillenius.net> <87tuttfm20.fsf@ucl.ac.uk> <87ft5dgrm6.fsf@ericabrahamsen.net> <87361djiui.fsf@ucl.ac.uk> <877dqpgoky.fsf@ericabrahamsen.net> <87pn4hc97h.fsf@gnus.jao.io> <871rgtgxcn.fsf@ucl.ac.uk> <87k0ul2l62.fsf@ericabrahamsen.net> <874klodz20.fsf@ucl.ac.uk> <87lfezlemj.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: Date: Wed, 18 Nov 2020 00:46:54 +0000 Message-ID: <87lfezwkxt.fsf@gnus.jao.io> MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk On Tue, Nov 17 2020, Eric Abrahamsen wrote: > Eric S Fraga writes: > >> On Monday, 16 Nov 2020 at 10:47, Eric Abrahamsen wrote: >>> Well that's pretty weird. I didn't think I changed any of the actual >>> parsing behavior, only reorganized code. >> >> With these complex systems, the whole concept of emergent behaviour >> raises its head! ;-) >> >> Happy to test out anything you change etc., of course. > > Thanks very much. This is still baffling me. If you (and/or Jose, or > anyone else) have a moment, would you please send me the command-line > output of a successful notmuch search (ie absolute filenames) which > fails in Emacs master right now? Feel free to anonymize however > necessary, though obviously leaving the group-name part of the filepath > alone. Plus whatever notmuch-related config you've got... If i perform a gnus-search for "baffled" in this group, which is called by gnus "nntp:gmane.emacs.gnus.general", the buffer where gnus-search-indexed-parse-output runs has the following output from notmuch (which correctly inserts real path names): /home/jao/var/mail/gmane/emacs/gnus/general/65 /home/jao/var/mail/feeds/news/cur/1605280382.M861830P724182.osgiliath,S=3292,W=3331:2,Sa /home/jao/var/mail/gwene/org/arxiv/computer/science/1102 where /home/jao/var/mail is my remove-prefix. That method (gnus-search.el:1364) is receiving as its 'groups' argument the value '("gmane.emacs.gnus.general"). the method constructs a regexp that it calls group-regexp using that value, and that regexp is wrong. That is because it uses as its value: (when groups (regexp-opt (mapcar (lambda (x) (gnus-group-real-name x)) groups))) which, for grous being '("gmane.emacs.gnus.general"), evaluates to: "\\(?:gmane\\.emacs\\.gnus\\.general\\)" That is wrong because the method then tries to match in the results buffer, using that regexp, things like: /home/jao/var/mail/gmane.emacs.gnus.general/65 instead of correct pathnames such as: /home/jao/var/mail/gmane/emacs/gnus/general/65 The end result is that, despite notmuch finding correct paths and inserting them correctly in the temporary results buffer, gnus-search-indexed-parse-output fails to recognise them when it is filtering those belonging to the searched for groups. And this is because it's constructing a wrong regular expression in gnus-search.el:1367, and using it in gnus-search.el:1381. The workaround my advice implements is changing the value of the input parameter groups from '("foo.bar") to '("foo/bar"). I'm most probably belabouring here many things obvious to you, sorry about that :) Hope this helps, jao -- Flags are bits of colored cloth that governments use first to shrink-wrap people's brains and then as ceremonial shrouds to bury the dead. -Arundhati Roy, writer and activist (b. 1961)