[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev LYNX: so eg mutt can run it as "server"?
From: |
Michael Warner |
Subject: |
Re: lynx-dev LYNX: so eg mutt can run it as "server"? |
Date: |
Sat, 2 Oct 1999 14:35:32 -0700 |
On or about 01 Oct, 1999, David Combs
<address@hidden> wrote:
> Emacs has this neat facility by which it can be set up
> as a "server", such that with the proper string in "EDITOR"
> env-variable, when some process wants to run the $EDITOR,
> you end up inside the "already been running" emacs.
>
> QUESTION: what about such a feature for LYNX (or is there ALREADY
> one?)?
>
> More and more, you get this html junk in emails; right now,
> I have to save the .html-part to a file, then
> (in my already running lynx that I now "fg" back into),
> I must PREFIX the filename with "file://localhost/u/u5/dkcombs/",
> not something you want to type in by hand.
I think you're out of luck with passing a file to a running
lynx, and you'll need to just spawn a new lynx process on a
message-by-message basis, via a .mailcap file.
If you're still using mutt, make sure there's a line in your
.muttrc specifying the location of your .mailcap, thusly:
set mailcap_path="~/.mailcap:/etc/mailcap"
or where ever they live in your case.
I also:
set use_mailcap=ask-yes
RTFM for that.
Since HTML'ized mail is about all I use my mailcap for, mine is
just:
text/PLAIN; exec lynx -force_html %s
text/html; exec lynx -force_html %s
plus some irrelevant stuff for bzip2'ed attachments.
If the HTML is in the main message body and properly labeled,
that should do it for you. If the HTML is in a separate
attachment &/or mislabeled as text/plain, hit 'v' for the
attachments menu, highlight the desired attachment, and hit 'm'
for "force mailcap use". That way, if the attachment is labeled
text/plain, lynx will still be launched on it. Without the 'm'
mutt would use its internal viewer to show you the text, as
before.
I don't remember if the 'exec' is necessary -- I think I stuck it
in to try solving some terminal hassle, and at least it didn't
seem to break anything for me. Your particular entries will be
shell and command-line-specification-preference specific.
I use a relatively old mutt version, but this should be forwardly
compatible. If you use some other reasonably flexible (*nix'ish,
anyway) mail client, something similar can probably be set up.
> Well, I was going to suggest that lynx add something to the
> "g" command for local files, thus avoiding the long prefix,
Substitute '~/' for 'long prefix/' at the 'g' prompt?
[...]
> So, how about inventing a new url-item, "myfile://<filename>",
> which lynx expands into the localhost/u/u5/dkcombs stuff
> above?
Not sure what you'd use it for (bookmarks?) and I doubt it's what
you really want, but
EXTERNAL:myfile:${HOME}/bin/XXX.sh %s
where XXX.sh is
#!/bin/sh
#XXX.sh called by lynx external for myfiles:'s receives
#'myfile:somestring' as it's argument, chops off the
#'myfile:', and passes somestring to a program.
SOMESTRING=`echo $1 | cut -f2 -d:`
${HOME}/bin/program ${SOMESTRING}
should let you pass arbitrary info to an arbitrary program,
including a new lynx process. Adjust paths as needed.
[...]
> PLEASE, those who think either or both of these two ideas
> (1: server-like lynx,
Improbable of implementation and questionable of need, but could
be cool if it did happen, I suppose.
> and 2: the myfile:// url), SAY SO.
Depending on just what you have in mind, my guess is it's doable
now with EXTERNAL &/or CERNRULES.
> Thanks
Sure. IANAC(oder).
--
Michael Warner
<address@hidden>