[Top][All Lists]

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

Re: "mailto:" + EXTERN wishlist [lynx-dev]

From: Klaus Weide
Subject: Re: "mailto:" + EXTERN wishlist [lynx-dev]
Date: Fri, 11 Jun 1999 02:44:38 -0500 (CDT)

On Thu, 10 Jun 1999, Michael Warner wrote:
> On or about 10 Jun, 1999, Louis-David Mitterrand
> <address@hidden> wrote:
> > On Thu, Jun 10, 1999 at 02:41:41AM -0500, Klaus Weide wrote:
> > > For mailto links, EXTERN ('.') can be used:
> > > 
> > >     <>
> > 
> > That's nice. I just mapped:
> > 
> > EXTERNAL:mailto:mutt %s:TRUE ## mutt is a popular mail client under unix
> > 
> > It would be absolutely perfect if the "mailto:"; prefix did not appear
> > in %s and if the "subject?" field that can be added to mailto: links
> > would be passed as %S for example.
> When in doubt, wrap it!


> I've got:
> EXTERNAL:mailto:${HOME}/bin/scripts/ %s:TRUE
> where is the very minimal:
> #!/bin/sh
> called by lynx external for mailto:'s receives
> #'mailto:address@hidden' as it's argument, chops off the
> #'mailto:', and passes the address to an email program.
> ADD=`echo $1 | cut -f2 -d:`
> ${HOME}/bin/mutt ${ADD}
> , and I imagine some modification might even let you deal
> with the "?subject"-type variations.

Try this, if your /bin/sh understands the ${parameter#word} and
${parameter%word} syntax (it works fine for me with bash, but is
broken with my version of /bin/ash):
--------------- snip ---------------
#! /bin/sh called by lynx external for mailto:'s receives
#'mailto:address@hidden' as it's argument, chops off the
#'mailto:' and subject if present, and passes the address and subject
#to an email program (here, mutt).

#Note: URL-escaped characters in mailto-URLs are NOT handled correctly.




--------------- snip ---------------

> And thus perhaps we might approach absolute perfection in an
> imperfect world.

Not perfection, since %XX isn't unescaped and other xxx=yyy pairs
aren't handled.

Also it doesn't handle a subject given by
<A HREF="mailto:..."; TITLE=subject>.

> PS. There are also some environmental variables set by lynx
> that might be useful, but I don't know whether/how they
> could be used with EXTERN.  The (most easily found)
> documentation only seems to mention PRINTER: and lynxcgi
> use, I think.  See:
> lynx_help/keystrokes/environments.html

None of that seems to apply for EXTERN.


reply via email to

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