[Top][All Lists]

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

lynx-dev Re: Passing internal data to external handlers

From: Kim DeVaughn
Subject: lynx-dev Re: Passing internal data to external handlers
Date: Mon, 30 Nov 1998 03:42:54 -0800

On Sun, Nov 29, 1998, Klaus Weide (address@hidden) said:
| On Fri, 27 Nov 1998, Kim DeVaughn wrote:
| > Something that I like to do when I save documents, is to prepend a sort of
| > "header block" to them, telling from where and when they were obtained.

| > The method that comes to mind, is along the lines of what "trn" does for
| > similar purposes.  That is, the user can specify all manner of internal
| > information to be passed along to an external script, using a wide variety
| > of %tokens, as formal args in the handler-invoking definition (eg, PRINTER:
| > def, or whatever).
| For the Title this is already being done: it should be passed in the
| environment variable LYNX_PRINT_TITLE to your script.  You might just
| expand that to set other variables for other things of interest.  That
| would certainly be simpler than defining a language with %tokens etc. for
| this purpose.

Ah.  Another useful, if undocumented, feature (yes, I see it buried in one
of the old CHANGES.x files, now that I know what to look for).  It really
would be nice to have *all* the env vars mentioned somewhere ... perhaps in
the man page ... :-) ...

Anyway, I had considered using env vars to pass along some of the internal
data, but thought that using such a method might suffer from portability
problems.  I see there is seperate code in LYPrint.c to handle VMS, but what
about other platforms?

In any case, I'll add vars for those things that I need to pass along, since
as you say, the implementation is fairly trivial, compared to a token-passing
scheme.  Then if there are portability issues, and enough interest from other
folks, I'll revisit token-passing somewhere down the line.

I'll also see about adding such env vars, and maybe others, to the man page.

Thanks muchly for the suggestion ...!


reply via email to

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