* rss, links and external browser
@ 2008-08-05 15:26 Memnon Anon
2008-08-06 1:03 ` Katsumi Yamaoka
0 siblings, 1 reply; 5+ messages in thread
From: Memnon Anon @ 2008-08-05 15:26 UTC (permalink / raw)
To: info-gnus-english
Hi!
I am using gnus to read some rss feeds.
Sometimes, I want to follow links.
my .emacs has this:
;; Found this config here:
;; http://www.emacswiki.org/cgi-bin/wiki/JorgenSchaefersEmacsConfig
(defun fc-choose-browser (url &rest args)
(interactive "sURL: ")
(if (y-or-n-p "Use external browser? ")
(browse-url-generic url)
(w3m-browse-url url)))
(setq browse-url-browser-function 'fc-choose-browser)
(global-set-key "\C-xm" 'browse-url-at-point)
Whenever there is a link like: http://www.google.de,
it works as expected. I am asked whether I want
to use my internal or external browser.
But if there is a "rendered" link like: Go _here_ to read
on, I always end up in w3m and have to press M to
read in my external browser.
C-x m works, mouse and enter on the link do not.
So, which function is called using enter/mouse on a link and
how can I change this to the way I am used to?
TIA
Memnon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rss, links and external browser
2008-08-05 15:26 rss, links and external browser Memnon Anon
@ 2008-08-06 1:03 ` Katsumi Yamaoka
2008-08-06 10:27 ` Memnon Anon
0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2008-08-06 1:03 UTC (permalink / raw)
To: info-gnus-english
>>>>> Memnon Anon wrote:
> I am using gnus to read some rss feeds.
> Sometimes, I want to follow links.
> my .emacs has this:
> ;; Found this config here:
> ;; http://www.emacswiki.org/cgi-bin/wiki/JorgenSchaefersEmacsConfig
> (defun fc-choose-browser (url &rest args)
> (interactive "sURL: ")
> (if (y-or-n-p "Use external browser? ")
> (browse-url-generic url)
> (w3m-browse-url url)))
> (setq browse-url-browser-function 'fc-choose-browser)
> (global-set-key "\C-xm" 'browse-url-at-point)
> Whenever there is a link like: http://www.google.de,
> it works as expected. I am asked whether I want
> to use my internal or external browser.
> But if there is a "rendered" link like: Go _here_ to read
> on, I always end up in w3m and have to press M to
> read in my external browser.
> C-x m works, mouse and enter on the link do not.
> So, which function is called using enter/mouse on a link and
> how can I change this to the way I am used to?
In html articles rendered by emacs-w3m, the `w3m-minor-mode-map'
keymap controls what command is called by a key or an event. So,
in the ~/.emacs-w3m.el file, you can modify it as follows:
(define-key w3m-minor-mode-map "KEY" 'COMMAND)
But if you use pretty recent emacs-w3m[1], I think the following
one is just what you want:
(setq w3m-goto-article-function 'browse-url)
The default value of this variable is nil and emacs-w3m uses its
certain function when following links in html articles.
[1] You can get the most recent one from the emacs-w3m CVS server
or: http://cvs.namazu.org/emacs-w3m.tar.gz
Regards,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rss, links and external browser
2008-08-06 1:03 ` Katsumi Yamaoka
@ 2008-08-06 10:27 ` Memnon Anon
2008-08-06 11:36 ` Katsumi Yamaoka
0 siblings, 1 reply; 5+ messages in thread
From: Memnon Anon @ 2008-08-06 10:27 UTC (permalink / raw)
To: info-gnus-english
Hi!
On Aug 6, 3:03 am, Katsumi Yamaoka <yama...@jpl.org> wrote:
> >>>>> Memnon Anon wrote:
> > my .emacs has this:
> > ;; Found this config here:
> > ;;http://www.emacswiki.org/cgi-bin/wiki/JorgenSchaefersEmacsConfig
> > (defun fc-choose-browser (url &rest args)
> > (interactive "sURL: ")
> > (if (y-or-n-p "Use external browser? ")
> > (browse-url-generic url)
> > (w3m-browse-url url)))
> > (setq browse-url-browser-function 'fc-choose-browser)
> > (global-set-key "\C-xm" 'browse-url-at-point)
> (setq w3m-goto-article-function 'browse-url)
Okay, this works nearly as I want it.
I used this (setq w3m-goto-article-function 'fc-choose-browser).
Gnus/Emacs asks: external y/n.
But if I choose y, conkeror is started *and* the buffer starts w3m
for the url.
Is there a way to prohibit w3m and start only the external browser?
Another question: Where did you find this information?
I am still quite new to emacs. I searched the info files, but there
is
such a wealth of information, I still feel quite lost.
Customizability (is this a word ? ;) is as much a gift as a curse ;)
TIA
Memnon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rss, links and external browser
2008-08-06 10:27 ` Memnon Anon
@ 2008-08-06 11:36 ` Katsumi Yamaoka
2008-08-06 14:23 ` Memnon Anon
0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2008-08-06 11:36 UTC (permalink / raw)
To: info-gnus-english
>>>>> Memnon Anon wrote:
> On Aug 6, 3:03 am, Katsumi Yamaoka <yama...@jpl.org> wrote:
[...]
>> (setq w3m-goto-article-function 'browse-url)
> Okay, this works nearly as I want it.
> I used this (setq w3m-goto-article-function 'fc-choose-browser).
> Gnus/Emacs asks: external y/n.
> But if I choose y, conkeror is started *and* the buffer starts w3m
> for the url.
> Is there a way to prohibit w3m and start only the external browser?
Hm, do you use emacs-w3m that is really recent? I tried
`fc-choose-browser' and didn't reproduce such an odd behavior.
(I use the most recent emacs-w3m, that is under development.)
> Another question: Where did you find this information?
I know it because I'm just a person who last improved the function
(`w3m-safe-view-this-url') that uses `w3m-goto-article-function'. ;-)
> I am still quite new to emacs. I searched the info files, but there
> is
> such a wealth of information, I still feel quite lost.
> Customizability (is this a word ? ;) is as much a gift as a curse ;)
Sorry for inconvenience. We emacs-w3m team don't have enough
capability and time.
Regards,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rss, links and external browser
2008-08-06 11:36 ` Katsumi Yamaoka
@ 2008-08-06 14:23 ` Memnon Anon
0 siblings, 0 replies; 5+ messages in thread
From: Memnon Anon @ 2008-08-06 14:23 UTC (permalink / raw)
To: info-gnus-english
Hi!
On Aug 6, 1:36 pm, Katsumi Yamaoka <yama...@jpl.org> wrote:
> Hm, do you use emacs-w3m that is really recent? I tried
> `fc-choose-browser' and didn't reproduce such an odd behavior.
Okay, my fault. I thought my debian testing would have a fairly
new version. Now, I installed the tar.gz you suggested in your
first email. Works :)
> > Another question: Where did you find this information?
[...]
> > Customizability (is this a word ? ;) is as much a gift as a curse ;)
> Sorry for inconvenience. We emacs-w3m team don't have enough
> capability and time.
Oh no! This was not meant to be a reproach. I just try to improve my
method. It is often suggested to use information included in emacs and
not search the web. Lots of stuff out there is outdated. I could not
find anything and so thought I did not search carefully enough.
Only question left is why emacs suddenly thinks every single
link is unsecure and keeps asking me if I really want to
visit it, using prefix argument.
w3m-safe-url-regexp is nil, so AFAI understand it, this should not
happen. But leave this to me ;) This is a nice little training to
learn how to get around ;)
thanks!
memnon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-06 14:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-05 15:26 rss, links and external browser Memnon Anon
2008-08-06 1:03 ` Katsumi Yamaoka
2008-08-06 10:27 ` Memnon Anon
2008-08-06 11:36 ` Katsumi Yamaoka
2008-08-06 14:23 ` Memnon Anon
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).