Created
December 16, 2014 20:50
-
-
Save gnusosa/0164bbec9585bf64ae26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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 | |
| (browse-url (message url)) | |
| (message "Couldn't find any likely url")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment