Gnus development mailing list
 help / color / mirror / Atom feed
* Getting the URL from a nnrss-Message
@ 2001-06-27 10:50 Christoph Conrad
  2001-07-12 17:13 ` ShengHuo ZHU
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Conrad @ 2001-06-27 10:50 UTC (permalink / raw)


Hi,

i am using nnrss with the latest Oort Gnus and GNU Emacs 21.0.103.

My configuration:

,----
| (require 'nnrss)
| 
| (defun gnus-user-format-function-X (header)
|   (let ((descr (assq nnrss-description-field
|                      (mail-header-extra header))))
|     (if descr (cdr descr) "")))
| 
| (add-to-list 'nnmail-extra-headers nnrss-description-field)
`----

For Freshmeat i have made an entry in the group parameters (G p in
 Group buffer)

,----
| ((gnus-summary-line-format "%U %-20,20s - %uX\n"))
`----

so that i see the subject with the description line. I want to achieve
that when i press <RET> in the summary buffer the webbrowser jumps to
the url within the message under the cursor.

How to get the url out of the nnrss-Message?

i. A.
Best regards,
Christoph Conrad
-- 
TTi Entwicklungszentrum GmbH,  Elisabethstr. 16, D-52062 Aachen
Fon: +49 241 47051-0  Fax: +49 241 47051-89 Web: http://www.cli.de
Look Ma, this man can twist his fingers as if they were made of rubber,
isn't that amazing? -- Not really, he's been using emacs for years...!



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Getting the URL from a nnrss-Message
  2001-06-27 10:50 Getting the URL from a nnrss-Message Christoph Conrad
@ 2001-07-12 17:13 ` ShengHuo ZHU
  2001-07-13 17:40   ` Christoph Conrad
  0 siblings, 1 reply; 6+ messages in thread
From: ShengHuo ZHU @ 2001-07-12 17:13 UTC (permalink / raw)


Christoph Conrad <C.Conrad@cli.de> writes:

> Hi,
> 
> i am using nnrss with the latest Oort Gnus and GNU Emacs 21.0.103.
> 
> My configuration:
> 
> ,----
>| (require 'nnrss)
>| 
>| (defun gnus-user-format-function-X (header)
>|   (let ((descr (assq nnrss-description-field
>|                      (mail-header-extra header))))
>|     (if descr (cdr descr) "")))
>| 
>| (add-to-list 'nnmail-extra-headers nnrss-description-field)
> `----
> 
> For Freshmeat i have made an entry in the group parameters (G p in
>  Group buffer)
> 
> ,----
>| ((gnus-summary-line-format "%U %-20,20s - %uX\n"))
> `----
> 
> so that i see the subject with the description line. I want to achieve
> that when i press <RET> in the summary buffer the webbrowser jumps to
> the url within the message under the cursor.
> 
> How to get the url out of the nnrss-Message?

I've added nnrss-url-field for the url.

ShengHuo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Getting the URL from a nnrss-Message
  2001-07-12 17:13 ` ShengHuo ZHU
@ 2001-07-13 17:40   ` Christoph Conrad
  2001-07-13 19:33     ` ShengHuo ZHU
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Conrad @ 2001-07-13 17:40 UTC (permalink / raw)
  Cc: ding, christoph.conrad

Hello ShengHuo,

you wrote:

    ZSH> I've added nnrss-url-field for the url.

For those who want to use it for opening an nnrss url directly from
the summary buffer i supply some code here. Is there a better way to
define the key locally to the group? Maybe with group parameters?

======================================================================
CUT HERE - CUT HERE - CUT HERE - CUT HERE - CUT HERE - CUT HERE - CUT
======================================================================
(require 'browse-url)

(defun browse-nnrss-url( arg )
  (interactive "p")
  (let ((url (assq nnrss-url-field
                   (mail-header-extra
                    (gnus-data-header
                     (assq (gnus-summary-article-number)
                           gnus-newsgroup-data))))))
    (if url
        (browse-url (cdr url))
      (gnus-summary-scroll-up arg))))

(eval-after-load "gnus"
  #'(define-key gnus-summary-mode-map
      (kbd "<RET>") 'browse-nnrss-url))

(add-to-list 'nnmail-extra-headers nnrss-url-field)
======================================================================
CUT HERE - CUT HERE - CUT HERE - CUT HERE - CUT HERE - CUT HERE - CUT
======================================================================

Best regards,
Christoph Conrad
-- 
TTi Entwicklungszentrum GmbH,  Elisabethstr. 16, D-52062 Aachen
Fon: +49 241 47051-0  Fax: +49 241 47051-89 Web: http://www.cli.de
Look Ma, this man can twist his fingers as if they were made of rubber,
isn't that amazing? -- Not really, he's been using emacs for years...!



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Getting the URL from a nnrss-Message
  2001-07-13 17:40   ` Christoph Conrad
@ 2001-07-13 19:33     ` ShengHuo ZHU
  2001-07-13 21:17       ` Christoph Conrad
  0 siblings, 1 reply; 6+ messages in thread
From: ShengHuo ZHU @ 2001-07-13 19:33 UTC (permalink / raw)


Christoph Conrad <cc@cli.de> writes:

> Hello ShengHuo,
> 
> you wrote:
> 
>    ZSH> I've added nnrss-url-field for the url.
> 
> For those who want to use it for opening an nnrss url directly from
> the summary buffer i supply some code here. Is there a better way to
> define the key locally to the group? Maybe with group parameters?

Thanks. I've added it into the info file.

ShengHuo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Getting the URL from a nnrss-Message
  2001-07-13 19:33     ` ShengHuo ZHU
@ 2001-07-13 21:17       ` Christoph Conrad
  2001-07-13 22:09         ` ShengHuo ZHU
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Conrad @ 2001-07-13 21:17 UTC (permalink / raw)
  Cc: ding

Hello ShengHuo,

    > Thanks. I've added it into the info file.

Fine! The last line (which is required!?) got lost:

(add-to-list 'nnmail-extra-headers nnrss-url-field)

Best regards,
cu, -cc-
-- 
=> GNU Emacs Webring @ <http://www.gnusoftware.com/WebRing/> <=
Look Ma, this man can twist his fingers as if they were made of rubber,
isn't that amazing? -- Not really, he's been using emacs for years...!


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Getting the URL from a nnrss-Message
  2001-07-13 21:17       ` Christoph Conrad
@ 2001-07-13 22:09         ` ShengHuo ZHU
  0 siblings, 0 replies; 6+ messages in thread
From: ShengHuo ZHU @ 2001-07-13 22:09 UTC (permalink / raw)


Christoph Conrad <christoph.conrad@gmx.de> writes:

> Hello ShengHuo,
> 
>    > Thanks. I've added it into the info file.
> 
> Fine! The last line (which is required!?) got lost:
> 
> (add-to-list 'nnmail-extra-headers nnrss-url-field)

Added.

ShengHuo


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-07-13 22:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-27 10:50 Getting the URL from a nnrss-Message Christoph Conrad
2001-07-12 17:13 ` ShengHuo ZHU
2001-07-13 17:40   ` Christoph Conrad
2001-07-13 19:33     ` ShengHuo ZHU
2001-07-13 21:17       ` Christoph Conrad
2001-07-13 22:09         ` ShengHuo ZHU

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).