Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* imap split-fancy greedy match?
@ 2016-02-01 21:01 Emanuel Evans
  0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Evans @ 2016-02-01 21:01 UTC (permalink / raw)
  To: info-gnus-english

Hi! I'm trying to use fancy splitting with nnimap like so:

--8<---------------cut here---------------start------------->8---
(nnimap-split-fancy
 (| (to "\\([-_[:alnum:]]+\\)@noreply\\.github\\.com" "github.\\1")
    ;; etc.
    ))
--8<---------------cut here---------------end--------------->8---

The problem: it seems to not match the whole "To" field, so (for
instance) "database_cleaner@noreply.github.com" gets filed into the
"github.cleaner" group instead of "github.database_cleaner". Weirdly, I
can workaround by having a more explicit regexp such as
"\\(\\w+[-_]\\w+\\)@noreply\\.github\\.com", but I don't want to do that
for every combination of groups and punctuation. (This doesn't seem to
be a problem with non-fancy splitting.) Is there any way to make sure
that fancy splitting matches the whole field "greedily"?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: imap split-fancy greedy match?
  2016-02-07 18:53     ` Teemu Likonen
@ 2016-02-07 19:20       ` Emanuel Evans
  0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Evans @ 2016-02-07 19:20 UTC (permalink / raw)
  To: info-gnus-english

Terrific, I'll try that. Thanks!



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: imap split-fancy greedy match?
  2016-02-07 18:37   ` Emanuel Evans
@ 2016-02-07 18:53     ` Teemu Likonen
  2016-02-07 19:20       ` Emanuel Evans
  0 siblings, 1 reply; 5+ messages in thread
From: Teemu Likonen @ 2016-02-07 18:53 UTC (permalink / raw)
  To: Emanuel Evans; +Cc: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 453 bytes --]

Emanuel Evans [2016-02-07 10:37:10-08] wrote:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>> If I remember correctly, the fancy splitting is word-based, sort of
>> -- it wraps the things in \b or something...
>
> Is there any way to customize this behavior?

There is: nnmail-split-fancy-match-partial-words.

-- 
/// Teemu Likonen   - .-..   <https://github.com/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: imap split-fancy greedy match?
  2016-02-07  4:11 ` Lars Ingebrigtsen
@ 2016-02-07 18:37   ` Emanuel Evans
  2016-02-07 18:53     ` Teemu Likonen
  0 siblings, 1 reply; 5+ messages in thread
From: Emanuel Evans @ 2016-02-07 18:37 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> If I remember correctly, the fancy splitting is word-based, sort of --
> it wraps the things in \b or something...

Is there any way to customize this behavior? If not, I think I'll just
go back to non-fancy splitting (which works fine form my uses so far)...



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: imap split-fancy greedy match?
       [not found] <mailman.3357.1454360517.843.info-gnus-english@gnu.org>
@ 2016-02-07  4:11 ` Lars Ingebrigtsen
  2016-02-07 18:37   ` Emanuel Evans
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-07  4:11 UTC (permalink / raw)
  To: Emanuel Evans; +Cc: info-gnus-english

Emanuel Evans <mail@emanuel.industries> writes:

> Hi! I'm trying to use fancy splitting with nnimap like so:
>
> (nnimap-split-fancy
>  (| (to "\\([-_[:alnum:]]+\\)@noreply\\.github\\.com" "github.\\1")
>     ;; etc.
>     ))
>
> The problem: it seems to not match the whole "To" field, so (for
> instance) "database_cleaner@noreply.github.com" gets filed into the
> "github.cleaner" group instead of "github.database_cleaner". Weirdly, I
> can workaround by having a more explicit regexp such as
> "\\(\\w+[-_]\\w+\\)@noreply\\.github\\.com", but I don't want to do that
> for every combination of groups and punctuation. (This doesn't seem to
> be a problem with non-fancy splitting.) Is there any way to make sure
> that fancy splitting matches the whole field "greedily"?

If I remember correctly, the fancy splitting is word-based, sort of --
it wraps the things in \b or something...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-07 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 21:01 imap split-fancy greedy match? Emanuel Evans
     [not found] <mailman.3357.1454360517.843.info-gnus-english@gnu.org>
2016-02-07  4:11 ` Lars Ingebrigtsen
2016-02-07 18:37   ` Emanuel Evans
2016-02-07 18:53     ` Teemu Likonen
2016-02-07 19:20       ` Emanuel Evans

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).