From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: info-gnus-english@gnu.org
Subject: Re: nnir notmuch search on specific groups?
Date: Tue, 23 Oct 2018 11:01:28 +0800 [thread overview]
Message-ID: <87woq9e587.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87va5vhudu.fsf@hfph.mwn.de>
"Andreas Goesele" <goesele@hfph.mwn.de> writes:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>>> For subfolders it only would be necessary to replace the "." by a
>>> slash "/". So instead of searching "mail.subfolder" (as subfolders are
>>> shown in the group buffer) it should search "mail/subfolder".
>>
>> Well that's where I'm a little hesitant. I'm not really familiar with
>> how this path transformation stuff usually works, and don't want to
>>
>> I suppose we could add an option that's either nil (don't use groups and
>> paths at all), t (use untransformed paths), or a function that munges
>> the group names appropriately. Then it would just be a matter of finding
>> a reasonable default behavior.
>
> I think that would be a great solution, which could solve the backslash
> vs. forward slash problem!
Okay, I've reported this with a patch as bug#33122. The new option name
is called `nnir-notmuch-filter-group-names-function'.
In the end I decided a t value didn't make a lot of sense -- if users
want to pass the group names through unchanged (which is almost
certainly a bad idea), they can set the above option to #'identity.
By default (assuming this patch is accepted with no change), the
filtering *doesn't* do the transform you wanted. You can add your
desired behavior (the docstring mentions this) like so:
(add-function :filter-return nnir-notmuch-filter-group-names-function
(lambda (g) (replace-regexp-in-string "\\." "/" g)))
Eric
next prev parent reply other threads:[~2018-10-23 3:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-20 21:56 Andreas Goesele
2018-10-21 3:48 ` Eric Abrahamsen
2018-10-21 10:35 ` Adam Sjøgren
2018-10-21 16:49 ` Eric Abrahamsen
2018-10-21 17:50 ` Adam Sjøgren
2018-10-21 18:58 ` Eric Abrahamsen
[not found] ` <mailman.2552.1540148988.1284.info-gnus-english@gnu.org>
2018-10-21 19:41 ` Andreas Goesele
2018-10-21 20:08 ` Eric Abrahamsen
2018-10-21 20:24 ` Eric Abrahamsen
[not found] ` <mailman.2556.1540152550.1284.info-gnus-english@gnu.org>
2018-10-21 21:17 ` Andreas Goesele
2018-10-23 3:01 ` Eric Abrahamsen [this message]
[not found] ` <mailman.2606.1540263818.1284.info-gnus-english@gnu.org>
2018-10-23 20:37 ` Andreas Goesele
2018-10-24 0:47 ` Eric Abrahamsen
[not found] ` <mailman.2644.1540342724.1284.info-gnus-english@gnu.org>
2018-10-24 16:46 ` Andreas Goesele
[not found] ` <mailman.2547.1540140585.1284.info-gnus-english@gnu.org>
2018-10-21 18:49 ` Andreas Goesele
[not found] ` <mailman.2538.1540118168.1284.info-gnus-english@gnu.org>
2018-10-21 16:41 ` Andreas Goesele
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=87woq9e587.fsf@ericabrahamsen.net \
--to=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).