From: Dave Abrahams <dave@boostpro.com>
To: ding@gnus.org
Subject: gnus-warp-to-article, nndoc, and virtual groups?
Date: Sun, 19 Aug 2012 14:40:49 -0400 [thread overview]
Message-ID: <m2y5lalo7i.fsf@pluto.luannocracy.com> (raw)
I have a very handy little function called "gnus-goto-article" that will
bring up an article by message-id in an otherwise-empty group:
#+begin_src lisp
(defun gnus-goto-article (message-id)
(with-temp-buffer
(erase-buffer)
;; Insert dummy article
(insert (format "From nobody Tue Sep 13 22:05:34 2011\n\n"))
(gnus-group-read-ephemeral-group
message-id
`(nndoc ,message-id
(nndoc-address ,(current-buffer))
(nndoc-article-type mbox))
:activate
(cons (current-buffer) gnus-current-window-configuration)
(not :request-only)
'(-1) ; :select-articles
(not :parameters)
0 ; :number
)
(gnus-summary-refer-article message-id)
))
#+end_src
[This is obviously a bit of a hack, but getting this capability was
hard-won to say the least]
Anyway, my problem is that from here, `gnus-warp-to-article' doesn't work
because nndoc groups aren't considered virtual.
#+begin_src lisp
(defun gnus-warp-to-article ()
"Warps from an article in a virtual group to the article in its
real group. Does nothing on a real group."
(interactive)
(when (gnus-virtual-group-p gnus-newsgroup-name)
(let ((gnus-command-method
(gnus-find-method-for-group gnus-newsgroup-name)))
(or
(when (gnus-check-backend-function
'warp-to-article (car gnus-command-method))
(funcall (gnus-get-function gnus-command-method 'warp-to-article)))
(and (bound-and-true-p gnus-registry-enabled)
(gnus-try-warping-via-registry))))))
#+end_src
Recently we accepted a patch to make nnir groups virtual. But this
brings up some more fundamental questions:
* What is "virtual" actually supposed to mean?
* Should "nndoc" be considered virtual?
* Should gnus-warp-to-article really be restricting itself to virtual
groups?
* Should I be doing something different in `gnus-goto-article' to build
a group with my message in it?
Thanks.
--
Dave Abrahams
BoostPro Computing Software Development Training
http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost
next reply other threads:[~2012-08-19 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-19 18:40 Dave Abrahams [this message]
2012-08-23 5:38 ` John Wiegley
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=m2y5lalo7i.fsf@pluto.luannocracy.com \
--to=dave@boostpro.com \
--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
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).