* nnimap-split-download-body removed?
@ 2020-11-29 6:02 Bodertz
0 siblings, 0 replies; only message in thread
From: Bodertz @ 2020-11-29 6:02 UTC (permalink / raw)
To: ding
Apologies for any issues posting this message. This may be a duplicate.
I wrote a function which can do something useful with the body of a
message. If worse comes to worse, I can run this function manually, but
my plan was to use splitting to automate this.
As documented in "(gnus)Fancy Mail Splitting", this can be done 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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-30 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-29 6:02 nnimap-split-download-body removed? Bodertz
Gnus development mailing list
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.vuxu.org/ding
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 ding ding/ http://inbox.vuxu.org/ding \
ding@inbox.vuxu.org
public-inbox-index ding
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.vuxu.org/vuxu.archive.emacs.gnus.general
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git