From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/15878 Path: news.gmane.org!not-for-mail From: Kevin Brubeck Unhammer Newsgroups: gmane.emacs.gnus.user Subject: Re: Browsing to original article in gwene? Date: Mon, 08 Oct 2012 10:39:35 +0200 Message-ID: <87txu5gxx4.fsf@fsfe.org> References: <87r4pdsfyh.fsf@gmail.com> <87ipapt5mg.fsf@mean.albasani.net> <87fw5qj8o8.fsf@toke.dk> <87mwzxjs8z.fsf@fsfe.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8104952685966560374==" X-Trace: ger.gmane.org 1349685653 26475 80.91.229.3 (8 Oct 2012 08:40:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2012 08:40:53 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Mon Oct 08 10:40:59 2012 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TL8tW-0003V1-4s for gegu-info-gnus-english@m.gmane.org; Mon, 08 Oct 2012 10:40:58 +0200 Original-Received: from localhost ([::1]:47968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL8tQ-0005Dl-5J for gegu-info-gnus-english@m.gmane.org; Mon, 08 Oct 2012 04:40:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL8tI-0005A5-Ow for info-gnus-english@gnu.org; Mon, 08 Oct 2012 04:40:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TL8t6-0005y3-5S for info-gnus-english@gnu.org; Mon, 08 Oct 2012 04:40:44 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:57031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL8t5-0005wK-VU for info-gnus-english@gnu.org; Mon, 08 Oct 2012 04:40:32 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TL8t6-0003Ht-Nk for info-gnus-english@gnu.org; Mon, 08 Oct 2012 10:40:32 +0200 Original-Received: from cde31bf51.dhcp.as2116.net ([81.191.49.222]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Oct 2012 10:40:32 +0200 Original-Received: from unhammer by cde31bf51.dhcp.as2116.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Oct 2012 10:40:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 73 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cde31bf51.dhcp.as2116.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:CVgeOzbdjv6TInEoZmTrPvl1UVY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:15878 Archived-At: --===============8104952685966560374== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Kevin Brubeck Unhammer writes: > Toke H=C3=B8iland-J=C3=B8rgensen writes: > >> Memnon Anon writes: >> >>> Something like this? >> >> I modified that function a tiny bit to make sure it doesn't throw an >> error if an invalid buffer shows up in the list, and so it doesn't leave >> the article unformatted if it can't find the archive-at header. It now >> looks like this: > > [=E2=80=A6] > > Note that gnus has this handy macro `gnus-with-article-buffer' that lets > you do away with the whole buffer-list loop: > > #+begin_src emacs-lisp > (defun my-gnus-browse-gwene () > "Start a browser for current gwene article" > (interactive) > (gnus-summary-show-article '(4)) > (let ((url > (gnus-with-article-buffer > (goto-char (point-min)) > (when (re-search-forward "^Archived-at: <\\(.*\\)>$" (point-max) 'noe= rror) > (match-string 1))))) > (gnus-summary-show-article) > (if url > (browse-url url) > (message "Couldn't find any likely url")))) > #+end_src > > > Of course, if gnus had an even handier macro like > > #+begin_src emacs-lisp > (defmacro gnus-with-raw-article-buffer (&rest forms) > `(progn > (gnus-summary-show-article '(4)) > (prog1 (gnus-with-article-buffer ,@forms) > (gnus-summary-show-article)))) > #+end_src Doh, Reiner Steib found the better solution with gnus-original-article-buffer :-) =2D-=20 Kevin Brubeck Unhammer GPG: 0x766AC60C --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJQcpFHAAoJEHQmBt52asYMqYgIAIbvJ0z+9tMsF9HNhPalA0Tt sr011lAC8mtuHukCPO7EIJ0GnY5pvH5oMjkurOIYfbbC4oj6bFImeHYeebRdtSI+ MslXzjvJCt0jZNuvjli5SAF4yRj4PA2QoRSeniSrxdHXU4pFY6Cm5wSbNDocrt2J yy2Imsg1PkVbvrVl6mozLip43zIzkjETAFWWK14bUS3dygWhUZtZRQbG6YU46J16 CtDZjtP9xXNvV0S1mUcf+hFNur0wz3xm11dHQ9JU7NZUjUEi0S1KU4jhA87IEavF u+yc5nNFOiwnqiN8nzcOgLClDgKtaVspiUZ9KgMuwyTOdaFwmZL4docDGV3lrBg= =bzAW -----END PGP SIGNATURE----- --=-=-=-- --===============8104952685966560374== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ info-gnus-english mailing list info-gnus-english@gnu.org https://lists.gnu.org/mailman/listinfo/info-gnus-english --===============8104952685966560374==--