Gnus development mailing list
 help / color / Atom feed
From: Emanuel Berg <moasenwood@zoho.eu>
To: ding@gnus.org
Subject: gnus-summary-goto-random-article
Date: Wed, 27 Nov 2019 02:14:38 +0100
Message-ID: <86ftia5ddt.fsf@zoho.eu> (raw)

Here is some code that is to be used in a yet
unfinished small project.

Please comment if you can think of
improvements, and also if you know that what
I do is already somewhere else.

Full source: https://dataswamp.org/~incal/emacs-init/gnus/mail-to-many.el

(defun mtm-open-group ()
  (gnus-group-read-group nil nil "nnml:mail.obi-one") )

(defun gnus-summary-goto-random-article ()
  (interactive)
  (let*((ids             gnus-newsgroup-articles)
        (article-count   (length ids) )
        (random-position (random article-count))
        (article         (nth random-position ids)) )
    (gnus-summary-goto-article article) ))

(defun gnus-article-get-body ()
  (when (article-goto-body)
    (buffer-substring-no-properties (point) (point-max)) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=86ftia5ddt.fsf@zoho.eu \
    --to=moasenwood@zoho.eu \
    --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

Gnus development mailing list

Archives are clonable: git clone --mirror http://inbox.vuxu.org/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