[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "mailto:" + EXTERN wishlist [lynx-dev]
From: |
Vlad Harchev |
Subject: |
Re: "mailto:" + EXTERN wishlist [lynx-dev] |
Date: |
Mon, 7 Jun 1999 14:12:27 +0500 (SAMST) |
On Sun, 13 Jun 1999, David Combs wrote:
> This is probably not directly related to what you've been
> specifically talking about, but it IS related to some
> neat trickery re options via prefix and suffix strings
> that you can prepend and append to.
>
> A friend once gave me this idea, re filename-strings,
> via adding extra syntax WITHIN the string.
>
> You of assume some char or esc-seq that isn't ever going
> to be used in a file name. :-)
>
> Say you have the string "foo.dat", the name of a file.
>
> Now invent some options you might like to be attached
> to that name, perhape a directory-name (not originally
> specified), a debug-option that says "shout-out whenever
> you do x, y, or z with this file", etc, any of a hundred
> things you can think of you might like to attach as "things to do"
> when your (huge) program deals with that file (or file-name).
>
> Lets choose back-slash for escape-char -- no, thata's no good,
> the pc-M$ people use that. How about back-quote, "`", for now,
> anyway.
>
> So if the user wants debug shoutouts for THIS file,
> he enters it's name as "foo.bar `debug=(x,y) `bletchPoint=3",
> and then when your code scans that, it sets up the debug-stuff
> and the bletchpoint stuff, in the struct or wherever, where
> you can see it easily.
>
> (The idea here is to make the user-interaction simpler, with
> fewer questions asked, eg "do you want bletchpoint; if so, enter
> the value for it:", etc. This way he enters ONE string, also
> easier to set up for a batch-job/script.)
>
> ----- what about setting DEFAULTS?
>
> Suppose your DEFAULT for bletchpoint is 7. How to handle that?
>
> Simple: you keep around a string constant "`bletchpoint=3 ",
> along with your OTHER defaults, eg "debug=0 " (note the trailing space).
>
> NOW, when he types in his "annotated" string, you APPEND
> that to (a copy of) all your DEFAULT strings, catted together.
>
> (Another use for those default-strings catted together: to tell
> the user what the defaults ARE, with NO work from you.)
>
> Then, you process this WIDE string from LEFT TO RIGHT, the
> final "redefinition" of something being the "winner".
>
> (Since defaults are prepended, and his options to their right).
>
> Cool, no?
>
> I think so, anyway.
>
> Any use for this trick in Lynx's user-interaction, options,
> etc?
Seems like good idea for some kind of software. But IMO lynx don't work with
files at all in the manner this wise technique can be used for. Another point
- complex programs can require a lot of debugging settings, so even 255 chars
of filename won't be enough to pass all info. May be it will be better to
place a file with basename of file to open, but with some (known to the
program) extension, so that all debugging info can be stored in it.
> David
>
Best regards,
-Vlad
- Re: "mailto:" + EXTERN wishlist [lynx-dev], (continued)
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Vlad Harchev, 1999/06/12
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Klaus Weide, 1999/06/12
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Vlad Harchev, 1999/06/12
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Klaus Weide, 1999/06/12
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Vlad Harchev, 1999/06/12
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Klaus Weide, 1999/06/12
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Vlad Harchev, 1999/06/13
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Klaus Weide, 1999/06/14
- Re: "mailto:" + EXTERN wishlist [lynx-dev], Vlad Harchev, 1999/06/14
- Re: "mailto:" + EXTERN wishlist [lynx-dev], David Combs, 1999/06/14
- Re: "mailto:" + EXTERN wishlist [lynx-dev],
Vlad Harchev <=