info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to save the attachment?)


From: Kevin Brubeck Unhammer
Subject: Re: How to save the attachment?)
Date: Mon, 22 Sep 2014 11:53:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Rasmus <rasmus@gmx.us> writes:

> Emanuel Berg <embe8573@student.uu.se> writes:
>
>> Quanyang Liu <lqymgt@gmail.com> writes:
>>
>>> Hi all
>>
>> Quanyang Liu also posted this post on gnu.emacs.help,
>> although it doesn't show in the headers. Maybe he did
>> two individual postings.
>>
>> I replied here, and I wonder if I can make a reference
>> to that post, on the gnu.emacs.help, as a followup to
>> "this" post (the one that appeared on that list)?
>>
>> Is there a Gnus/Goggle Groups interface so that I
>> quickly can get the URL? Or an interface to where the
>> list is archived? Yeah, where *is* the list/group
>> archived the usual GNU way? I Googled and surprisingly
>> enough it gave me GG as the first hit (which I don't
>> want to use as it requires JavaScript and I don't have
>> that in Emacs-w3m).
>
> I'm *probably* misunderstanding you here, but is the "Archived-At"
> header that's on every Gmane message what you are looking for?

I rebind M-w in summary-mode to grab the Archived-at header if there's
no active region, find it very handy for sharing links to gmane (and
it's easy to make a further function to open blog posts in a browser):

--8<---------------cut here---------------start------------->8---
(defun gnus-article-gwene/gmane-link ()
  (let ((url (with-current-buffer gnus-original-article-buffer
               (setq url (gnus-fetch-field "Archived-at")))))
    (if (not (stringp url))
        (gnus-message 1 "No \"Archived-at\" header found.")
      (gnus-replace-in-string url "^<\\|>$" ""))))

(defun gnus-summary-kill-region-or-url-at-point ()
  (interactive)
  (let ((url (gnus-article-gwene/gmane-link)))
    (if (or (region-active-p)
            (not url))
        (kill-ring-save (region-beginning) (region-end))
      (kill-new url)
      (message "%s" url))))

(add-hook
 'gnus-startup-hook
 (lambda nil
   (define-key gnus-summary-mode-map (kbd "M-w") 
'gnus-summary-kill-region-or-url-at-point)))
--8<---------------cut here---------------end--------------->8---

-- 
Kevin Brubeck Unhammer

GPG: 0x766AC60C

Attachment: pgpYU7SxpbGT9.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]