Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Fernando de Morais <fernandodemorais.jf@gmail.com>
To: Angel de Vicente <angel.vicente.garrido@gmail.com>
Cc: info-gnus-english@gnu.org, eric@ericabrahamsen.net
Subject: Re: wrong gnus-search in nnml folder
Date: Thu, 02 Feb 2023 00:15:15 -0300	[thread overview]
Message-ID: <87h6w44v24.fsf@gmail.com> (raw)
In-Reply-To: <87edrb1uch.fsf@gmail.com> (Angel de Vicente's message of "Mon, 30 Jan 2023 23:22:06 +0000")

Hello Angel and Eric,

Angel de Vicente <angel.vicente.garrido@gmail.com> writes:

> What I don't get to work is compound queries like since:3d from:alex
> (they work separetely, but nothing gets returned if I try to combine
> two queries...

I use mairix as my search engine on nnmaildir servers and this behavior
has always annoyed me, although I wasn't able to figure out why it
cannot perform this kind of search, until Eric pointed out the
possibility of debugging `gnus-search-run-search'.

The mairix command interprets each query as an individual argument.
When we pass a query like:

#+begin_example
Query: from:alex since:3d
#+end_example

In `gnus-search-run-search' it will become a sole string
("f:alex d:20230129-"), and mairix will return nothing.

Just for a simple experiment, I reevaluated the `gnus-search-run-search'
with the following lines changed:

--- #<buffer gnus-search.el.gz>
+++ #<buffer temp.el>
@@ -1332,7 +1332,8 @@
 	  (message "Doing %s query on %s..." program groups)
 	(message "Doing %s query..." program))
       (setq proc (apply #'start-process (format "search-%s" server)
-			buffer program cp-list))
+			buffer program (flatten-list (mapcar #'split-string
+							     cp-list))))
       (while (process-live-p proc)
 	(accept-process-output proc))
       (setq exitstatus (process-exit-status proc))

And the result of a search like the give example above was the same
given by mairix via terminal.


P.S.: To clarify, I'm using Emacs 28.2.

-- 
Regards,
Fernando de Morais.


  parent reply	other threads:[~2023-02-02  3:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 11:35 Angel de Vicente
2023-01-30 17:45 ` Eric Abrahamsen
2023-01-30 18:14   ` Angel de Vicente
2023-01-30 18:27     ` Angel de Vicente
2023-01-30 18:46       ` Eric Abrahamsen
2023-01-30 20:54         ` Angel de Vicente
2023-01-30 21:18           ` Angel de Vicente
2023-01-30 22:34             ` Eric Abrahamsen
2023-01-30 23:22               ` Angel de Vicente
2023-01-31 18:31                 ` Angel de Vicente
2023-01-31 18:39                   ` Angel de Vicente
2023-02-01 18:05                   ` Eric Abrahamsen
2023-02-02  3:15                 ` Fernando de Morais [this message]
2023-02-02  6:17                   ` Eric Abrahamsen
2023-02-02 11:44                     ` Angel de Vicente
2023-02-02 12:06                     ` Fernando de Morais

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=87h6w44v24.fsf@gmail.com \
    --to=fernandodemorais.jf@gmail.com \
    --cc=angel.vicente.garrido@gmail.com \
    --cc=eric@ericabrahamsen.net \
    --cc=info-gnus-english@gnu.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).