From: Bodertz <bodertz@gmail.com>
To: info-gnus-english@gnu.org
Subject: nnimap-split-download-body removed?
Date: Mon, 30 Nov 2020 08:03:49 -0700 [thread overview]
Message-ID: <871rgaubsa.fsf@gmail.com> (raw)
I wrote a function which can do something useful with the body of an
email. If worse comes to worse, I can run this function manually after
opening the email, but my plan was to use splitting to automate this.
As documented in "(gnus)Fancy Mail Splitting", splitting based on the
content of the email can be done with nnimap by setting
'nnimap-split-download-body' to 't'. See the last sentence:
(: 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 Client-Side
IMAP Splitting).
However, this did not seem to work, although I haven't tested
thouroughly. Looking through the git history of Emacs, it seems that
'nnimap-split-download-body' was removed a little over ten years ago.
An internal variable, 'nnimap-split-download-body-default' is still
present, but is as far as I can tell unused.
Have I missed something obvious? Is there a new way to do this? Am I
just out of luck?
Thanks.
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
next reply other threads:[~2020-11-30 15:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 15:03 Bodertz [this message]
2020-11-30 17:10 ` Eric Abrahamsen
2020-12-01 0:15 ` Bodertz
2020-12-01 1:51 ` Eric Abrahamsen
2020-12-01 3:04 ` Bodertz
2020-12-01 3:35 ` Eric Abrahamsen
2020-12-01 8:46 ` Bodertz
2020-12-01 18:26 ` Eric Abrahamsen
2020-12-02 7:18 ` Bodertz
2020-12-02 20:34 ` Eric Abrahamsen
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=871rgaubsa.fsf@gmail.com \
--to=bodertz@gmail.com \
--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).