Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: ding@gnus.org
Subject: Re: how to sort (filter) msg which contain MS word documents
Date: Thu, 24 Apr 2008 20:43:31 +0200	[thread overview]
Message-ID: <v91w4vayb0.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <87skxbcnqw.fsf@mat.ucm.es>

On Thu, Apr 24 2008, Uwe Brauer wrote:

>>>>>> "Reiner" == Reiner Steib <reinersteib+gmane@imap.cc> writes:
>    > On Mon, Apr 14 2008, Uwe Brauer wrote:
>    >> I know that for new message I could use the gnus-splitting
>    >> group and specify the content type like: ("Content-type"
>    >> "application/msword" "DOC")
>
>    > Does this actually work?  I think that nnmail-split-methods only apply
>    > to the headers...
>
> You are right! So there is no way to split DOC attachments?

You need to widen the buffer during the splitting and search for
application/msword.  There's an example in (info "(gnus)Fancy Mail
Splitting") from where you can start:

,----[ (info "(gnus)Fancy Mail Splitting") ]
| `(: FUNCTION ARG1 ARG2 ...)'
|      If the split is a list, and the first element is `:', then the
|      second element will be called as a function with ARGS given as
|      arguments.  The function should return a SPLIT.
| 
|      For instance, the following function could be used to split based
|      on the body of the messages:
| 
|           (defun split-on-body ()
|             (save-excursion
|               (save-restriction
|                 (widen)
|                 (goto-char (point-min))
|                 (when (re-search-forward "Some.*string" nil t)
|                   "string.group"))))
| 
|      The buffer is narrowed to the header of the message in question
|      when FUNCTION is run.  That's why `(widen)' needs to be called
|      after `save-excursion' and `save-restriction' in the example
|      above.  Also note that with the nnimap backend, message bodies will
|      not be downloaded by default.  You need to set
|      `nnimap-split-download-body' to `t' to do that (*note Splitting in
|      IMAP::).
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




  reply	other threads:[~2008-04-24 18:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-14  9:51 Uwe Brauer
2008-04-14 20:34 ` Reiner Steib
2008-04-24 14:48   ` Uwe Brauer
2008-04-24 18:43     ` Reiner Steib [this message]
2008-04-25 10:40       ` Uwe Brauer
2008-04-25 16:17         ` Ted Zlatanov
2008-04-25 17:22           ` Uwe Brauer
2008-04-25 18:47             ` Ted Zlatanov
2008-04-25 21:01               ` James Cloos

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=v91w4vayb0.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=ding@gnus.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).