From: Uwe Brauer <oub@mat.ucm.es>
To: ding@gnus.org
Subject: Re: insert a link to an article in gmane
Date: Sat, 07 May 2016 21:28:34 +0000 [thread overview]
Message-ID: <877ff5woal.fsf@mat.ucm.es> (raw)
In-Reply-To: <m2eg9deh4g.fsf@gmail.com>
>>> "Sebastian" == Sebastian Christ <rudolfo.christ@gmail.com> writes:
> On 2016-05-07 19:46, Uwe Brauer <oub@mat.ucm.es> wrote:
>> Could you send me this function, please? thanks
Thanks, it works.
Meanwhile I found the following in
https://gist.githubusercontent.com/gnusosa/b4800ca313e862def12f/raw/2136a51e0ad61a1cb9b12cf7d7910f7d2b68b67b/gnus-gmane-link.el
I modified however his function to copy the result into the ring not
calling a browser.
(defun gnus-gmane-link ()
"Grabs the article name and generates a url found in Gmane.
If successful, sends it to the local web browser."
(interactive)
(let ((url
(with-current-buffer gnus-article-buffer
(let ((msgids (split-string (aref gnus-current-headers 8) "[ :]")))
(cond ((and (equal (substring (second msgids) 0 6)
"gwene.")
(goto-char (point-max))
(search-backward "Link" (point-min) 'noerror))
(shr-copy-url)
(current-kill 0))
((equal (substring (second msgids) 0 6)
"gmane.")
(concat "http://comments.gmane.org/" (second msgids) "/" (third msgids))))))))
(if url
(progn
(kill-new url)
(message "Url is now the kill ring: Use Kill-browse-ring"))
(message "Couldn't find any likely url"))))
prev parent reply other threads:[~2016-05-07 21:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 16:02 Uwe Brauer
2016-05-07 19:16 ` Sebastian Christ
2016-05-07 19:46 ` Uwe Brauer
2016-05-07 20:40 ` Sebastian Christ
2016-05-07 21:28 ` Uwe Brauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877ff5woal.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).