Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Tim Landscheidt <tim@tim-landscheidt.de>
To: info-gnus-english@gnu.org
Subject: Re: How to copy "raw", but decoded article body to a new buffer?
Date: Mon, 02 Dec 2019 08:08:54 +0000	[thread overview]
Message-ID: <87v9qztai1.fsf@passepartout.tim-landscheidt.de> (raw)
In-Reply-To: <87v9r87vsg.fsf@passepartout.tim-landscheidt.de>

I wrote:

> […]

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

Two more issues related to that:

- "(gnus-summary-show-article '(16))" will trigger
  gnus-select-article-hook, so to call the former in the
  latter, I had to wrap that in "(let
  (gnus-select-article-hook) […])".  Is there a better/re-
  commended way to solve that?

- gnus-summary-show-article will switch to the *Summary*
  buffer, so in "(gnus-with-article-buffer
  (gnus-summary-show-article '(16)) (something-else))"
  something-else will be executed in the *Summary* buffer,
  therefore I had to wrap that in another
  gnus-with-article-buffer form.  However, when executed in
  the *Article* buffer, C-u C-u g will stay there.  Is this
  a bug?

Tim


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

      reply	other threads:[~2019-12-02  8:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23 11:35 Tim Landscheidt
2019-11-23 12:08 ` Lars Ingebrigtsen
2019-11-24 15:59   ` Tim Landscheidt
2019-11-24 21:19     ` Štěpán Němec
2019-11-24 22:29       ` Tim Landscheidt
2019-12-02  8:08         ` Tim Landscheidt [this message]

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=87v9qztai1.fsf@passepartout.tim-landscheidt.de \
    --to=tim@tim-landscheidt.de \
    --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).