From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82136 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.gnus.general Subject: gnus-warp-to-article, nndoc, and virtual groups? Date: Sun, 19 Aug 2012 14:40:49 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345401749 20182 80.91.229.3 (19 Aug 2012 18:42:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2012 18:42:29 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M30404@lists.math.uh.edu Sun Aug 19 20:42:29 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T3AS8-0001Zx-NP for ding-account@gmane.org; Sun, 19 Aug 2012 20:42:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1T3AQu-0007no-QG; Sun, 19 Aug 2012 13:41:08 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1T3AQt-0007nc-Cc for ding@lists.math.uh.edu; Sun, 19 Aug 2012 13:41:07 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1T3AQq-0001Qz-5o for ding@lists.math.uh.edu; Sun, 19 Aug 2012 13:41:06 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1T3AQm-0004w5-Kt for ding@gnus.org; Sun, 19 Aug 2012 20:41:00 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T3AQk-0000AN-Px for ding@gnus.org; Sun, 19 Aug 2012 20:40:58 +0200 Original-Received: from 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com ([207.172.223.249]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Aug 2012 20:40:58 +0200 Original-Received: from dave by 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Aug 2012 20:40:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 65 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin) Cancel-Lock: sha1:FuqTNkOjbmuII6vFTf0OKAL+zkY= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82136 Archived-At: 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