Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pass URLs to browser on another machine

31 views
Skip to first unread message

Yeechang Lee

unread,
Jan 24, 2011, 10:46:35 PM1/24/11
to
In the spirit of the new year and the thread lamenting the lack of
alt.hackers posts, here is one minor contribution.

I have been using the same email (VM under Emacs) and news (slrn)
readers for more than 15 years. For most of those years they have run
on a machine that I access via some form of remote, text-only
connection, with everything else running locally. This complicates
passing URLs found in email messages or Usenet postings to a local Web
browser. I could use copy and paste, of course, but where's the fun in
that?

In ~/.slrnrc I have

set Xbrowser "firefox '%s' &"
set non_Xbrowser "openurl '%s'"

and in ~/.vm I have

(setq vm-url-browser "openurl")
(if (eq window-system 'x)
(setq vm-url-browser browse-url-browser-function)
)

(The if function means that, if I by chance am logged directly into
the machine VM and slrn run on, or otherwise have an X display
available, VM instead passes the URL to Emacs' built-in URL handler,
and in turn to the in-line W3M browser.)

'openurl' is the following shell script:

#!/bin/bash
(ssh notebook open $1) || links $1

'notebook' is my MacBook Pro. The script executes via SSH keys on the
MacBook the OS X 'open' command which, among other things, hands URLs
off to the default system browser. If the command fails because I am
away from home and the MacBook is asleep, links displays the URL
instead in the terminal window. This only works with slrn; I have not
yet tried to write the necessary code so that VM will gracefully
process the URL with W3M if openurl fails.

--
<URL:http://www.pobox.com/~ylee/> PERTH ----> *

0 new messages