From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83788 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.gnus.general Subject: Re: Proposal: gnus-refer-article Date: Sat, 28 Sep 2013 19:12:21 -0700 Message-ID: References: <78CB1236-3178-46A5-8AAD-02542C23825B@boostpro.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1380420830 6460 80.91.229.3 (29 Sep 2013 02:13:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Sep 2013 02:13:50 +0000 (UTC) Cc: "ding\@gnus.org" To: Lars Magne Ingebrigtsen Original-X-From: ding-owner+M32044@lists.math.uh.edu Sun Sep 29 04:13:53 2013 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 1VQ6W6-0001o7-7d for ding-account@gmane.org; Sun, 29 Sep 2013 04:13:50 +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 1VQ6Uz-0001X9-4P; Sat, 28 Sep 2013 21:12:41 -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 1VQ6Uw-0001Wv-1C for ding@lists.math.uh.edu; Sat, 28 Sep 2013 21:12:38 -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 1VQ6Ut-0002DJ-QP for ding@lists.math.uh.edu; Sat, 28 Sep 2013 21:12:37 -0500 Original-Received: from mail-ie0-f169.google.com ([209.85.223.169]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1VQ6Ur-0005kc-Vo for ding@gnus.org; Sun, 29 Sep 2013 04:12:34 +0200 Original-Received: by mail-ie0-f169.google.com with SMTP id tp5so7281318ieb.14 for ; Sat, 28 Sep 2013 19:12:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=8vDFkZQhs2Tec4lm3oLr5xTEW+6v5yJeYsbk7L4UJGk=; b=SVRvRTJU7cAVXO1sGCAN43QwYn0jM4ROsNniscovAL9lKYln7m/pVpCf6TFr8yuBaG gk3yqfYSnZN8FNqkwPlTBIJGxqWc0KkFsJGN/CRsm8GPdu01iFt2HXLgffQUhOPdEZrS Rp64kWYOnHeg/rembZxBQIGYQk49XB349wl7SKJJUlmA2XLzwYs+hugznDBVm+//0FP7 g+B5+FcQd/VRpq8YODl/HsBtWOTaDL8VZrWTbbsQ/G2TquAmkF+rhRucLVGrQKaq0KKL pzDygQAI82RHQiasWrARBP4CEODizZjjDxoJxgkpO4UbCY/UU1UvM3ixqgSL8uCohuXG B28w== X-Gm-Message-State: ALoCoQnZDVRj3fjkZyJ1mIwfMWp4YI/jN7H56ygqb23t55j19dcI5HoNUrjVXFoYIIwRf32QyX3R X-Received: by 10.50.87.33 with SMTP id u1mr8513761igz.42.1380420747580; Sat, 28 Sep 2013 19:12:27 -0700 (PDT) Original-Received: from pluto.boostpro.com (107-219-149-247.lightspeed.sntcca.sbcglobal.net. [107.219.149.247]) by mx.google.com with ESMTPSA id ri1sm7907569igc.2.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 28 Sep 2013 19:12:26 -0700 (PDT) Original-Received: by pluto.boostpro.com (Postfix, from userid 501) id D2BB529A7961; Sat, 28 Sep 2013 19:12:21 -0700 (PDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Mon, 05 Aug 2013 04:16:24 +0200") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.2.93 (darwin) X-Spam-Score: -2.9 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83788 Archived-At: on Sun Aug 04 2013, Lars Magne Ingebrigtsen wrote: > Dave Abrahams writes: > >> voil=C3=A0: > > Thanks; applied. Could you respin `gnus-refer-article' to use this new > setup? OK, here it is. One side-effect of using nndoc instead of a custom method is that the mode line of the resulting buffer is not as pretty. I'm sure someone like you could address that pretty quickly, though, if you care. --8<---------------cut here---------------start------------->8--- (require 'nndoc) (defun gnus-refer-article (message-id) "Open a group containing the article with the given MESSAGE-ID." (interactive "sMessage-ID: ") (with-temp-buffer ;; Prepare a dummy article (erase-buffer) (insert "From nobody Tue Sep 13 22:05:34 2011\n\n") ;; Prepare pretty modelines for summary and article buffers (let ((gnus-summary-mode-line-format "Found %G") (gnus-article-mode-line-format=20 ;; Group names just get in the way here, especially the abbrevia= ted ones (if (string-match "%[gG]" gnus-article-mode-line-format) (concat (substring gnus-article-mode-line-format 0 (match-b= eginning 0)) (substring gnus-article-mode-line-format (match-end= 0))) gnus-article-mode-line-format) )) =20=20=20=20=20=20 ;; Build an ephemeral group containing the dummy article (hidden) (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 )) ;; Fetch the desired article (gnus-summary-refer-article message-id) )) --8<---------------cut here---------------end--------------->8--- --=20 Dave Abrahams