lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev (patch) - show list of statusline messages from history


From: Leonid Pauzner
Subject: Re: lynx-dev (patch) - show list of statusline messages from history page
Date: Mon, 19 Apr 1999 23:29:29 +0400 (MSD)

19-Apr-99 11:46 Klaus Weide wrote:
> On Mon, 19 Apr 1999, Leonid Pauzner wrote:

>> * HTAlert, HTUserMsg and HTInfoMsg statusline messages now stored in a 
>> cyrcled
>>   buffer and accessible from the History Page as LYNXMESSAGES:/ link.
>>   This allow us to decrease the messages delay in lynx.cfg when we feel
>>   messages too annoying, but have a nice history list for diagnostic 
>> purposes.
>>   Idea belongs to Bela Lubkin. Buffer of 40 lines long. - LP

> I hope you don't mind if I comment on another piece of code I haven't
> tried yet... :)

> 1. There are basically thre ways to generate pseudo-documents (auxiliary
> screens, or whatever they should be called):
> A. Generate HTML in textual form, write it to temp file, then read in
>    temp file and treat as text/html.  Involves SGML.c with all its gory
>    details.
>    Examples: many, you must have used one :)
> B. Generate HTML in textual form, pass directly to (normally) SGML.c
>    (mostly via HTStreamStack).
>    Examples: LYHandleCookies(), LYLoadKeymap()
> C. Generate HTML structures (text, elements, attributes) on the fly, pass
>    directly to HTStructured object (i.e. HTML.c functions), bypassing
>    SGML.c.
>    Examples: files in WWW subdirectory (look for .c files having
>      #define PUTC(c) (*targetClass.put_character)(target, c)
>    or similar)

Yes, I thought on it before. Method C used for LYNXIMGMAP
and directory listings - I was fixing both of them:)
This looks preferrable for all pages except static (like compile-time
settings, or lynx.cfg page), perhaps no additional memory penalties
may be even a benefits. And this require registering such pages
as new protocols, a little bit complicated then temp files.

> Disadvantages for A: overhead of creating/writing/reading file, file
> space needed.  (May be good for things that don't have to be recreated
> every time).

> Disadvantages for A and B: Unnecessary tranformation of
>      content -> flat text form
> and back again.  That includes also escaping characters that need it.
> (Your code seems to be wrong for any messages that contain '&' and '<'
> characters, you'd have to escape those for using method A.)

Oops... yes.  No problem if C.

> Otoh, possible disadvantages for C:
> - A brief look didn't reveal any source file in the src directory
>  using it, only under WWW.  But these days the separation between
> those two directories seems to have broken pretty much anyway (files
> under WWW can include heder files from the src directory, which
> used to not be the case), so that shouldn't be significant.
> - Character translation may not work right, maybe (I don't know
> for sure either way).  Well in this cases the only variable text
> that may need translation is in text, not in attributes, so one
> could set the "document charset" up with a META if necessary
> (which should work with all three methods) - if that should be
> needed for localized messages.

> So my wish, as you can guess by now, is that this should be done
> using method C.  Especially for *this* kind of thing - if one
correct.
> wants to see messages that ralate to disk access problems, like
> some directory set wrong or disk full, one may not be able to
> see them because the temp file can not be created.

>>      BeginInternalPage(fp0, HISTORY_PAGE_TITLE, HISTORY_PAGE_HELP);
>>
>> +    fprintf(fp0, "<tr align=right> <a href=\"LYNXMESSAGES:\">[%s]</a> 
>> </tr>\n",
>> +                            gettext("Your recent statusline messages"));
>> +

> This is the very first link on the History Page.  I'd prefer it to
> be at the bottom, otherwise things like ^H, 'd' become a bit more
> inconvenient.

I would disagree, it is a proper place - a real history of events...
Probably we should set a default link at position #2
(just from memory, there was certain problems this that last fall,
probably another look will be better).

> Actually one shouldn't have to go to the history page in order do see
> past messages.  (And among other things, it won't work if the history
> file cannot be written, see above.)  The normal approach would be to
> sacrifice yet another key, not that I want to recommend it.  But I
> guess 'g LYNXMESSAGES:' should work.  (Good candidate for a jump
> file shortcut...)

I am not good to remember all that keys...

>    Klaus





reply via email to

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