[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to copy "raw", but decoded article body to a new buffer?
From: |
Tim Landscheidt |
Subject: |
Re: How to copy "raw", but decoded article body to a new buffer? |
Date: |
Sun, 24 Nov 2019 22:29:35 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Štěpán Němec <stepnem@gmail.com> wrote:
>> That works fine when I type C-u C-u g, however when I run
>> | M-: (gnus-summary-show-article 16) RET
>> I get prompted "View as charset:" which somewhat defeats the
>> purpose of automation.
>> Any advice for that?
> (gnus-summary-show-article 16) ≊ C-u 16 g
> C-u C-u g ≊ (gnus-summary-show-article '(16))
> Cf. (info "(elisp)Prefix Command Arguments")
Ah! With that, something like:
| (defun tl-ab2nb nil
| (interactive)
| (gnus-summary-show-article '(16))
| (gnus-summary-select-article-buffer)
| (article-goto-body)
| (copy-to-buffer (generate-new-buffer "article body") (point) (point-max)))
works nicely. (Only nitpick: Gnus adds a trailing newline,
i. e. the function above applied to a mail generated by
"echo echo Test | at now" produces a buffer with
"Test\n\n".)
Thanks,
Tim