* gnus-warp-to-article, nndoc, and virtual groups?
@ 2012-08-19 18:40 Dave Abrahams
2012-08-23 5:38 ` John Wiegley
0 siblings, 1 reply; 2+ messages in thread
From: Dave Abrahams @ 2012-08-19 18:40 UTC (permalink / raw)
To: ding
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gnus-warp-to-article, nndoc, and virtual groups?
2012-08-19 18:40 gnus-warp-to-article, nndoc, and virtual groups? Dave Abrahams
@ 2012-08-23 5:38 ` John Wiegley
0 siblings, 0 replies; 2+ messages in thread
From: John Wiegley @ 2012-08-23 5:38 UTC (permalink / raw)
To: ding
>> Dave Abrahams <dave@boostpro.com> writes:
> 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:
If you don't mind opening your INBOX (mine always has a low article count, so
it's the fastest group to open), this does the same thing but I haven't
encountered any weirdnesses when warping or pulling in full threads:
(defun gnus-goto-article (message-id)
(gnus-summary-read-group "INBOX" 15 t)
(gnus-summary-refer-article message-id))
John
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-23 5:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-19 18:40 gnus-warp-to-article, nndoc, and virtual groups? Dave Abrahams
2012-08-23 5:38 ` John Wiegley
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).