From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88326 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Command for browsing article URLs? Date: Thu, 10 Jan 2019 14:27:23 -0800 Message-ID: <87r2dki1x0.fsf@ericabrahamsen.net> References: <878szwwdjw.fsf@ericabrahamsen.net> <87r2dmub03.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1547159131 4199 195.159.176.226 (10 Jan 2019 22:25:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2019 22:25:31 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: ding@gnus.org To: Haider Rizvi Original-X-From: ding-owner+M36535=ding+2Daccount=gmane.org@lists.math.uh.edu Thu Jan 10 23:25:27 2019 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghilT-0000xv-8b for ding-account@gmane.org; Thu, 10 Jan 2019 23:25:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.91) (envelope-from ) id 1ghinY-0004HN-KP for ding-account@gmane.org; Thu, 10 Jan 2019 16:27:36 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1ghinW-0004HE-Dg for ding@lists.math.uh.edu; Thu, 10 Jan 2019 16:27:34 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1ghinU-0006TD-LE for ding@lists.math.uh.edu; Thu, 10 Jan 2019 16:27:34 -0600 Original-Received: from mail.ericabrahamsen.net ([50.56.99.223]) by quimby.gnus.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ghinQ-0002n3-DK for ding@gnus.org; Thu, 10 Jan 2019 23:27:30 +0100 Original-Received: from localhost (50-251-205-17-static.hfc.comcastbusiness.net [50.251.205.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id AB5B63F03D; Thu, 10 Jan 2019 22:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1547159246; bh=Q12sZrS1RFz/mVq1AeWkBLO3BoVy3QHPDwzDrPLyrI8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YSv4OdlOzLFC1df1AgxsfUQgteKhylfzTQg/KXt/0U+IJhC0c4v7nxZOSKrDklhhT bojnwEM7aeMNF0qBsHQ22J4ImAQfnuuP047t0WXTfIe+u4/qtOGFBwPmlZ4oycel52 obx/7u0LQqC7zZfWxyDpQ7N3nrLGDPbxOlynoDy4= In-Reply-To: (Haider Rizvi's message of "Thu, 10 Jan 2019 11:47:37 -0700") X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Haider Rizvi writes: > Eric Abrahamsen writes: > >> Haider Rizvi writes: >> >>> Eric Abrahamsen writes: >>> >>>> I'd like to have a command, call it [...] Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [50.56.99.223 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88326 Archived-At: Haider Rizvi writes: > Eric Abrahamsen writes: > >> Haider Rizvi writes: >> >>> Eric Abrahamsen writes: >>> >>>> I'd like to have a command, call it `gnus-article-browse-url', which >>>> collects all the links/URLs in the article body, and then offers to >>>> browse one of them (choosing with completion). Bound to "K l", >>>> naturally. >>> >>> I use two functions along these lines but not exactly what you asked >>> for. >>> >>> 1. ace-link-gnus: I've it bound to M-o for some historical reason. In >>> typical ace-fashion, it highlights all urls in the article and you use >>> a key to browse the url in your browser. >> >> That's handy, thank you! I'm glad someone else has done the boring work >> for me :) >> >>> 2. my-gnus-browse function: Based on the newsgroup name, it calls >>> various functions to find parent url for this article from the article >>> headers. For example, gwene/gmane add a Archived-at header to point to >>> the original article. I had various mailing lists that I found it useful for. >>> >>> Let me know if you want to see the latter. >> >> Yes please; I think this is also useful, and on more than one occasion >> I've wanted to easily follow permalinks from Archived-At headers. Maybe >> there's a way to let users distinguish between links in the article >> headers and links in the article body. > > Eric, > > Sorry, got busy elsewhere. I've posted snippet of my code at: > https://gist.github.com/harizvi/97ee5564047206d6014301c3911d8fbb Thanks for this! It looks like you've made some pretty use-case-specific functions, though, and I'd ideally like this to be a single function, that's able to handle a variety of links with a single interface (I originally thought `browse-url', but now apparently `widget-button-press' is the way to go, except I can't make it work right). But thank you for this code! It will come in handy, and at the very least it's good to know that this is a common need. Eric