[Lynx-dev] internal state not cleared across tags

2024-05-27 Thread Thorsten Glaser
Example:


 foo






This renders as:

   baz

   [bar]

   meow

I would expect the empty img tag to be dropped/ignored, or
at most result in “[]” as lynx does when removing line 4.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] comments ended by >, not -->

2024-04-17 Thread Thorsten Glaser
rbell--- via Lynx-dev dixit:

>   lynx ends comments at the first > , instead of -->

Toggle historic vs. minimal comment parsing.

bye,
//mirabilos
-- 
  "Using Lynx is like wearing a really good pair of shades: cuts out
   the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
 -- Henry Nelson, March 1999



Re: [Lynx-dev] lynx2.9.1 build issues

2024-04-17 Thread Thorsten Glaser
Thomas Dickey dixit:

>I use this (at the moment, only recall that CONFIG_SHELL is needed for
>the configure script):
>
>case .$SHELL in
>.*/sh)
>   ;;
>*)
>   SHELL=/bin/sh
>   test -f /usr/xpg4/bin/sh && SHELL=/usr/xpg4/bin/sh 
>   ;;
>esac
>
>export SHELL
>CONFIG_SHELL=$SHELL
>export CONFIG_SHELL

That’s positively breaking people’s use of e.g. mksh on systems
with a less-good sh, and not very nice. I’d even consider it a bug.

bye,
//mirabilos
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh



Re: [Lynx-dev] Adding a style

2024-04-03 Thread Thorsten Glaser
rbell--- via Lynx-dev dixit:

>   NEJM has started using  to demarcate the
>beginning of a paragraph.  lynx renders this the same as , which
>makes it hard to read.

That’s correct for s in general, though: upon encountering the
start tag, if not at column 1, emit a newline.

Tell NEJM to use the p tag instead.

bye,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent



Re: [Lynx-dev] lynx corrupts bookmark file

2024-02-20 Thread Thorsten Glaser
Dixi quod…

>If I use an ul instead, it doesn’t seem to do that, but
>sometimes I get…
>
>[…]
>last entry before adding one from lynx
>
>newly-added entry
>
>
>… instead, which is also disturbing.

It also seems to insist to close the ul in my bookmark file
with a /ol.

>I honestly preferred it when lynx kept the bookmark file
>in HTML 3.2-style (without the end tags), even if only
>there…

Can we please get that back, at least as an option?

Yes, that makes it not readable as XML. But it makes editing
easier and lynx’ own appending and removal jobs less error-prone.

Thanks,
//mirabilos
-- 
16:47⎜«mika:#grml» .oO(mira ist einfach gut)  23:22⎜«mikap:#grml»
mirabilos: und dein bootloader ist geil :)23:29⎜«mikap:#grml» und ich
finds saugeil dass ich ein bsd zum booten mit grml hab, das muss ich dann
gleich mal auf usb-stick installieren   -- Michael Prokop über MirOS bsd4grml



[Lynx-dev] lynx corrupts bookmark file

2024-02-19 Thread Thorsten Glaser
Another one, probably new (maybe when lynx started adding
ending tags):

I sometimes hand-edit my bookmarks file to put in new links
or extra information, or even to give structure to some
entries making them sub-entries etc.

So now I have:

[…]
blabla; details:
one
two
three

next entry
[…]

Upon saving a new bookmark entry, lynx appends it behind
“three” removing everything else in the file(!). This is
reproducible.

If I use an ul instead, it doesn’t seem to do that, but
sometimes I get…

[…]
last entry before adding one from lynx

newly-added entry


… instead, which is also disturbing.

I honestly preferred it when lynx kept the bookmark file
in HTML 3.2-style (without the end tags), even if only
there…

That silent, un-undoable data corruption is severe though.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] Unable to Save Charactor Set Changes?

2024-02-11 Thread Thorsten Glaser
Hi Chime,

> Debian SID version, however, over on Shellworld running

yes, I have the same problem. You need the precise line…

ENABLE_LYNXRC:ASSUME_CHARSET:ON

… in /etc/lynx/local.cfg on Debian to be able to save that
from the options menu.

I’m attaching my full local.cfg in case someone is interested
in the full settings I currently use on Debian systems (that
plus lynxrc/(O)ptions of course).

gl hf,
//mirabilos
-- 
Support mksh as /bin/sh and RoQA dash NOW!
‣ src:bash (429 (458) bugs: 0 RC, 295 (315) I, 134 (143) M, 0 F) + 209
‣ src:dash (90 (104) bugs: 0 RC, 51 (54) I, 39 (50) M, 0 F) + 62 ubu
‣ src:mksh (1 bug: 0 RC, 0 I, 1 M, 0 F)
dash has two RC bugs they just closed because they don’t care about quality…# /etc/lynx/local.cfg
STARTFILE:file://localhost/~/
CHARACTER_SET:utf-8
LOCALE_CHARSET:FALSE
HTML5_CHARSETS:TRUE
ASSUME_CHARSET:utf-8
PREPEND_CHARSET_TO_SOURCE:TRUE
PREFERRED_LANGUAGE:
PREFERRED_CHARSET:utf-8
PARTIAL_THRES:3
SHOW_KB_RATE:BYTES,ETA
SHOW_CURSOR:FALSE
DEFAULT_CACHE_SIZE:512
DEFAULT_VIRTUAL_MEMORY_SIZE:25165824
SOURCE_CACHE:MEMORY
SOURCE_CACHE_FOR_ABORTED:KEEP
COLLAPSE_BR_TAGS:FALSE
COOKIE_REJECT_DOMAINS:google.com,google.de,google.at,google.ch,googleusercontent.com,dict.leo.org
PERSISTENT_COOKIES:TRUE
COOKIE_FILE:~/.etc/cookies.txt
COOKIE_SAVE_FILE:~/.etc/cookies.txt
DEFAULT_BOOKMARK_FILE:./.etc/bookmark.htm
POSITIONABLE_EDITOR:jupp
DOWNLOADER:View in less:less -f '%s':FALSE
DOWNLOADER:View in zless:zless -f '%s':FALSE
DOWNLOADER:View in xzless:xzless -f '%s':FALSE
DOWNLOADER:View in xloadimage:xloadimage -quiet '%s':FALSE:XWINDOWS
DOWNLOADER:View in mupdf:mupdf '%s':FALSE:XWINDOWS
DOWNLOADER:Spawn editor:"${VISUAL-${EDITOR-ed}}" '%s':FALSE
QUIT_DEFAULT_YES:FALSE
XLOADIMAGE_COMMAND:xloadimage -quiet %s
NESTED_TABLES: true
EXTERNAL:ftp:wget %s &:FALSE
EXTERNAL:http:wget %s &:FALSE
EXTERNAL:http:links2 -g %s &:FALSE
EXTERNAL:http:mplayer %s &:FALSE
PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING:TRUE
XHTML_PARSING:TRUE
JUSTIFY:TRUE
TEXTFIELDS_NEED_ACTIVATION:TRUE
LEFTARROW_IN_TEXTFIELD_PROMPT:TRUE
ENABLE_LYNXRC:ASSUME_CHARSET:ON
ENABLE_LYNXRC:BAD_HTML:ON
ENABLE_LYNXRC:FORCE_COOKIE_PROMPT:ON
ENABLE_LYNXRC:FORCE_SSL_PROMPT:ON
ENABLE_LYNXRC:FTP_PASSIVE:ON
ENABLE_LYNXRC:HTML5_CHARSETS:ON
ENABLE_LYNXRC:MAKE_LINKS_FOR_ALL_IMAGES:ON
ENABLE_LYNXRC:MAKE_PSEUDO_ALTS_FOR_INLINES:ON
ENABLE_LYNXRC:NO_PAUSE:ON
ENABLE_LYNXRC:PREFERRED_ENCODING:ON
ENABLE_LYNXRC:PREFERRED_MEDIA_TYPES:ON
ENABLE_LYNXRC:RAW_MODE:ON
ENABLE_LYNXRC:SCROLLBAR:ON
ENABLE_LYNXRC:SET_COOKIES:ON
ENABLE_LYNXRC:SHOW_KB_RATE:ON
ENABLE_LYNXRC:TAGSOUP:ON
ENABLE_LYNXRC:UNDERLINE_LINKS:ON
TRACK_INTERNAL_LINKS:TRUE
GLOBAL_MAILCAP:
URL_DOMAIN_PREFIXES:www.
URL_DOMAIN_SUFFIXES:
MAX_URI_SIZE:16384
KEYMAP:^S:UNMAPPED


Re: [Lynx-dev] 2.9.0dev.12m regression (title bar)

2024-01-29 Thread Thorsten Glaser
Chime Hart dixit:

> I wish they hadn't changed the bottom of the screen. […]

That’s the bug I already sent a patch for that fixes it for me,
which TD says he’ll review and apply if good. So it’s temporary.

How or where do you get your lynx package from? Perhaps the
packager could apply the patch for now? Or just hold out until
the next release…

bye,
//mirabilos
-- 
Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend.   -- Andreas Bogk über boehm-gc in d.a.s.r



Re: [Lynx-dev] 2.9.0dev.12m regression (title bar)

2024-01-29 Thread Thorsten Glaser
Dixi quod…

>It happened again in a long-running-ish lynx instance (a bit
>less than five days).

Even more interestingly, I am now on a page with a still long
but slightly shorter title, and it reads:

This is Water - just_got_nargled - Harry Potter - J. K. Rowling [Archive of Our 
Own]... (p

(after those 90c my terminal cuts off)

So something seems to be throwing off the length calculation
for the title bar and only the title bar…

bye,
//mirabilos
-- 
Support mksh as /bin/sh and RoQA dash NOW!
‣ src:bash (429 (458) bugs: 0 RC, 295 (315) I, 134 (143) M, 0 F) + 209
‣ src:dash (90 (104) bugs: 0 RC, 51 (54) I, 39 (50) M, 0 F) + 62 ubu
‣ src:mksh (1 bug: 0 RC, 0 I, 1 M, 0 F)
dash has two RC bugs they just closed because they don’t care about quality…



Re: [Lynx-dev] 2.9.0dev.12m regression (title bar)

2024-01-29 Thread Thorsten Glaser
Dixi quod…

>so apparently something happened *during* the session to break
>it‽

It happened again in a long-running-ish lynx instance (a bit
less than five days).

bye,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent



Re: [Lynx-dev] An error with temporary file

2024-01-27 Thread Thorsten Glaser
Riku Virtanen dixit:

> /usr/bin/brotli -j -d /tmp/lynx6fQBBD/L1617-7134TMP.html.br

Is /usr/bin/brotli installed and usable?

(I’ve not enabled that in my build. If it relies on an external
utility, perhaps it should not @ Debian packagers)

bye,
//mirabilos
-- 
If Harry Potter gets a splitting headache in his scar
when he’s near Tom Riddle (aka Voldemort),
does Tom get pain in the arse when Harry is near him?
-- me, wondering why it’s not Jerry Potter………



Re: [Lynx-dev] An error with temporary file

2024-01-22 Thread Thorsten Glaser
Philip Webb dixit:

>It works for me with 2.9.0_pre12-r1 installed via Gentoo Linux.

Same for me with 2.9.0 release.

first
   10. Using https://www.tripadvisor.com/
then
#Tripadvisor: Over a billion reviews & contributions for Hotels, 
Attractions, Restaurants, and more (p1 of 7)

The OP said something about compression and I do have…
  Preferred media type : [42][(1)__Accept lynx's internal types]
…but…
  Preferred encoding   : [43][(6)__All_]
includes all the compressings (gzip/deflate/compress/bzip2).

HTH,
//mirabilos
-- 
Support mksh as /bin/sh and RoQA dash NOW!
‣ src:bash (429 (458) bugs: 0 RC, 295 (315) I, 134 (143) M, 0 F) + 209
‣ src:dash (90 (104) bugs: 0 RC, 51 (54) I, 39 (50) M, 0 F) + 62 ubu
‣ src:mksh (1 bug: 0 RC, 0 I, 1 M, 0 F)
dash has two RC bugs they just closed because they don’t care about quality…



Re: [Lynx-dev] shell stuff

2024-01-21 Thread Thorsten Glaser
Thomas Dickey dixit:

>> source="`echo "$source" | sed -e 's%/$%%'`/"
>>
>> You m̲u̲s̲t̲ ̲n̲o̲t̲ use double quotes both outside and inside of an
>> old-style command substitution: some shells pair them as
>> "`echo " and " | sed -e 's%/$%%'`/" instead of nesting, and
>> POSIX actively allows that.
>
>...actually the only time I've recall running into this one
>was in a bug in bash - for scripts which ran properly with
>SunOS 4 and Solaris.  SunOS 4 is out of reach now :-)

If you consider it out of reach, you can use $(…) instead of
`…` (and ${foo%bar}). People are going to want to backport,
though…

>> Can you not use source=${source%/}/ ? (Depends on where you
>> want to run that script; I know BOW’s /bin/sh fails on that
>> hard.)
>
>what is "BOW"?

https://virtuallyfun.com/2023/12/08/bsd-on-windows-things-i-wish-i-knew-existed/

Its sh choked on “if false; then : ${foo#bar}; fi” with the
most weird error messages, so merely parsing what amount of
script to skip in a nōn-executed block.

mksh now runs on BOW, so people can just use that, but it
shows up from time to time. I’ve seen some other shell, I
don’t remember which one, do that other “"`""`"” parsing,
and for a bit it was touch-and-go on that one for which
variant I’d use in mksh, as *that* one *is* permitted by
POSIX.

bye,
//mirabilos
-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.   -- Rob Pike in "Notes on Programming in C"



Re: [Lynx-dev] ANN: lynx2.9.0

2024-01-21 Thread Thorsten Glaser
Dixi quod…

>Thomas Dickey dixit:
>
>>The current version of lynx is 2.9.0

btw should that not have been 2.9.0rel.1 following the usual
versioning scheme? Otherwise it will still need to be named
that for Debian, and 2.9.1dev.* will need to be renamed into
2.9.1~dev.* so the 2.9.1 release with this new scheme works.

>When on a page with no link, the status bar stays the same as before,
>whereas, in older versions, it would change to…
>
>-- press space for more, use arrow keys to move, '?' for help, 'q' to quit.
>
>This is a regression and makes me think I’m on a link.

I’ve got a patch to fix that. Running a quick test with valgrind
shows no errors so I think it’s good. (It’s also more efficient:
passing a struct pointer instead of copying around the entire
structure’s contents.)

Please review and apply.

Thanks,
//mirabilos
PS: http://www.mirbsd.org/~tg/Debs/dists/bullseye/wtf/Pkgs/lynx/
-- 
Support mksh as /bin/sh and RoQA dash NOW!
‣ src:bash (429 (458) bugs: 0 RC, 295 (315) I, 134 (143) M, 0 F) + 209
‣ src:dash (90 (104) bugs: 0 RC, 51 (54) I, 39 (50) M, 0 F) + 62 ubu
‣ src:mksh (1 bug: 0 RC, 0 I, 1 M, 0 F)
dash has two RC bugs they just closed because they don’t care about quality…# DP: fix for 

--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -177,7 +177,7 @@ HTAtom *WWW_SOURCE = 0;
 
 static void exit_immediately_with_error_message(int state, int first_file);
 static void status_link(const char *curlink_name, int show_more, int 
show_indx);
-static void show_main_statusline(const LinkInfo curlink, int for_what);
+static void show_main_statusline(const LinkInfo *curlink, int for_what);
 static void form_noviceline(int);
 static int are_different(DocInfo *doc1, DocInfo *doc2);
 
@@ -1061,7 +1061,7 @@ static int handle_LYK_ACTIVATE(int *c,
F_TEXTLIKE(links[curdoc.link].l_form->type)) {
 
textinput_activated = TRUE;
-   show_main_statusline(links[curdoc.link], FOR_INPUT);
+   show_main_statusline([curdoc.link], FOR_INPUT);
textfields_need_activation = textfields_activation_option;
 
return 0;
@@ -6769,8 +6769,8 @@ int mainloop(void)
 * If help is not on the screen, then put a message on the screen to
 * tell the user other misc info.
 */
-   if (!show_help && curdoc.link >= 0) {
-   show_main_statusline(links[curdoc.link],
+   if (!show_help) {
+   show_main_statusline(curdoc.link >= 0 ? [curdoc.link] : NULL,
 ((curlink_is_editable &&
   textinput_activated)
  ? FOR_INPUT
@@ -7109,13 +7109,13 @@ int mainloop(void)
 
 #ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
if (textfields_need_activation) {
-   show_main_statusline(links[curdoc.link], FOR_PANEL);
+   show_main_statusline([curdoc.link], FOR_PANEL);
 #ifdef INACTIVE_INPUT_STYLE_VH
textinput_redrawn = FALSE;
 #endif
} else
 #endif
-   show_main_statusline(links[curdoc.link], FOR_INPUT);
+   show_main_statusline([curdoc.link], FOR_INPUT);
} else if (more_text) {
HTInfoMsg(MOREHELP);
} else {
@@ -7930,7 +7930,7 @@ void HTAddGotoURL(char *url)
  * When help is not on the screen, put a message on the screen to tell the user
  * other misc info.
  */
-static void show_main_statusline(const LinkInfo curlink,
+static void show_main_statusline(const LinkInfo *curlink,
 int for_what)
 {
 /*
@@ -7954,16 +7954,16 @@ static void show_main_statusline(const L
 } else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0) {
 #else
 #ifdef NORMAL_NON_FORM_LINK_STATUSLINES_FOR_ALL_USER_MODES
-} else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0 &&
-  !(curlink.type & WWW_LINK_TYPE)) {
+} else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0 && curlink &&
+  !(curlink->type & WWW_LINK_TYPE)) {
 #else
-} else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0 &&
+} else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0 && curlink &&
   !((user_mode == ADVANCED_MODE || user_mode == MINIMAL_MODE) &&
-(curlink.type & WWW_LINK_TYPE))) {
+(curlink->type & WWW_LINK_TYPE))) {
 #endif /* NORMAL_NON_FORM_LINK_STATUSLINES_FOR_ALL_USER_MODES */
 #endif /* INDICATE_FORMS_MODE_FOR_ALL_LINKS_ON_PAGE */
-   if (curlink.type == WWW_FORM_LINK_TYPE) {
-   show_formlink_statusline(curlink.l_form, for_what);
+   if (curlink->type == WWW_FORM_LINK_TYPE) {
+   show_formlink_statusline(curlink->l_form, for_what);
} else {
statusline(NORMAL_LINK_MESSAGE);
}
@@ -7980,18 +7980,18 @@ static void show_main_statusline(const L
lynx_stop_reverse();
}
 
-} else if ((user_mode == ADVANCED_MODE) && nlinks > 0) {
+} else if ((user_mode == 

[Lynx-dev] shell stuff

2024-01-21 Thread Thorsten Glaser
Hi,

while scrolling through a diff to see if I can find the cause
of a regression, I saw this (pasting only one example of it):

source="`echo "$source" | sed -e 's%/$%%'`/"

You m̲u̲s̲t̲ ̲n̲o̲t̲ use double quotes both outside and inside of an
old-style command substitution: some shells pair them as
"`echo " and " | sed -e 's%/$%%'`/" instead of nesting, and
POSIX actively allows that.

Since you never need to quote a command substitution in scalar
context (assignment RHS), this can be easily fixed:

source=`echo "$source" | sed -e 's%/$%%'`/

Can you not use source=${source%/}/ ? (Depends on where you
want to run that script; I know BOW’s /bin/sh fails on that
hard.)

And you might even want:

source=`echo "$source" | sed -e 's%/*/$%%'`/

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] 2-9-0: -assume_charset= does not override in-document charset=

2024-01-17 Thread Thorsten Glaser
Steffen Nurpmeso dixit:

>> But editing a document to get it -dump'ed out correctly, that is no
>> good.

You’d be surprised at the amounts of changes I have to do to some
pages for them to lead to correct results…

Mouse dixit:

>Well...the real offender here is whatever led to serving 8859-* data
>but mislabeling it as UTF-8.  I have mixed feelings about making it

Indeed.

>For what it's worth, for me (Canada), fetching https://www.google.com/
>gets me a document with headers including
>
>content-type: text/html; charset=ISO-8859-1
>
>and a  including
>
>

Ouch!

The specs say that the HTTP headere has precedence, unfortunately.
(I think this even means saving the document from the browser will
mean the browser has to fixup/change that meta tag; it *will* mean
accessing that document with a browser will behave differently from
downloading it with cURL or GNU wget or BSD ftp/fetch then browsing
the naïvely downloaded file.)

bye,
//mirabilos
-- 
 you introduced a merge commit│ % g rebase -i HEAD^^
 sorry, no idea and rebasing just fscked │ Segmentation
 should have cloned into a clean repo  │  fault (core dumped)
 if I rebase that now, it's really ugh │ wuahh



Re: [Lynx-dev] ANN: lynx2.9.0

2024-01-16 Thread Thorsten Glaser
Thomas Dickey dixit:

>> This is a regression and makes me think I’m on a link.
>
>I don't recall this being commented on before (a mailing-list link helps).

?!

It’s a regression against the earlier snapshot, i.e. a new bug.

>> I haven’t yet run into the issue that http-without-s connections
>> don’t work any more, did you do anything or is that related to me
>> switching to OpenSSL, from nōnGNUtls, for the build?
>
>I've only seen this with my earlier change for Debian #1033423.

Huh, fun. But I’ve run into that same issue way too often as well,
I had to gdb $(which lynx) $(pidof lynx), print close(5), ^D, to
get it to continue, and I’m glad that’s fixed.

That’s not the one I was thinking of, which was lynx immediately
returned, not getting stuck; that’s the thread around
https://lists.nongnu.org/archive/html/lynx-dev/2023-12/msg0.html
though I don’t see my other reply to that in the archives for some
reason.

bye,
//mirabilos
-- 
 you introduced a merge commit│ % g rebase -i HEAD^^
 sorry, no idea and rebasing just fscked │ Segmentation
 should have cloned into a clean repo  │  fault (core dumped)
 if I rebase that now, it's really ugh │ wuahh



Re: [Lynx-dev] ANN: lynx2.9.0

2024-01-15 Thread Thorsten Glaser
Thomas Dickey dixit:

>The current version of lynx is 2.9.0

When on a page with no link, the status bar stays the same as before,
whereas, in older versions, it would change to…

-- press space for more, use arrow keys to move, '?' for help, 'q' to quit.

This is a regression and makes me think I’m on a link.


I haven’t yet run into the issue that http-without-s connections
don’t work any more, did you do anything or is that related to me
switching to OpenSSL, from nōnGNUtls, for the build?


Thanks,
//mirabilos
-- 
“The final straw, to be honest, was probably my amazement at the volume of
petty, peevish whingeing certain of your peers are prone to dish out on
d-devel, telling each other how to talk more like a pretty princess, as though
they were performing some kind of public service.” (someone to me, privately)



Re: [Lynx-dev] Support .mhtml

2024-01-11 Thread Thorsten Glaser
Jude DaShiell dixit:

>Your .mailcap file is missing instructions to properly display the
>extension that's on that file.

I only know that MSIE could display MHTML, unfortunately no other
program supports them. I think this is a feature request to add
support for them to lynx.

The format is dead easy, it’s a collection of files as an RFC822
message. It can be handled like a virtual directory, so that upon
loading an MHTML file you get a read-only dired view of the files
and (virtual; only files are saved) subdirectories within and can
select them. The main content is normally HTML; I’m somewhat sure
it’s not easy to figure it out though, except maybe by position?,
so I’d say just show the dired view first.

bye,
//mirabilos (with a headache, so sorry if my english makes no sense)
-- 
 you introduced a merge commit│ % g rebase -i HEAD^^
 sorry, no idea and rebasing just fscked │ Segmentation
 should have cloned into a clean repo  │  fault (core dumped)
 if I rebase that now, it's really ugh │ wuahh



Re: [Lynx-dev] Extract links from html with application/ld+json script

2023-12-17 Thread Thorsten Glaser
David Woolley dixit:

> Lynx does not even have a JSON interpreter and I'm sure it doesn't
> have a JSON pretty printer.

Yeah, that’s totally out of scope. Use tools like cURL / GNU wget,
sed/tidy/xmlstarlet to extract the JSON, jq to parse it, instead.

bye,
//mirabilos
-- 
Support mksh as /bin/sh and RoQA dash NOW!
‣ src:bash (429 (458) bugs: 0 RC, 295 (315) I, 134 (143) M, 0 F) + 209
‣ src:dash (90 (104) bugs: 0 RC, 51 (54) I, 39 (50) M, 0 F) + 62 ubu
‣ src:mksh (1 bug: 0 RC, 0 I, 1 M, 0 F)
dash has two RC bugs they just closed because they don’t care about quality…



Re: [Lynx-dev] 2.9.0dev.12m regression (title bar)

2023-12-02 Thread Thorsten Glaser
Thomas Dickey dixit:

>On Sat, Dec 02, 2023 at 09:13:28AM +0000, Thorsten Glaser wrote:
>> Another regression I noticed is the page count is missing
>> from the title bar:
>
>a url would help to reproduce this

https://archiveofourown.org/works/51498937/chapters/130771180
but when I start it in a new lynx instance, I do have the pages,
so apparently something happened *during* the session to break
it‽

Oh, this is interesting:

URL: https://qa.debian.org/excuses.php

New/fresh lynx instance:

Search testing migration excuses or experimental manual migration 
pseudo-excu... (p1 of 2)│
   [1]Debian
  │

  │
   [2]QA
  │
[…]

Longer-running lynx instance:

Search testing migration excuses or experimental manual migration 
pseudo-excuses -- Debian│
 QualiDebianurance... (p1 of 2) 
  │

  │
   [3]QA
  │
[…]

The number difference is due to me having pressed * in the longer-running
one; if I do it in the fresh one, I get:

Search testing migration excuses or experimental manual migration 
pseudo-excu... (p1 of 2)│
   [1]Debian-[2][openlogo-50.png]   
  │

  │
   [3]QA
  │
[…]

bye,
//mirabilos
-- 
15:41⎜ Somebody write a testsuite for helloworld :-)



[Lynx-dev] 2.9.0dev.12m regression (title bar)

2023-12-02 Thread Thorsten Glaser
Another regression I noticed is the page count is missing
from the title bar:

old:
The serpents' den - Chapter 3 - jammerific - Harry Potter - J. K. Rowling [A... 
(p5 of 24)│

new:
The serpents' den - Chapter 3 - jammerific - Harry Potter - J. K. Rowling 
[Archive of Our │

(window border illustrated)

The cropping has gone missing ☹ and I need the pages (current/total)
for in-page bookmarking of longer chapters.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] 2.9.0dev.12m regression (http redir)

2023-12-01 Thread Thorsten Glaser
Here’s more:

$ lynx http://archiveofourown.org/works/51973378

>>Alert!: Unexpected network read error; connection aborted.

With both links2 and Firefox, I get a huge delay followed
by a redirect to https://… whereas lynx *consistently* throws
the network error (https works ofc).

A quick nc -v test shows that all three IP addresses and all
three Legacy IP addresses behind that hostname do listen on
port 80…

Curious and curiouser,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent



[Lynx-dev] 2.9.0dev.12m regression (^S)

2023-11-29 Thread Thorsten Glaser
Hi,

another regression I noticed: ^S (XOFF) no longer works.
I use this to temporarily stop messages, so I can copy them
to PRIMARY (or CLIPBOARD) using the mouse, most often on the
targets of redirections.

This probably has to do something with this changelog entry…

* modify curses initialization to permit ^S built-in keymap to work without
  needing external stty changes -TD

… which i̲s̲ something that was noted before as not working on
this mailing list, but even when adding…

KEYMAP:^S:UNMAPPED

… to /etc/lynx/local.cfg (in a Debian setup) it does not work.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



[Lynx-dev] 2.9.0dev.12m regression (http redir)

2023-11-29 Thread Thorsten Glaser
Hi,

I do notice a regression in the dev snapshot: whenever I have, say,
a Google search result page where a link goes first to their
redirector and then to an http page, I get:

Alert!: Unexpected network read error; connection aborted.

Navigating to the page directly works, and a second attempt at
using the link sometimes(?) works.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] 2.9.0dev.12m regression (http redir)

2023-11-29 Thread Thorsten Glaser
Dixi quod…

>a Google search result page where a link goes first to their
>redirector and then to an http page, I get:
>
>Alert!: Unexpected network read error; connection aborted.

OK, that may not be the cause. I just did a…

$ lynx http://www.google.com/search?[…]

… and got the same error; a second attempt worked.

So far I’ve only seen this for http sites though, but there,
to an amount that made me think a lot of sites and/or CDNs
disabled http or broke them with lynx.

bye,
//mirabilos
-- 
/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against
 ╳  HTML eMail! Also,
╱ ╲ header encryption!



Re: [Lynx-dev] lynx and webmail interfaces?

2023-11-22 Thread Thorsten Glaser
Karen Lewellen dixit:

> my current access to both pine and alpine are tied to shellworld entirely, or
> via the dreamhost shell service provided to my office.

OK. If you can use these for eMail, you’ll be good then.

> The question seems to be if it can be configured to access gmail,
> including passing any security related factors?

Googlemail is exceptionally bad at playing well. I have to
use a Googlemail account for work and while I eventually
managed to sending with it with alpine (it needs alpine as
alpine has special code to work with Googlemail), I have
set it up to forward to an IMAP server I run myself, as its
IMAP implementation is so bad it’s not even funny any more.

(In theory you should be able to access Googlemail via IMAP;
in practice, you’ll hate the bugs.)

I can only really really urge you to seek a proper eMail
provider that supports standard SMTP and IMAP.

> if alpine can do this,  can not some of the associated
> tools be incorporated into pine?

Unfortunately, pine is not only “end of life” but also has a
problematic licence, which is the thing that directly led to
alpine (short for “apache-licenced pine”) being a rewrite.

So either you’ve got to use alpine with Googlemail and suffer
from its shortcomings, or you can use either pine or alpine
with good as any standard eMail provider that supports SMTP
and IMAP.

(A very small number of years ago, this would have ended my
message; however, nowadays, there is another problem. If you
use an old version of pine (especially for DOS) it will have
been built with an old SSL library that cannot do TLSv1.2 or
TLSv1.3, and more and more endpoints unfortunately require
that. Running pine/alpine on an up-to-date BSD or GNU/Linux
shellserver would work, or having a kind of “SSL proxy” on a
machine that supports both the old and new protocols (which
is something I set up for myself with a pair of stunnel4
services), or having an SMTP and IMAP server on a box that
supports the old TLSv1.0 protocol and ciphersuites, which
often can be configured even on systems like Debian 11 that
do not accept these out of the box any more.)

bye,
//mirabilos
-- 
> emacs als auch vi zum Kotzen finde (joe rules) und pine für den einzig
> bedienbaren textmode-mailclient halte (und ich hab sie alle ausprobiert). ;)
Hallo, ich bin der Holger ("Hallo Holger!"), und ich bin ebenfalls
... pine-User, und das auch noch gewohnheitsmäßig ("Oooohhh").  [aus dasr]



Re: [Lynx-dev] lynx and webmail interfaces?

2023-11-21 Thread Thorsten Glaser
Karen Lewellen dixit:

> There is a thread over at DOS ain't dead about providers who  still have web
> interfaces, using roundcube or squirrel mail, someone even spoke of fastmail.
> Anyone know of  either an email service that incorporates these lower graphics

Is using pine a possibility? (I think there was a DOS port of that.)
That sounds much less overhead and much more reliability than a web
interface, and in addition, your interface to the mail system will
continue to just be the same pine you’re using (or with minimal changes
over years in the case of alpine).

If you have access to a pine/alpine at your shellserver and find it
usable for yourself, you can set it up to access multiple eMail
providers (as long as they support IMAP) as well.

lynx-usable webmail is so niche that I wouldn’t invest too much
effort into finding anything there (plus even things that are lynx-
accessible now need not continue to do so, I suffered from a bank
stopping that for online banking).

Good luck,
//mirabilos
-- 
> Wish I had pine to hand :-( I'll give lynx a try, thanks.

Michael Schmitz on nntp://news.gmane.org/gmane.linux.debian.ports.68k
a.k.a. {news.gmane.org/nntp}#news.gmane.linux.debian.ports.68k in pine



Re: [Lynx-dev] extremely long a/@href

2023-11-12 Thread Thorsten Glaser
Thomas Dickey dixit:

>This is a "development" list.  If you want to test development changes,
>they are in my git snapshots.

I hadn’t known there was a fix already.

I’ve built dev.12m and tested it and it fixes my problem.

Thanks,
//mirabilos
-- 
 you introduced a merge commit│ % g rebase -i HEAD^^
 sorry, no idea and rebasing just fscked │ Segmentation
 should have cloned into a clean repo  │  fault (core dumped)
 if I rebase that now, it's really ugh │ wuahh



[Lynx-dev] extremely long a/@href

2023-11-11 Thread Thorsten Glaser
Hi,

the search functionality on otwarchive sites like archiveofourown.org
or www.squidgeworld.org produces extremely long links, easily 2.5K or
longer. (These are produced by submitting a form.)

The page from that now contains 2.5K-long relative links:


Re: [Lynx-dev] Looking for a keymap entry to run a script

2023-09-13 Thread Thorsten Glaser
Dan Dunfee dixit:

>Could someone provide an example keymap entry to run a shell script from 
>within lynx?

Why not just press ^Z to suspend lynx temporarily, or open a
new GNU screen / tmux tab, terminal, ssh session, etc. instead?
Just running a shell script is nothing that needs lynx to do.

bye,
//mirabilos
-- 
„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)



[Lynx-dev] mis-handling of combining characters

2023-08-10 Thread Thorsten Glaser
Hi,

in the attached excerpt, stripped down to almost the minimum to
experience it, the combining characters in the “Zalgo” part seem
to be considered as adding to the line width, therefore breaking
too early:

   “Ȩ̶̛ņ̶̛Ơ̶̙U̶̡
   g̵̢H̷̳” Shikamaru entoned with fury. His were
   black pools that seemed to be dripping, melting.


   “ I am exacting my
   V̵̡e̷̢ņ̷̤G̴̨
   ̺̠ȩ̴̣Ą̶̱N̶̛
   ̀̓C̴̢E̴̡” Shikamaru, no, the
   shadows spoke.

(this time in an 80c-wide xterm at Ian’s special request)

I would expect (first line possibly justified with extra spaces):

   “Ȩ̶̛ņ̶̛Ơ̶̙U̶̡g̵̢H̷̳” Shikamaru entoned with fury. His were black pools that
   seemed to be dripping, melting.

   “ I am exacting my V̵̡e̷̢ņ̷̤G̴̨ȩ̴̣Ą̶̱N̶̛C̴̢E̴̡” Shikamaru, no, the shadows 
spoke.

I stripped all the charset identifiers when I dropped /html/head
so make sure it assumes UTF-8 when testing with the attached file.

bye,
//mirabilos
-- 
Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend.   -- Andreas Bogk über boehm-gc in d.a.s.r
  

[…]

 

  
“Ȩ̶̛͇͉̤̯͎̻̠̭̹̳̟̜̰̉͑́́͋͜͝ņ̶̛͓̤͓̼̺̣̻́̔́̌̊̑͗̈̄̋̎̍̏Ơ̶̙̏̋͌̅̈͐̕U̶̡̨̻͖̦͔̝͚͇͒ͅͅg̵̢͖̤̝̼͇̦̥̦̏̂́͊̏̉̓͑͋̊͒̕H̷̳͖̔͌̐ͅ”
 Shikamaru entoned with fury. His were black pools that seemed to be dripping, 
melting. 

 

  “ I am exacting my 
V̵̡̡̗̣̻̑̍͐̍͋̈́̍̕͝e̷̢̡̢̨̺͚͔̰͈͎̰̮̮͆̃͌͜͠ͅņ̷̤͚̰̲̘̯̬̭̔̉̽̾͒͌̓̾̌̆͆͊̌́̕G̴̨̡̨̘̤̠̺̠̰̰̭̊̽̌̊͆͛̈́̓̔̈̏̊̉̈́͆ȩ̴̣͌̀̓̈́̚͜͠Ą̶̱̮̝̜̱̱͖̮̺̝̌̾̔͌͋̑̀͛͒̀̾͂͂̚N̶̛̙̮̺̹̮̈̊̃̅̀̓͒́C̴̢̰̗̟̠̳͚̮̐͐́̃̏̕͜E̴̡̢̨̗̫͓͚̣̯͎͔̗̊̊̀̽̽͊͐͗̓͠”
 Shikamaru, no, the shadows spoke. 

 

[…]

  



Re: [Lynx-dev] non-breaking space breaks justification

2023-08-10 Thread Thorsten Glaser
David Woolley dixit:

>> I don’t really; justification is what lynx does and indent is
>> what the fanfiction author did.
>
> That was my initial thought, but then I read more carefully, I saw:
>
>> So the three modes of U+00A0 handling are:
>>
>> • do not indent lines with U+00A0 on them (current behaviour)
>> • do indent lines with U+00A0 on them (fixes first kind of doc)
>> • ignore nōn-breaking property of U+00A0 for indentation
>
> All then "indent"s in this should be "justify"s, with suitable corresponding
> nouns.

Oh, sorry, you’re right. I blame brainmelt from illness.

bye,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent



Re: [Lynx-dev] non-breaking space breaks justification

2023-08-10 Thread Thorsten Glaser
Ian Collier dixit:

>What's awful about that is you've formatted it for more than 80 columns...

That’s because I read my fanfiction in a 90×35 uxterm (minus
one line for GNU screen hardstatus), which is the widest that
is readable for me without losing the lines upon going to the
next one.

What’s r̲e̲a̲l̲l̲y̲ awful is that you don’t break your lines at 72c
for eMail.

>If you use "lynx -justify" (why would anyone use that?) then it seems there

Of course I use justification. It makes text easier to read
and nicer to look at.

>of the right length, and (2) add extra spaces to justify the right margin.
>The first of these things happens the same, regardless; the second appears
>to be omitted for any resulting line that contains U+00A0.
>
>I'd say that it just shouldn't be omitted

That’s one of the two modes I was proposing.

>I can't think of any reason why that would be useful.

I was thinking about this for a while. I don’t want existing
users’ stuff to break, and since we need *another* mode anyway
why not make it a three-way toggle. (We can then argue about
the default, whether it should be traditional or one of the
new ones. I’d go for making the one that doesn’t omit the right
margin justification for those lines the default, personally.)

>  (I'm assuming here that anything within 
>tags is not justified

Yes, of course.

>, and if you write ascii art without putting it
>within  tags then you deserve what you get.)

That’s certainly a way to look at things, but the same goes for
those idiots who use U+00A0 for extra inter-word spacing. The
problem here is that the people who *use* lynx are usually not
those who write the pages.

>The rest of your message would have been clearer if you hadn't
>confused "justify" with "indent".

I don’t really; justification is what lynx does and indent is
what the fanfiction author did.

>  However, making allowances for
>people who randomly (and perhaps mistakenly) add U+00A0 to add extra
>space between words isn't really Lynx's job.  The extra space should
>stay as the author intended (or didn't intend, whatever).

That’s, again, certainly a way to look at this. However, lynx users
suffer enough already, and this is a cheap way to make their lifes
easier. This is even an a11y problem, and one could return with an
argument that the whole *point* of webbrowsers is to work around bad
webpages. (I have a couple of LSS additions for this, too.)

bye,
//mirabilos, who’s down with a cold and not up to patching right now
-- 
Yes, I hate users and I want them to suffer.
-- Marco d'Itri on gmane.linux.debian.devel.general



[Lynx-dev] nōn-breaking space breaks justification

2023-08-09 Thread Thorsten Glaser
Some fanfiction is written like this:

[10*U+00A0][the actual long paragraph text]

This is physical formatting done by the author to achieve some kind
of first-line indentation for the paragraphs, and it is annoying.

This renders okay-ish in lynx, but the first p line is thus not
justified, leading to awful reading like:

[…]
   The manic leader was disturbed from his thoughts as he heard
   footsteps go past his door. That must be Tabby. The man looked down to the 
corner
   of  his  computer  screen to see the clock display. Ah, it was breakfast 
time for
[…]

I’ve looked a bit at the source code, and I understand that there
is a deliberate decision to not justify if the line contains U+00A0
(otherwise I’d say to just do it because if people use it to align
e.g. ASCII art, it’d only work in the presence of  anyway).

Therefore I believe we need a run-time togglable (ideally per key,
like the one toggling between comment parsing modes) configuration
to switch between different modes of handling U+00A0.

Unfortunately, I believe that we need THREE modes (a cycle toggle),
because I’ve also seen fanfiction written (or, more likely, exported
from Office software) in a way that uses not one (or more) whitespace
between words but a combination of whitespace and U+00A0 for extra
spacing the author thought prudent, or perhaps not so:

Word[U+00A0][space]next[U+00A0][space]word…

So the three modes of U+00A0 handling are:

• do not indent lines with U+00A0 on them (current behaviour)
• do indent lines with U+00A0 on them (fixes first kind of doc)
• ignore nōn-breaking property of U+00A0 for indentation

The third one would work like this: U+00A0 between characters
that are not whitespace will still make lynx refrain to wrap
the line at that place, but a sequence of one or more U+00A0
or whitespace characters is treated as single whitespace (like
multiple  are collapsed into one, too), so…

Word[U+00A0][space]next[space][U+00A0][U+00A0][space]word…

… renders the same as Word next word… but in…

(something long) 2.5[U+00A0]kg garlic (…)

… the “2.5” and “kg” are not split (although multiple U+00A0
are still collapsed into one).

I think offering these three as runtime-changable configuration
makes the most amount of documents render well.

Thanks in advance,
//mirabilos
-- 
15:39⎜«mika:#grml» mira|AO: "mit XFree86® wär’ das nicht passiert" - muhaha
15:48⎜ also warum machen die xorg Jungs eigentlich alles
kaputt? :)15:49⎜ thkoehler: weil sie als Kinder nie den
gebauten Turm selber umschmeissen durften?  -- ~/.Xmodmap wonders…



Re: [Lynx-dev] lynx misrenders many *IN*valid xhtml5 pages on my site

2023-06-15 Thread Thorsten Glaser
Lennart Jablonka dixit:

> I see we are in agreement that
> 
> is not /invalid/ due to omission of space before /> or due to self-closing

It’s not a valid webpage. It’s an XML document, but not a webpage.

> I read that as: For the recipient of the XML document,  and
>  are equivalent; the author needs to decide carefully if she is not to

SHOULD is generally read as: do it unless you have _very_ good reasons
not to, i.e. an active decision.

bye,
//mirabilos
-- 
> Wish I had pine to hand :-( I'll give lynx a try, thanks.

Michael Schmitz on nntp://news.gmane.org/gmane.linux.debian.ports.68k
a.k.a. {news.gmane.org/nntp}#news.gmane.linux.debian.ports.68k in pine



Re: [Lynx-dev] lynx misrenders many *IN*valid xhtml5 pages on my site

2023-06-15 Thread Thorsten Glaser
Lennart Jablonka dixit:

> Handling XHTML approximately by treating it as HTML-syntax HTML may be useful
> in stead of refusing to handle XHTML, but that is not implementing XHTML.

Yes, but the onus is on the *server* to provide the data in a format
the client can handle because native XHTML-as-XML support is not
mandatory for webbrowsers.

>>  Empty-element tags may be used for any element which has no content,
>>  whether or not it is declared using the keyword EMPTY. [397]For
>>  interoperability, the empty-element tag SHOULD be used, and SHOULD only
>>  be used, for elements which are declared EMPTY.
>
> I.e.,  and  are equivalent.  There is a
> recommendation on what not to do.

This is wrong. Please read up the definition of “SHOULD” in
RFC what’shisname.

bye,
//mirabilos
-- 
  “Having a smoking section in a restaurant is like having
  a peeing section in a swimming pool.”
-- Edward Burr



Re: [Lynx-dev] lynx misrenders many *IN*valid xhtml5 pages on my site

2023-06-15 Thread Thorsten Glaser
Lennart Jablonka dixit:

>> Yes, but then it MUST send HTML-compatible things or it’s not
>> an XHTML page. As simple as that. (I also serve my XHTML as
>> text/html always and just write it in compatible mode.)
>
> I don’t buy this.  What is and isn’t XHTML isn’t dependent on what the
> client declares it can handle.

Oh, but XHTML ≠ XHTML.

There’s HTML-compatible XHTML, which you can serve as text/html,
and there’s nōn-HTML-compatible XHTML, which you must serve as
application/xhtml+xml, and if you expect to serve websites you
may serve the latter only if explicitly requested by the browser
because the browser needs to be able to handle this, and e.g.
NCSA Mosaic won’t know how to do that.

> Please help me understand why you think that,
> with a citation perhaps.

It’s split over the XHTML and HTTP standard and the DTDs.

Even pure XML documents that…


←←← Extensible Markup Language (XML) 1.0 (Fifth Edition) (p34 of 94)

Tags for Empty Elements

   [44]EmptyElemTag::='<' [392]Name ([393]S [394]Attribute)*
   [395]S? '/>' [396][WFC: Unique Att Spec]

   Empty-element tags may be used for any element which has no content,
   whether or not it is declared using the keyword EMPTY. [397]For
   interoperability, the empty-element tag SHOULD be used, and SHOULD only
   be used, for elements which are declared EMPTY.


In the end effect, though, who cares about standards, what you need to
care about is browser compatibility. That being said the standards do
explicitly make room for browser compatibility as outlined in the above
snippet and referenced standards.

OK, here’s a snippet from the XHTML standard for this:


XHTML 1.0: The Extensible HyperText Markup Language (Second Editi... (p22 of 39)
5. Compatibility Issues

   This section is normative.

   Although  there  is  no  requirement  for  XHTML  1.0  documents  to be
   compatible  with  existing  user  agents,  in  practice this is easy to
   accomplish.  Guidelines  for creating compatible documents can be found
   in [132]Appendix C.

5.1. Internet Media Type

   XHTML  Documents which follow the guidelines set forth in [133]Appendix
   C,  "HTML  Compatibility  Guidelines"  may be labeled with the Internet
   Media Type "text/html" [[134]RFC2854], as they are compatible with most
   HTML  browsers.  Those  documents, and any other document conforming to
   this  specification,  may  also be labeled with the Internet Media Type
   "application/xhtml+xml"  as  defined  in  [[135]RFC3236].  For  further


This normatively underlines what I wrote above. Happy?

Now excuse me, I’m kinda busy with $dayjob and in no way obligated to
do your research for you.

bye,
//mirabilos
-- 
 exceptions: a truly awful implementation of quite a nice idea.
 just about the worst way you could do something like that, afaic.
 it's like anti-design.   that too… may I quote you on that?
 sure, tho i doubt anyone will listen ;)



Re: [Lynx-dev] lynx misrenders many *IN*valid xhtml5 pages on my site

2023-06-12 Thread Thorsten Glaser
Hi again!

Lennart, you nerdsniped me.

Dixi quod…
>Lennart Jablonka dixit:
>>> I’m not sure whether it may then also self-close all tags but would
>>> assume so (except I know tech is… tricky).
>>
>> As in an XML document,  and  are entirely equivalent, 
>> yes,
>> the server may then “self-close” all empty elements.
>
>That’s what made me say I’d assume so, but I know tech, which is
>why I hesitate.

I found hints towards still requiring the empty not-self-closed
tags even in XML but I forgot where during the subsequent hacking
which took m̲u̲c̲h̲ longer than expected.

But here is that hacking’s result. Find attached an LD_PRELOAD library
that makes “xmlstarlet fo”, without -o (because it then uses yet other
libxml2 function calls), output XHTML ☻

Prepare:

$ sudo apt-get install libxml2-dev

Compile and link:

$ gcc -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -fstack-protector-strong \
  -Wformat -Werror=format-security -Wall -Wextra \
  $(xml2-config --cflags) -DPIC -fPIC -shared -o libforceXHTML.so \
  forceXHTML.c

Use:

$ LD_PRELOAD=$PWD/libforceXHTML.so xmlstarlet fo [-n] [-e encoding] filename|-

C̲a̲v̲e̲a̲t̲:̲ without -n it breaks up “old browser-safe” framing for CSS and 
JS:

 
 

This is because in XML, the  or  is a
comment node inside the style/script node (as is correct)
and libxml2’s “XHTML” output code writes a newline after
each node if indenting. xhtmlNodeListDumpOutput() is
static, so not up for LD_PRELOAD hacks. But the OP was
not formatting/indenting their XML anyway so this strikes
me as a suitable postprocessing step. I did verify that it
properly adds spaces and not-self-closes elements for one
static XHTML file.

This was initially very mildly based on libxml2 itself,
whose public API sucks badly enough I had to redraft it
from the beginning. (This the reason of taking so long.)
I publish this under Ⓕ CC0.

Enjoy,
//mirabilos
PS: Shlomi Fish, when replying to me, please send to the list
as your provider fails badly enough at SMTP it cannot send
eMails directly to me :/
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh/* sudo apt-get install libxml2-dev */
/* gcc -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -fstack-protector-strong -Wformat 
-Werror=format-security -Wall -Wextra $(xml2-config --cflags) -DPIC -fPIC 
-shared -o libforceXHTML.so forceXHTML.c */
/* LD_PRELOAD=$PWD/libforceXHTML.so xmlstarlet fo [-n] [-e encoding] filename|- 
*/
/* do not use the xmlstarlet fo -o option! */

#include 
#include 
#include 
#include 

static int
rpl_xmlSaveFormatFileEnc(const char *filename, xmlDocPtr cur,
const char *encoding)
{
xmlSaveCtxtPtr ctx;
int i;

if (!encoding)
encoding = (const void *)cur->encoding;

i = XML_SAVE_XHTML;
if (xmlIndentTreeOutput)
i |= XML_SAVE_FORMAT;

ctx = xmlSaveToFilename(filename, encoding, i);
if (!ctx)
return (-1);
i = xmlSaveDoc(ctx, cur);
/* fucking libxml2 API gives us no way to check close() errors */
if (i >= 0)
i = xmlSaveClose(ctx);
else
xmlSaveClose(ctx);
fprintf(stderr, "\nI: forceXHTML save %s\n",
i < 0 ? "failed" : "ok");
return (i);
}

int
xmlSaveFormatFileEnc(const char *filename, xmlDocPtr cur,
const char *encoding, int format __attribute__((__unused__)))
{
return (rpl_xmlSaveFormatFileEnc(filename, cur, encoding));
}

int
xmlSaveFormatFile(const char *filename, xmlDocPtr cur,
int format __attribute__((__unused__)))
{
return (rpl_xmlSaveFormatFileEnc(filename, cur, NULL));
}


Re: [Lynx-dev] lynx misrenders many *IN*valid xhtml5 pages on my site

2023-06-12 Thread Thorsten Glaser
Lennart Jablonka dixit:

> as is the case for lynx

Nope: HTTP_ACCEPT='text/html, text/plain, text/sgml, text/css, */*;q=0.01'

> Also, I’m under the impression that content
> negotiation à la Accept is entirely optional—the server is free to ignore

Yes, but then it MUST send HTML-compatible things or it’s not
an XHTML page. As simple as that. (I also serve my XHTML as
text/html always and just write it in compatible mode.)

>> I’m not sure whether it may then also self-close all tags but would
>> assume so (except I know tech is… tricky).
>
> As in an XML document,  and  are entirely equivalent, yes,
> the server may then “self-close” all empty elements.

That’s what made me say I’d assume so, but I know tech, which is
why I hesitate.

> It might be smart to do, but is not a requirement, is it?  A server sending an
> XHTML document as application/xhtml+xml, not in any way stating that it is
> valid HTML syntax, need not restrict the XML syntax, does it?

Such a server would not serve a standard-conformant XHTML webpage.

>> tl;dr it’s a mess…
>
> It for sure is.

aye,
//mirabilos
-- 
/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against
 ╳  HTML eMail! Also,
╱ ╲ header encryption!



Re: [Lynx-dev] lynx misrenders many *IN*valid xhtml5 pages on my site

2023-06-12 Thread Thorsten Glaser
Lennart Jablonka dixit:

> And here I thought that all of XHTML 1.0, XHTML 1.1, HTML5 XML syntax, and
> WHATWG HTML XML syntax defer parsing to the XML processor.

As usual, it depends.

Iff the browser requests XHTML served as XML, that is, if the browser
sends an HTTP Accept header that contains application/xhtml+xml (and
probably contains that before text/html if both are given), then the
server may send the document as XML, skipping the space before “/>”.
I’m not sure whether it may then also self-close all tags but would
assume so (except I know tech is… tricky).

If however the browser does not send that header, the document must be
served in compatibility mode, in particular the self-closing tags thing
(if you self-close , even Firefox croaks and dies), but also
a compatibility space before “/>” for best effect.

(And yes, XHTML, despite later changes to the HTTP docs, may be served
as text/html, but only under these caveats; the XHTML spec supports
this.)

tl;dr it’s a mess…

bye,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent



Re: [Lynx-dev] lynx misrenders many *IN*valid xhtml5 pages on my site

2023-06-12 Thread Thorsten Glaser
Shlomi Fish dixit:

>> > lynx 
>> > https://www.shlomifish.org/humour/Summerschool-at-the-NSA/ongoing-text.html
>> > still misrenders.

OK, I had a look at this now.

Your file is well-formed XML, but neither valid for webbrowsers
(due to the omission of the space before “/>” self-closing tags)
nor actually valid for any XHTML DTD because you self-close tags
that MUST NOT be self-closed.

A simple change of…



… to…



… fixes the latter error and makes lynx display your file.

Please fix your website generator to make your pages actually valid:



All other tags MUST NOT be self-closed.

bye,
//mirabilos (who also uses XHTML and has, unfortunately, quite
some experience with XML, XSLT, DTD etc. and ran into this
particular problem once as well)
-- 
Yay for having to rewrite other people's Bash scripts because bash
suddenly stopped supporting the bash extensions they make use of
-- Tonnerre Lombard in #nosec



Re: [Lynx-dev] Bug report - Flickering when resizing the terminal window lynx is running in

2023-05-26 Thread Thorsten Glaser
Thomas Dickey dixit:

>> I remember sending you? the list? a typescript of this happening
>> in xterm.
>
>iirc, that used OpenBSD's hack which disables ncurses's SIGWINCH handler.

Nope, I’m on a Debian stable system at the moment and can easily
reproduce it.

bye,
//mirabilos
-- 
If Harry Potter gets a splitting headache in his scar
when he’s near Tom Riddle (aka Voldemort),
does Tom get pain in the arse when Harry is near him?
-- me, wondering why it’s not Jerry Potter………



Re: [Lynx-dev] Bug report - Flickering when resizing the terminal window lynx is running in

2023-05-25 Thread Thorsten Glaser
Thomas Dickey dixit:

>I don't see it with xterm, at any rate.

I remember sending you? the list? a typescript of this happening
in xterm.

bye,
//mirabilos
-- 
15:41⎜ Somebody write a testsuite for helloworld :-)



Re: [Lynx-dev] Bug report - Flickering when resizing the terminal window lynx is running in

2023-05-25 Thread Thorsten Glaser
hacksenw...@posteo.de dixit:

>Thank you for lynx, I love it! 

We all do!

>When lynx is already running in that terminal and I resize the window,

That also happens in xterm on Debian; I reported that some
time ago and someone else too. No fix so far.

bye,
//mirabilos
-- 
„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)



Re: [Lynx-dev] Ot: how email size is established?

2023-05-08 Thread Thorsten Glaser
Hi Karen,

> I am sending a file that is slightly larger than 7 meg.
> However I am getting a users.shellworld.net error claiming that  the file
> exceeds the slightly above 10 meg size restriction.

this is rather offtopic, but, yes, files sent by email are
enlarged by four thirds because of the way they have to be
encoded (this is also true for e.g. messages in mostly Asian
scripts).

So you can say 7.5 MiB * 4/3 = 10 MiB, plus the message itself
and some metainformation, which is a couple of KiB, can already
be too much.

bye,
//mirabilos
-- 
21:49⎜ I have a question guys,
 ⎜Can I use my PC as SMTP server, I use Windows 7 .
 ⎜Already googled and Installed IIS
 ⎜but Still I can't send E-mail



Re: [Lynx-dev] view full url instead of short in webpage

2023-04-19 Thread Thorsten Glaser
jindam vani via Lynx-dev dixit:

>How?

Chage user mode to advanced, or use the ] key or the l key.

Or probably more different ways… these three are the ones I have at
the top of my head.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] lynx on xfce terminal freezes during "making https connection to..."

2023-03-17 Thread Thorsten Glaser
jindam, vani via Lynx-dev dixit:

> the issue: xfce terminal freezes during "making https connection to..." using

That’s independent of the terminal and the website in question.
It occasionally happens for some sites; for most, it works on
the second try.

Unfortunately, ‘z’ and ^G don’t work to interrupt this, but this does:

$ gdb /usr/bin/lynx «pid-of-lynx»
(gdb) print (int)close(3)
(gdb) ^D
yes detach it

bye,
//mirabilos
-- 
Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend.   -- Andreas Bogk über boehm-gc in d.a.s.r



Re: [Lynx-dev] Images in Lynx

2023-02-20 Thread Thorsten Glaser
David Woolley dixit:
> On 20/02/2023 16:54, aalin...@riseup.net wrote:
>> I am curious as to why some images on web pages have links one can
>> click on to view the image (I use nsxiv) while others simply say
>> "Image" and offer a description but no link to activate the image.
>
> I think that is simply because some people/web sites code images as
> links to the full size image, when the image is editorial, rather than
> ornamental/branding.

Exactly. You can render the images themselves as links by pressing
the ‘*’ (astersk) key. These that were links already will now be
*TWO* links: the one you had before (target of a href) and one to
the img itself, probably a thumbnail.

bye,
//mirabilos
-- 
  "Using Lynx is like wearing a really good pair of shades: cuts out
   the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
 -- Henry Nelson, March 1999



Re: [Lynx-dev] A VCS for lynx

2023-02-17 Thread Thorsten Glaser
Axel Beckert dixit:

>Hi,
>
>On Fri, Feb 17, 2023 at 02:38:24PM +, Tom Schwindl wrote:

>> But if you guys prefer CVS, that'd be fine for me too, as long as it's not 
>> SVN ;).

Word!

>> I wonder if there is interest in a VCS for doing development work.
>
>AFAIK Lynx is actually developed using a VCS, namely CVS.

>shows that these CVS tags are indeed uptodate.

These are called “RCS IDs”, but TTBOMK lynx is developed in PRCS.

bye,
//mirabilos (de-facto upstream of cvs)
-- 
13:22⎜«neurodamage» mira, what's up man? I have a CVS question for you in #cvs
13:22⎜«neurodamage» since you're so good w. it │ «neurodamage:#cvs» i love you
13:28⎜«neurodamage:#cvs» you're a handy guy to have around for systems stuff ☺
16:06⎜ Thank god I found you =)   20:03│«bioe007:#cvs» mira2k: ty
17:14⎜ Thanks big help you are :-)mira|nwt: ty again
18:35⎜«alturiak:#cvs» mirabilos: aw, nice. thanks :o
18:36⎜«ThunderChicken:#cvs» mirabilos FTW!  23:03⎜«mithraic:#cvs» aaah. thanks
18:41⎜«alturiak:#cvs» phew. thanks a bunch, guys. you just made my weekend :-)
18:10⎜«sumit:#cvs» mirabilos: oh ok.. thanks for that
21:57⎜ yeah, I really appreciate help
18:50⎜«grndlvl:#cvs» thankyou18:50⎜«grndlvl:#cvs» worked perfectly
20:50⎜ i see. mirabilos, thnks for your support
00:36⎜«halirutan:#cvs» ok, the obvious way:-) thx
18:44⎜«arcfide:#cvs» mirabilos, I am running OpenBSD. 18:59⎜«arcfide:#cvs»
Hrm, yes, I see what you mean. 19:01⎜«arcfide:#cvs» Yeah, thanks for the help.
21:33⎜«CardinalFang:#cvs» Ugh.  Okay.  Sorry for the dumb question.  Thank you
21:34⎜ mirabilos: whoa that's sweet
21:52⎜«garrett__:#cvs» much appreciated  «garrett__:#cvs» thanks for your time
23:39⎜ this worked, thank you very much 16:26⎜ ok
thx, i'll try that 20:00⎜«stableable:#cvs» Thank you.20:50⎜«s833:#cvs»
mirabilos: thanks a lot.19:34⎜ Thanks for confirming :)
20:08⎜ ...works like a charm.. thanks mirabilos



Re: [Lynx-dev] urls longer than 1024 characters

2023-01-25 Thread Thorsten Glaser
Travis Siegel dixit:

> but all of that is kind of moot, considering Apache only allows lengths of
> 4,000 characters.

Apache used to be 1024.

> I'd guess allowing lynx to handle 4K characters would solve most issues with

Which is the maximum length lynx handles, then?

bye,
//mirabilos
-- 
> emacs als auch vi zum Kotzen finde (joe rules) und pine für den einzig
> bedienbaren textmode-mailclient halte (und ich hab sie alle ausprobiert). ;)
Hallo, ich bin der Holger ("Hallo Holger!"), und ich bin ebenfalls
... pine-User, und das auch noch gewohnheitsmäßig ("Oooohhh").  [aus dasr]



Re: [Lynx-dev] urls longer than 1024 characters

2023-01-25 Thread Thorsten Glaser
Jude DaShiell dixit:

>url is longer than 1024 characters offer to send the long url to an url
>shortening service

That’s not the issue here… an URL shortening service would also just
redirect the browser to the long URL, therefore not eliminating the
problem.

bye,
//mirabilos
-- 
15:41⎜ Somebody write a testsuite for helloworld :-)



Re: [Lynx-dev] a solution for this problem?

2023-01-21 Thread Thorsten Glaser
Karen Lewellen dixit:

> Only way I could share it is as an attachment, its something like three pages
> of characters.

I guess that’s just too long then. Links (GET requests specifically)
aren’t required to work if they’re above 1024 characters long.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] a solution for this problem?

2023-01-15 Thread Thorsten Glaser
Karen Lewellen dixit:

> In fact, the  error, badly formed address,

Could be a data: URL, but, of course, without you sharing the
link in question, we cannot know.

bye,
//mirabilos
-- 
> Hi, does anyone sell openbsd stickers by themselves and not packaged
> with other products?
No, the only way I've seen them sold is for $40 with a free OpenBSD CD.
-- Haroon Khalid and Steve Shockley in gmane.os.openbsd.misc



Re: [Lynx-dev] in overrides from

2022-12-29 Thread Thorsten Glaser
rbell--- via Lynx-dev dixit:

>title it finds.  I spent a few minutes trying to figure out how to
>make it use the first, gave up.

Hmm. Maybe the last, but recognise the element inside the  only
and ignore it when found in the ?

bye,
//mirabilos (buried too deep in other projects to have a look)
-- 
Yes, I hate users and I want them to suffer.
-- Marco d'Itri on gmane.linux.debian.devel.general



Re: [Lynx-dev] Converting Unicode characters to ASCII: Control Pictures block

2022-12-25 Thread Thorsten Glaser
Tim Chase dixit:

>but it looks like it causes weird behaviors.

Huh? Works well for me. It just outputs the character, which
is a printable character. Are you sure you have your terminal
and lynx in UTF-8 mode both?

bye,
//mirabilos
-- 
  "Using Lynx is like wearing a really good pair of shades: cuts out
   the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
 -- Henry Nelson, March 1999



Re: [Lynx-dev] unable to launch website from bookmarks

2022-11-30 Thread Thorsten Glaser
jindam, vani via Lynx-dev dixit:

>* it never occured to me try "d"
>download option inspite Thorsten

No, it’s not “download”, rather the contrary.

a + l means add the link currently under the cursor to the
bookmarks, which was a download of some XML file which happens
to be the first link on the DDG site.

a + d means add a link to the current document to the bookmarks.

HTH & HAND,
//mirabilos
-- 
 exceptions: a truly awful implementation of quite a nice idea.
 just about the worst way you could do something like that, afaic.
 it's like anti-design.   that too… may I quote you on that?
 sure, tho i doubt anyone will listen ;)



Re: [Lynx-dev] unable to launch website from bookmarks

2022-11-29 Thread Thorsten Glaser
jindam, vani via Lynx-dev dixit:

>press "a"
>press "l"  ← no, "d"

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] Asking about printing HTTP communications when browsing an URL

2022-11-24 Thread Thorsten Glaser
River Chiang dixit:

>I'd like to ask about howto print HTTP communications between the
>client and the server when browsing an URL.

That’s the scope of tools like tcpdump -X or Burp.

bye,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent



Re: [Lynx-dev] ot: w3m question?

2022-09-16 Thread Thorsten Glaser
Jude DaShiell dixit:

>is I think an accessibility problem of w3m.

Do not worry, I am sighted yet have not figured out how to actually use
www-wo-miru yet; lynx (while sometimes slow) gives me the best overall
results, I use links (the chain) occasionally but only for specific
purposes.

bye,
//mirabilos
-- 
> Wish I had pine to hand :-( I'll give lynx a try, thanks.

Michael Schmitz on nntp://news.gmane.org/gmane.linux.debian.ports.68k
a.k.a. {news.gmane.org/nntp}#news.gmane.linux.debian.ports.68k in pine



Re: [Lynx-dev] Keystroke to search via search engine

2022-09-06 Thread Thorsten Glaser
Tim Chase dixit:

>I usually do this with an alias or shell function to populate the  
>   
>
>GET parameters, like   
>   
>
>
>  $ goog() { lynx [2]https://google.com/search?q="$1; ; }  
>   
>  

More escaping needed ☺

# GooGle Search
ggs() {
local _q _IFS

_IFS=$IFS
IFS=+
_q="$*"
IFS=$_IFS
${BROWSER:-lynx} 
"http://www.google.com/search?hl=la=0=100=off=$_q;
}

# DuckDuckGo search
ddg() {
local _q _IFS _p=/ _a=

_IFS=$IFS
IFS=+
_q="$*"  
IFS=$_IFS
case /${BROWSER:-lynx} in
(*/dillo*)
# make result page and target links work
_p=/lite/ _a='=-1' ;;
(*/links*|*/lynx*)
# avoid automatic redirect
_p=/lite/ ;;
esac
${BROWSER:-lynx} 
"https://duckduckgo.com$_p?kp=-1=wt-wt=t=1=g2=l=monospace=1=s=-1=1=debian=$_q$_a;
}

Though some want space (+) to be replaced by %20, and # is still a problem.

bye,
//mirabilos
-- 
„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)



Re: [Lynx-dev] Location of history log

2022-08-04 Thread Thorsten Glaser
woodsrs via Lynx-dev dixit:

>I wasn't able, however, to find any reference in the onlime
>documentation to the location in the file system where the history log
>is stored while lynx is not running.

That’s because lynx doesn’t store it like that ;-)

(I’d find it annoying if it did, even.)

bye,
//mirabilos
-- 
> Wish I had pine to hand :-( I'll give lynx a try, thanks.

Michael Schmitz on nntp://news.gmane.org/gmane.linux.debian.ports.68k
a.k.a. {news.gmane.org/nntp}#news.gmane.linux.debian.ports.68k in pine



Re: [Lynx-dev] lynx blinking after terminal window resizing

2022-08-02 Thread Thorsten Glaser
Thomas Dickey dixit:

>> I see it on Debian stable/bullseye, for example.
>
>I still don't see it with this combination.

Huh.

>The blinking that you're describing would be full-screen repainting.

Yes. I can verify that it does that in a typescript (attached).

I started lynx in an 80x24, moved the cursor down and up twice,
resized to 80x25, pressed ^R, then moved the cursor down… thrice,
I think. The pagetitle shows up several times, matching repaint.

$TERM is xterm, it happens with GNU screen as well (TERM=screen,
not the Debian “ncurses-term” madness of screen.xterm or so, as
that breaks sshing into BSD boxen).

>Perhaps it's something in your lynx configuration which is relevant.
>In my check, I used a test account which doesn't customize anything.

Hm. I’m attaching my /etc/lynx/local.cfg and /etc/lynx/lynx.lss and
~/.lynxrc files, maybe then? And ~/.Xresources as well…

bye,
//mirabilos
-- 
15:39⎜«mika:#grml» mira|AO: "mit XFree86® wär’ das nicht passiert" - muhaha
15:48⎜ also warum machen die xorg Jungs eigentlich alles
kaputt? :)15:49⎜ thkoehler: weil sie als Kinder nie den
gebauten Turm selber umschmeissen durften?  -- ~/.Xmodmap wonders…

typescript.gz
Description: Binary data
STARTFILE:file://localhost/~/
CHARACTER_SET:utf-8
LOCALE_CHARSET:FALSE
HTML5_CHARSETS:TRUE
ASSUME_CHARSET:utf-8
PREPEND_CHARSET_TO_SOURCE:TRUE
PREFERRED_LANGUAGE:
PREFERRED_CHARSET:utf-8
PARTIAL_THRES:3
SHOW_KB_RATE:BYTES,ETA
SHOW_CURSOR:FALSE
DEFAULT_CACHE_SIZE:512
DEFAULT_VIRTUAL_MEMORY_SIZE:25165824
SOURCE_CACHE:MEMORY
SOURCE_CACHE_FOR_ABORTED:KEEP
COLLAPSE_BR_TAGS:FALSE
COOKIE_REJECT_DOMAINS:google.com,google.de,google.at,google.ch,googleusercontent.com,dict.leo.org
PERSISTENT_COOKIES:TRUE
COOKIE_FILE:~/.etc/cookies.txt
COOKIE_SAVE_FILE:~/.etc/cookies.txt
DEFAULT_BOOKMARK_FILE:./.etc/bookmark.htm
POSITIONABLE_EDITOR:jupp
DOWNLOADER:View in less:less -f '%s':FALSE
DOWNLOADER:View in xloadimage:xloadimage -quiet '%s':FALSE:XWINDOWS
DOWNLOADER:View in mupdf:mupdf '%s':FALSE:XWINDOWS
DOWNLOADER:Spawn editor:"${VISUAL-${EDITOR-ed}}" '%s':FALSE
QUIT_DEFAULT_YES:FALSE
XLOADIMAGE_COMMAND:xloadimage -quiet %s
NESTED_TABLES: true
EXTERNAL:ftp:wget %s &:FALSE
EXTERNAL:http:wget %s &:FALSE
EXTERNAL:https:wget %s &:FALSE
EXTERNAL:http:mplayer %s:FALSE
EXTERNAL:https:mplayer %s:FALSE
PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING:TRUE
XHTML_PARSING:TRUE
JUSTIFY:TRUE
TEXTFIELDS_NEED_ACTIVATION:TRUE
LEFTARROW_IN_TEXTFIELD_PROMPT:TRUE
ENABLE_LYNXRC:ASSUME_CHARSET:ON
ENABLE_LYNXRC:BAD_HTML:ON
ENABLE_LYNXRC:FORCE_COOKIE_PROMPT:ON
ENABLE_LYNXRC:FORCE_SSL_PROMPT:ON
ENABLE_LYNXRC:FTP_PASSIVE:ON
ENABLE_LYNXRC:HTML5_CHARSETS:ON
ENABLE_LYNXRC:MAKE_LINKS_FOR_ALL_IMAGES:ON
ENABLE_LYNXRC:MAKE_PSEUDO_ALTS_FOR_INLINES:ON
ENABLE_LYNXRC:NO_PAUSE:ON
ENABLE_LYNXRC:PREFERRED_ENCODING:ON
ENABLE_LYNXRC:PREFERRED_MEDIA_TYPES:ON
ENABLE_LYNXRC:RAW_MODE:ON
ENABLE_LYNXRC:SCROLLBAR:ON
ENABLE_LYNXRC:SET_COOKIES:ON
ENABLE_LYNXRC:SHOW_KB_RATE:ON
ENABLE_LYNXRC:TAGSOUP:ON
ENABLE_LYNXRC:UNDERLINE_LINKS:ON
TRACK_INTERNAL_LINKS:TRUE
GLOBAL_MAILCAP:
# $MirOS: src/gnu/usr.bin/lynx/samples/lynx.lss,v 1.7 2013/01/11 00:12:05 tg 
Exp $
#
# Setting the normal and default types lets us keep (almost) the same colors
# whether the terminal's default colors are white-on-black or black-on-white.
# It is not exact since the default "white" is not necessarily the same color
# as the ANSI lightgray, but is as close as we can get in a standard way.
#
# If you really want the terminal's default colors, and if lynx is built using
# ncurses' default-color support, remove these two lines:
normal: normal: lightgray:black
default:normal: lightgray:black

# Normal type styles correspond to HTML tags.
#
# The next line (beginning with "em") means:  use bold if mono, otherwise
# brightblue on 
em: bold:   brightblue
strong: bold:   brightred
b:  bold:   red
i:  bold:   brightblue
a:  bold:   green
img:dim:brown
fig:normal: gray
caption:reverse:brown
hr: normal: yellow
blockquote: normal: brightblue
ul: normal: brown
address:normal: magenta
title:  normal: magenta
tt: dim:brightmagenta:  black
h1: bold:   yellow: blue
label:  normal: magenta
q:  normal: yellow: magenta
small:  dim:default
big:bold:   yellow
sup:bold:   yellow
sub:dim:gray
li: normal: magenta
code:   normal: cyan
cite:   normal: 

Re: [Lynx-dev] Don't open link on left mouse click

2022-08-02 Thread Thorsten Glaser
Mouse dixit:

>(b) what do "graphical browsers" have to do with lynx?

As soon as you enable “mouse” support they do, because it then
suddenly becomes one.

I don’t use lynx’ “mouse” support (didn’t notice it has one in
the first place) because I use the pointer in uxterm for copy
to PRIMARY or CLIPBOARD (with Shift) exclusively. This is much
more sane IMHO. There, lynx stays a text mode browser ☺

bye,
//mirabilos
-- 
15:39⎜«mika:#grml» mira|AO: "mit XFree86® wär’ das nicht passiert" - muhaha
15:48⎜ also warum machen die xorg Jungs eigentlich alles
kaputt? :)15:49⎜ thkoehler: weil sie als Kinder nie den
gebauten Turm selber umschmeissen durften?  -- ~/.Xmodmap wonders…



Re: [Lynx-dev] lynx blinking after terminal window resizing

2022-08-01 Thread Thorsten Glaser
Thomas Dickey dixit:

>On Sun, Jun 12, 2022 at 03:16:40AM +0300, mark zaharov wrote:
>> here is the solution which my friend provides. He said it works well with 
>> slang and this bug exists for ncurces only.

Huh, I didn’t get that mail.

>Perhaps this would be reproducible if the version of lynx were identified,
>as well as which platform.  I don't see it using
>   - xterm 372,
>   - ncurses 6.1 and 6.3,
>   - lynx 2.8.9rel.1 and 2.9.0dev.10

I see it on Debian stable/bullseye, for example.

ii  libncurses6:amd64 6.2+20201114-2   amd64shared libraries for 
terminal handling
ii  lynx  2.9.0dev.6-3~deb11u1 amd64classic non-graphical 
(text-mode) web browser
ii  xterm 366-1+deb11u1amd64X terminal emulator

bye,
//mirabilos
-- 
15:39⎜«mika:#grml» mira|AO: "mit XFree86® wär’ das nicht passiert" - muhaha
15:48⎜ also warum machen die xorg Jungs eigentlich alles
kaputt? :)15:49⎜ thkoehler: weil sie als Kinder nie den
gebauten Turm selber umschmeissen durften?  -- ~/.Xmodmap wonders…



Re: [Lynx-dev] dev.to website doesn't load, full support for HTML5?

2022-07-30 Thread Thorsten Glaser
Robin Stern dixit:

>A buzzing developer website https://dev.to does not load in lynx,

Complain to the author, they’re blocking lynx with 403 error from server.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] For Blind Internet Users, the Fix Can Be Worse Than the Flaws

2022-07-17 Thread Thorsten Glaser
Travis Siegel dixit:

> On 7/17/2022 2:47 PM, Chime Hart wrote:
>> Well, Travis, don't you love it when even when you view a news-letter
>> as html, they still write-and-say "you haven't opened an e-mail in a
>> long time"? Like, who are they kidding? Chime
>>
> Yeah, honestly, I get that a lot..
>
> Makes me wonder.

Tracking pixels. Which lynx doesn’t load.

bye,
//mirabilos
-- 
22:59⎜ glaub ich termkit is kompliziert | glabe nicht das man
damit schneller arbeitet | reizüberflutung │ wie windows │ alles evil
zuviel bilder │ wie ein spiel | 23:00⎜ die meisten raffen auch
nicht mehr von windows | 23:01⎜ bilderbücher sind ja auch nich
wirklich verbreitet als erwachsenen literatur   ‣ who needs GUIs thus?



Re: [Lynx-dev] latest mac edition of Lynx?

2022-06-23 Thread Thorsten Glaser
Hi Karen,

> To be forthright, I have no idea what fink is, nor have I heard of macports.

both are methods of packaging up commonly-available software for Mac OSX,
which does not have any repository for third-party software like, for
example, most GNU/Linux distributions do. There are others (e.g. pkgsrc
from NetBSD can be used), but these two are primarily intended for Mac OSX.

> The use of the word ship in the context below seems? to suggest distribute.

Yes.

> If that is the case, especially as I believe the  mac list members
> asking about lynx are using big shore the last before the m1 units,

I have no idea what *that* means. But then, I don’t use a Macintosh
myself (I only have remote access to one for work stuff) and never
liked them.

Macintosh users would often know either Fink or Darwinports/macports.

> then I feel comfortable sending them to the developer editions.

For some software, and lynx does indeed fit into that category,
their developer versions are more stable than most software’s
release versions. So go for it!

bye,
//mirabilos
-- 
[...] if maybe ext3fs wasn't a better pick, or jfs, or maybe reiserfs, oh but
what about xfs, and if only i had waited until reiser4 was ready... in the be-
ginning, there was ffs, and in the middle, there was ffs, and at the end, there
was still ffs, and the sys admins knew it was good. :)  -- Ted Unangst über *fs



Re: [Lynx-dev] latest mac edition of Lynx?

2022-06-23 Thread Thorsten Glaser
Karen Lewellen dixit:

> All I asked for the guy on the mac vision list was the current mac os that 
> lynx
> has been tested with, and the edition of lynx...

There’s no editions of lynx, other than doslynx because that
needs special adaptions, and, perhaps, the old maclynx for
systems from the last century.

Mac OSX is a unix system modern enough to support any lynx.

If you look at macports, they ship lynx 2.8.9rel.1, so that
version would have been tested. This is the current “release”,
albeit from 2018.

If you look at Fink, they also ship lynx 2.9.0dev.10, which
is the current “developed” version’s latest issue. They ship
this as stable for all OSX versions from 10.9 onwards. This
implies it’s been tested, too.

bye,
//mirabilos
-- 
08:05⎜ mika: Does grml have an tool to read Apple
 ⎜System Log (asl) files? :)
08:08⎜ yeah. /bin/rm. ;)   08:09⎜ hexdump -C
08:31⎜ ft, mrud: *g*



Re: [Lynx-dev] Lynx vs Links vs w3m

2022-06-12 Thread Thorsten Glaser
Softwafe Engineer dixit:

>Why do you prefer lynx over another terminal browsers like w3m or links?

lynx is *much* easier to use than w3m and still a lot better to use
than any links flavour.

I personally *do* use links+ -g as manga viewer, but not much else.
It has a somewhat better table rendering for simple table-based
layouts but more issues with nōn-English language/character support
and by far doesn’t support as many things as lynx does. I prefer
a browser that runs in xterm and links+ without -g is totally broken
wrt. nōn-ASCII characters (and not as well usable and powerful as
lynx).

w3m has really great rendering of tables in HTML but that doesn’t
help people when they can’t use it (except mc uses it if you F3 an
HTML file, where it’s okay). I can’t say much about feature-wise
comparison with lynx because, well, it’s unusable (at least neither
intuïtively nor with what one can retain from the manpage).

bye,
//mirabilos
-- 
>> Why don't you use JavaScript? I also don't like enabling JavaScript in
> Because I use lynx as browser.
+1
-- Octavio Alvarez, me and ⡍⠁⠗⠊⠕ (Mario Lang) on debian-devel



Re: [Lynx-dev] lynx blinking after terminal window resizing

2022-06-12 Thread Thorsten Glaser
Thomas Dickey dixit:
>On Fri, Jun 10, 2022 at 03:43:43PM +0000, Thorsten Glaser wrote:
>> Tim dixit:
>> 
>> >Hello. I've faced up with isssue. When resize my terminal window with
>> >lynx or change the font then lynx start blinking on each navigation. How
>> >to fix it?
>> 
>> Aaaah, so *that’s* why it sometimes blinks.
>
>I don't see how to reproduce this 

With Tim’s indication of it happening at resizing, I could.

I tried to make a screencast, but you cannot see it there.
I was able to somewhat spot it on a video I made with a
smartphone camera, but any attempt to bring that into a size
that can be mailed hide that again.

Basically:

- start xterm
- start lynx inside xterm navigating to some page with links
  (your bookmark file or ~ might be a good one)
- press cur↑ and cur↓ a little, see no flicker
- resize the window
- press ^R so lynx redraws matching the new size
- press cur↑ and cur↓ and see it flicker

HTH & HAND,
//mirabilos
-- 
22:59⎜ glaub ich termkit is kompliziert | glabe nicht das man
damit schneller arbeitet | reizüberflutung │ wie windows │ alles evil
zuviel bilder │ wie ein spiel | 23:00⎜ die meisten raffen auch
nicht mehr von windows | 23:01⎜ bilderbücher sind ja auch nich
wirklich verbreitet als erwachsenen literatur   ‣ who needs GUIs thus?



Re: [Lynx-dev] image viewer on GNU systems, the nᵗʰ

2022-06-10 Thread Thorsten Glaser
Hi XTaran,

>> I’m puzzling as this is different from lynx on MirBSD.
>
>Could it be this change by Debian?
>
>-#GLOBAL_MAILCAP:/usr/local/lib/mosaic/mailcap
>+GLOBAL_MAILCAP:/etc/mailcap

you hit the pot of gold at the end of the rainbow!

Appending…
GLOBAL_MAILCAP:
… to /etc/lynx/local.cfg fixes it.

I guess I need to review both Debian and MirBSD patches
to homogenise user experience.

Thanks,
//mirabilos
-- 
15:39⎜«mika:#grml» mira|AO: "mit XFree86® wär’ das nicht passiert" - muhaha
15:48⎜ also warum machen die xorg Jungs eigentlich alles
kaputt? :)15:49⎜ thkoehler: weil sie als Kinder nie den
gebauten Turm selber umschmeissen durften?  -- ~/.Xmodmap wonders…



[Lynx-dev] image viewer on GNU systems, the nᵗʰ

2022-06-10 Thread Thorsten Glaser
Hi *,

something seems to be wrong with the Debian package of lynx.

I’ve already put…
XLOADIMAGE_COMMAND:xloadimage -quiet %s
… into /etc/lynx/local.cfg but it loads images in gimp out of all
things when doing 'lynx http://path/to/somefile.jpg'

This is a somewhat fresh install (of bullseye), too.

I’m puzzling as this is different from lynx on MirBSD.

Ideas?

bye,
//mirabilos
-- 
>> Why don't you use JavaScript? I also don't like enabling JavaScript in
> Because I use lynx as browser.
+1
-- Octavio Alvarez, me and ⡍⠁⠗⠊⠕ (Mario Lang) on debian-devel



Re: [Lynx-dev] lynx blinking after terminal window resizing

2022-06-10 Thread Thorsten Glaser
Tim dixit:

>Hello. I've faced up with isssue. When resize my terminal window with
>lynx or change the font then lynx start blinking on each navigation. How
>to fix it?

Aaaah, so *that’s* why it sometimes blinks.

Sorry for not having any solution either, but I’m glad I didn’t
just imagine that and are not alone.

bye,
//mirabilos
-- 
  "Using Lynx is like wearing a really good pair of shades: cuts out
   the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
 -- Henry Nelson, March 1999



Re: [Lynx-dev] 'File exists. Overwrite? (y/n)'

2022-05-03 Thread Thorsten Glaser
Chime Hart dixit:

> Well, maybe best of both worlds, y/n/a for append.

Also cancel. This is the point.

I know ^G too, though…

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] lynx misrenders many valid xhtml5 pages on my site

2022-04-30 Thread Thorsten Glaser
Shlomi Fish dixit:

>3. it validates:

Possibly with some validators. Not all check everything.

>so it seems like it is a lynx bug

Perhaps, or just a missing feature; lynx is mostly an HTML 3/4 browser
and hypertext information system, after all, there’s no explicit support
for, nor advertisement for support of, XHTML.

So best to fix this where the documents are generated.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] lynx misrenders many valid xhtml5 pages on my site

2022-04-29 Thread Thorsten Glaser
Chuck Houpt dixit:

>The issue is self-closing syntax, which is ok in XML, but not in HTML.

They’re not valid per the DTD either, which a DTD-checking XML validator
would flag. (At least for XHTML/1.1, I don’t do this 5 nōnsense.)

Best address this on the document generator side. This will break
rendering of the document in most browsers, especially when served
as text/html… or viewed as local file…

bye,
//mirabilos
-- 
Yay for having to rewrite other people's Bash scripts because bash
suddenly stopped supporting the bash extensions they make use of
-- Tonnerre Lombard in #nosec



Re: [Lynx-dev] Japanese line wrap patch for UTF-8 terminal

2022-03-21 Thread Thorsten Glaser
Henry dixit:

>is rendered as JJ[space]JJ[space]JJ,

You probably mean JJ[newline][space]JJ[…], right?

>but I hope for JJ, i.e., continuous  text without spaces.

Try the -nomargins option.

Good luck,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] How to force empty line after etc.?

2022-03-21 Thread Thorsten Glaser
Sven Hartrumpf dixit:

>RenaissanceScientist discovered many things.
>
>This markup is strange, but valid.

TIL this is indeed valid (li can carry Flow.mix which includes h2).

I think this triggers the longstanding known issue in lynx where
block-level elements within paragraph-ish elements don’t do the
right thing. This doesn’t seem to have an easy fix.

Best to report this as a problem to the website in question, even
if it is strictly speaking valid… (the example looks like a defi‐
nition list might be a better fit).

bye,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent



Re: [Lynx-dev] How to force empty line after etc.?

2022-03-21 Thread Thorsten Glaser
Hi Sven,

>Renaissance
>  Scientists discovered the ...

it does this for me.

When I write these precise two lines into a file say x.htm and lynx it
I get it rendered as:

- Renaissance, centred, yellow on black (as is usual for h1)
- blank line
- "Scientists discovered the ...", regular text

bye,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent



Re: [Lynx-dev] SOCK5 crash+fix

2022-03-11 Thread Thorsten Glaser
Gisle Vanem dixit:

>> 'HTSprintf0(NULL,..)' looks okay to me, but crashes
>> on some condition anyway. Some Runtime-Checks that gets
>> confused (?).
>
> I think I found the cause of it:
>
> --- orig/WWW/Library/Implementation/HTString.c 2021-06-09 22:16:06
> +++ WWW/Library/Implementation/HTString.c  2022-03-11 13:48:17
>char *dst_ptr = *pstr;
>const char *format = fmt;
> -   char *dst_ptr = *pstr;  // line 680
> +   char *dst_ptr = pstr ? *pstr : NULL;

Ah! This looks better, indeed.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] SOCK5 crash+fix

2022-03-10 Thread Thorsten Glaser
Steffen Nurpmeso dixit:

> |socks5_protocol = HTSprintf0(NULL,
> | gettext("(for %s at %s) SOCKS5"),
> | protocol, socks5_host);
> |
> |A NULL-ptr read which I fail to understand.

Which is NULL here, the target variable (does HTSprintf0 not
allocate) or one of the sources (does HTSprintf0, unlike some
OSes’ snprintf, not permit NULL for %s and replace it with the
string "(null)"), in which case the patch is also wrong because
not all OSes do that, and then it needs to be:

snprintf(socks5_buf, sizeof(socks5_buf),
gettext("(for %s at %s) SOCKS5"), protocol ? protocol : "(null)",
socks5_host ? socks5_host : "(null)");

> |char socks5_buf [1000];

Large buffers on the stack are possibly harmful though.

> |+ (SOCKET_ERRNO == EINPROGRESS || SOCKET_ERRNO == 112

This can’t be right.

>I do not know what 112 is, but i have no idea of Windows, what

WSA* errnos are in five-digit range. WSAEINPROGRESS is 10036,
for example. Magic numbers are bad, too; this probably needs
explaining.

>+#ifdef _WINDOWS
>+   || SOCKET_ERRNO == 112
> #endif

As I said above, almost certainly wrong.

bye,
//mirabilos
-- 
Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend.   -- Andreas Bogk über boehm-gc in d.a.s.r



[Lynx-dev] entities not decoded in images’ inline things

2022-02-24 Thread Thorsten Glaser
$ print '' | lynx -dump -stdin -image_links
[1][foobar]

References

   1. file:///tmp/lynxuCeoIy/foo



The reference is correct, the text printed inline isn’t.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] Question marks in local source filenames

2022-02-13 Thread Thorsten Glaser
Ian Collier dixit:

>The syntax of "lynx" according to the man page is
>
> lynx [options] [optional paths or URLs]
>
>so the filename with a '?' character in it is a path, not a URL, and
>therefore the RFCs for URIs do not apply.

Exactly. But lynx d̲o̲e̲s̲ this part correctly (“lynx foo?.htm” is
correctly expanded to file://localhost/home/«me»/foo%3F.htm in ‘V’).

>On Sun, Feb 13, 2022 at 01:32:34PM +, David Woolley wrote:
>> On 13/02/2022 04:00, Thorsten Glaser wrote:
>> > This is of course a bug, local filenames are unconstrained
>> > other than not containing NUL and slash of course.
>
>> That's not true.  They have the same constraints as the path part of any
>> URI:

If called as URI, but in this case I did (I did “g . ”, went to
the file and pressed → to activate it, so it w̲a̲s̲ urlencoded):

>> so ? is not permitted, unless % encoded

That. Even with this, it’s broken:

>Besides, Lynx still defaults to plain-text even if you escape the '?'
>characters in the filename to %3F.

That.

Also, note how I said “local source filenames”, not URLs. I know all
about urlencoding filenames (having converted the corresponding RFC
to a grouping regex only this year for someone).

bye,
//mirabilos
-- 
 you introduced a merge commit│ % g rebase -i HEAD^^
 sorry, no idea and rebasing just fscked │ Segmentation
 should have cloned into a clean repo  │  fault (core dumped)
 if I rebase that now, it's really ugh │ wuahh



[Lynx-dev] Question marks in local source filenames

2022-02-12 Thread Thorsten Glaser
lynx is unable to show local *.htm{,l} files whose filename
contains a question mark as HTML, it insists on plaintext
without the plus signs for wrapping (only difference when
pressing backslash).

This is of course a bug, local filenames are unconstrained
other than not containing NUL and slash of course.

bye,
//mirabilos
-- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2



Re: [Lynx-dev] configure-script issue

2022-02-05 Thread Thorsten Glaser
Thomas Dickey dixit:

>I created the macro after dealing with users who would put C preprocessor
>options in $CC

I think that, if you even want to detect it, you should only warn for it.
We sell rope so the user can shoot himself into the foot, after all.

> (which for lynx will cause it to not build the configuration
>summary page as expected, for ncurses will cause interesting build failures,
>etc)

Directly inspecting the variables is error-prone anyway. Instead, you
should consider doing it like mksh’s configure script, which first
checks that the compiler works at all; in mksh’s example, this means
it successfully compiles and links…

/* evil apo'stroph in comment test */
#include 
int main(void) { int t[2]; return (isatty(pipe(t))); }

… then checks that the compiler/linker fails correctly for… <<-EOF

#include 
extern int thiswillneverbedefinedIhope(void);
int main(void) { return (isatty(0) +
#$expr
0
#else
/* force a failure: expr is false */
thiswillneverbedefinedIhope()
#endif
); }
EOF

… where $expr is 'if 0' in the first run, then uses this very
construct to test for the couple of CPPFLAGS that the configury
script needs to know about (e.g. to construct the regression
testsuite caller script’s list of categories to set).

“successfully compiles and links” means that…

| $CC $CFLAGS $Cg $CPPFLAGS $LDFLAGS $NOWARN conftest.c $LIBS

… succeeds and generates one of a.out, a.exe, conftest.exe or
conftest. (Here, $Cg is the configury-added "-g" or "-Og -g3"
or similar, $NOWARN is the empty string while this is being
tested.) For all compilers *except* “msc” it also means that
the errorlevel of the $CC command is 0.

I’ve so far found two compilers that fail it; “dec” may succeed
if adding ${ccpl}-non_shared to CFLAGS (should be LDFLAGS, now
that I see it), “dmc” if adding ${ccpl}/DELEXECUTABLE (where
ccpl is "-Wl," normally but "-Yl," on UWIN and "-Y " on Interix).

“msc” is ifdef _MSC_VER, “dmc” is ifdef __DMC__, “dec” is
if defined(__DECC) || (defined(__osf__) && !defined(__GNUC__)).

For mksh, isatty(3) is a required function; for lynx you’d maybe
use a different one.

> or would load up $CC with optimization/debugging options (similar

That’s the users’ problem.

In mksh/Build.sh I only add default optimisation/debugging options
if, at script entry, the result of doing…

allu=QWERTYUIOPASDFGHJKLZXCVBNM
alll=qwertyuiopasdfghjklzxcvbnm
alln=0123456789
i=`echo :"$orig_CFLAGS" | sed 's/^://' | tr -c -d $alll$allu$alln`

… is $i containing the empty string. (There’s a Build.sh flag to
explicitly enable debugging, which sets $Og (see above) to something
suitable for the compiler detected and adds -DDEBUG to CPPFLAGS, but
that’s orthogonal to this.) I am aware of GNU autotools liking to add
their own "-O2 -g" default flags, which is precisely why mksh’s does
not do that.

>problems, with complaints when it didn't evaluate in the expected order).

The order is somewhat canonical though.

${CPP:-$CC -E} $CPPFLAGS srcfn.c

$CC $CFLAGS $CPPFLAGS -c srcfn.c
$CC $CFLAGS $LDFLAGS -o tgtfn srcfn.o $LIBS

$CC $CFLAGS $CPPFLAGS $LDFLAGS -o tgtfn srcfn.c $LIBS

If $LDSTATIC is passed in (it’s usually either empty or "-static")
it’s folded into LDFLAGS (appended). I’m sure there’s a reason why
CPPFLAGS comes after CFLAGS here, but unless user errors are made
this should not matter.

Note that CPPFLAGS may *correctly* contain surprising (i.e. not -I,
-D, -U) flags, such as -Wdate-time which *is* a preprocessor option.

Having ported things to BSD ports (including autotools/libtool itself
to a BSD) as well as embedded buildsystems (multiple of them) I am
fully aware how difficult a task this is for GNU autotools. That’s why
I’m merely proposing this as a “please think about this”.

>> sketched above.  (I notice other examples of this, such as the way it
>> maps c[1-9][0-9] to clang with some option, if clang is detected;
>
>that's because clang's c89/c99 wrappers are broken (especially on MacOS)
>to the point that they've become unusable.  (I test-compile with c89,

Might be useful to replace this with a compile/link-time test for the
brokenness and failing instead (ofc with a suitable message) so the user
knows about it and can fix that, also for other uses of the compiler.

bye,
//mirabilos (fitting .sig this time ☺)
-- 
11:56⎜«liwakura:#!/bin/mksh» also, i wanted to add mksh to my own distro │
i was disappointed that there is no makefile │ but somehow the Build.sh is
the least painful built system i've ever seen │ honours CC, {CPP,C,LD}FLAGS
properly │ looks cleary like done by someone who knows what they are doing



Re: [Lynx-dev] lynx word bleeding?

2022-01-27 Thread Thorsten Glaser
Hi Karen,

> if the content is still there.

I think I understand the problem, and I have hit it as well
on a visual display.

Basically, yes, when you scroll, sometimes previous content
is not erased if the new line is shorter than the old line.

This probably has to do with both the way lynx is compiled
(which termcap/curses/slang/etc. library it uses), the actual
terminal (emulator) in use (and how the $TERM variable is set),
and possibly the page content (I have seen this more often if
“funny” Unicode characters were used). Mismatching character
sets between the document and the locale and/or lynx config
are also a possible cause.

I’m sorry I cannot offer a general advice / fix, other than
noting that, when I notice the issue, I press ^L (Control-L)
to redraw the screen, and it goes away.

If you hit this again on a page whose content is not private,
maybe save that page (press V (uppercase v) then d (lowercase
d) to download it, confirm a filename) and then hand that file
to your support. Maybe they can reproduce the issue with the
file in question and the same terminal settings, and then they
can hopefully either find terminal/locale/lynx settings that
make the issue stop or recompile lynx with different libraries
until it’s fixed.

Good luck,
//mirabilos
-- 
22:59⎜ glaub ich termkit is kompliziert | glabe nicht das man
damit schneller arbeitet | reizüberflutung │ wie windows │ alles evil
zuviel bilder │ wie ein spiel | 23:00⎜ die meisten raffen auch
nicht mehr von windows | 23:01⎜ bilderbücher sind ja auch nich
wirklich verbreitet als erwachsenen literatur   ‣ who needs GUIs thus?



Re: [Lynx-dev] External dowloaders

2022-01-25 Thread Thorsten Glaser
Luke, Shellworld Support dixit:

>If so, I don't think it can be done.

It can.

>That suggests that lynx *always* downloads the file by its own means, 
>before using your downloader.

Right…

DOWNLOADER:View in less:less -f '%s':FALSE
DOWNLOADER:View in xloadimage:xloadimage -quiet '%s':FALSE:XWINDOWS
DOWNLOADER:View in mupdf:mupdf '%s':FALSE:XWINDOWS
DOWNLOADER:Spawn editor:"${VISUAL-${EDITOR-ed}}" '%s':FALSE

… but there’s this:

EXTERNAL:ftp:wget %s &:FALSE
EXTERNAL:http:wget %s &:FALSE
EXTERNAL:https:wget %s &:FALSE

These are external downloaders. You can invoke them by pressing
‘.’ (period).

Good luck,
//mirabilos
-- 
13:22⎜«neurodamage» mira, what's up man? I have a CVS question for you in #cvs
16:06⎜ Thank god I found you =)   20:03│«bioe007:#cvs» mira2k: ty
17:14⎜ Thanks big help you are :-)mira|nwt: ty again
18:36⎜«ThunderChicken:#cvs» mirabilos FTW!  23:03⎜«mithraic:#cvs» aaah. thanks



Re: [Lynx-dev] Unexpected network read error when accessing https on Ubuntu 16.04.

2022-01-14 Thread Thorsten Glaser
Luke at Shellworld Support dixit:

>On Fri, 14 Jan 2022, Thorsten Glaser wrote:
>
>> Do you build lynx yourself or do you use/backport packages?
>
>I have been pulling pre-built X64 binaries from Buster, bionic, etc. repo 

That’s very likely to not work, since the environment differs
(there’s a reason we use backports on Debian instead of pulling
the binaries from the next release). Granted, with matching
package dependencies for the libraries, things should work, but
there are still differences between Debian and Ubuntu enough so
I’d not mix binaries built for these. That, plus subtile compat
bugs (mixing packages from different releases is only allowed
for stable/LTS and next stable/LTS, not more, and only really
supported as intermediate state during upgrades, not normal
system operation, so this may simply have been untested).

Good luck,
//mirabilos
-- 
Support mksh as /bin/sh and RoQA dash NOW!
‣ src:bash (406 (433) bugs: 0 RC, 275 (295) I, 131 (138) M, 0 F) + 208
‣ src:dash (91 (106) bugs: 0 RC, 51 (55) I, 40 (51) M, 0 F) + 63 ubu
‣ src:mksh (2 bugs: 0 RC, 0 I, 1 M, 1 F)
dash has two RC bugs they just closed because they don’t care about quality…



Re: [Lynx-dev] Unexpected network read error when accessing https on Ubuntu 16.04.

2022-01-14 Thread Thorsten Glaser
Hi,

>I am running an older Ubuntu system (16.04), serving some users with 

>Newer versions of lynx (seemingly anything after 2.8.9.dev16 inclusive) 
>will not open https URLs.
>
>All the lib dependencies are exceeded, and earlier versions (such as 
>2.8.9.dev9) do work, but have started running into other errors that make 
>upgrading desirable..

huh. Interesting.

Do you build lynx yourself or do you use/backport packages?

I’d have guessed for the TLS version to be an issue, but…

>Secure 256-bit TLS1.3 (ECDHE_RSA_AES_256_GCM_SHA384) HTTP connection

this doesn’t look like it. (For the record, I’m getting the same
in Debian 11, using the packaged version of lynx, which is
2.9.0dev.6 though.)

>libwww-FM 2.14, SSL-MM 1.4.1, GNUTLS 3.5.17, ncurses 6.0.20160213(wide)

The packaged version of lynx also uses nonGNUtls, but there is
somewhat a sense that building lynx with OpenSSL might be better
overall. Maybe try that instead, if you can get a version that
supports at least TLSv1.2?

>From trace:

(I’ll leave it to the experts to look at that.)

>Any pointers here would be vastly appreciated, and apologies if this is 
>the wrong list.

I think this is the only list.

If needed, I can probably do the Debian Developer thing and backport
the current lynx package from Debian unstable to 16.04 using its
libraries “as shipped”… but, I see now, that’s also just 2.9.0dev.10
so it might not suffice?

Good luck,
//mirabilos
-- 
(gnutls can also be used, but if you are compiling lynx for your own use,
there is no reason to consider using that package)
-- Thomas E. Dickey on the Lynx mailing list, about OpenSSL



Re: [Lynx-dev] Display of some multi-line links is cut off in the middle

2021-12-30 Thread Thorsten Glaser
KIHARA Hideto dixit:

>Reverting following change solves the problem.

>-  strcat(linedata, p);
>+  for (i = 0; (linedata[i] = p[i]) != '\0'; ++i) ;

The lower line is a strcpy inlined, not a strcat, so probably a
bogus refactor…

(that being said, I’d prefer if new code used either strlcat, if
the lengths are unknown/unchecked (but linedata is NUL-terminated
before the call) or memcpy (if the lengths are known, e.g. because
the target was allocated at the right size))

Meow,
//mirabilos
-- 
15:41⎜ Somebody write a testsuite for helloworld :-)



[Lynx-dev] AF selection

2021-12-08 Thread Thorsten Glaser
Hi,

can we *please* have -4 and -6 options for lynx?

Thanks,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] How to Set vi as editor

2021-12-07 Thread Thorsten Glaser
Martin McCormick dixit:

>I have forgotten what to set to feed an ASCII text file to a text
>input form in lynx.

^Xe

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Re: [Lynx-dev] sudden site access failure:

2021-11-13 Thread Thorsten Glaser
Karen Lewellen dixit:

> you will get a list of stories with comparative aspects, just choose one then
> share what happens.

I can reproduce this: the start page works, the story pages get the
cloudflare block. I am certain FFN does this deliberately, as their
support also didn’t respond when I asked about this.

I’m going with fichub for now; the search works, so we can use the
user agent given to search, then copy-paste the URLs to fichub, whose
author ensured it works with lynx.

bye,
//mirabilos

PS: ksh rocks! (Especially mksh. (Because I develop it.))
-- 
15:41⎜ Somebody write a testsuite for helloworld :-)



Re: [Lynx-dev] sudden site access failure: realclearpolitics.com

2021-11-10 Thread Thorsten Glaser
Jude DaShiell dixit:

>I wonder, if a cell phone used the same ip to go to a site and solved the
>captcha with the higher graphics browser would the low/no graphics browser
>on the same ip also have to solve a captcha?

I tried that with Firefox and lynx on the same laptop.
It doesn’t work. Cloudflare and hCAPTCHA are totally
breaking the internet for us lynx users and don’t care.

bye,
//mirabilos
-- 
If Harry Potter gets a splitting headache in his scar
when he’s near Tom Riddle (aka Voldemort),
does Tom get pain in the arse when Harry is near him?
-- me, wondering why it’s not Jerry Potter………



Re: [Lynx-dev] [cookies?] unable to log in in http://board.flatassembler.net/

2021-11-03 Thread Thorsten Glaser
Sylvain BERTRAND dixit:

>field, but if I do enable links2 cookie-saving, I can see the session cookie in
>the cookie save file (after exiting links2).  I suspect some redirections did

Can you transplant these to lynx’ cookie file, and does the site
work then? If so, we’ll at least know it’s just the login process.

bye,
//mirabilos
-- 
15:41⎜ Somebody write a testsuite for helloworld :-)



Re: [Lynx-dev] [cookies?] unable to log in in http://board.flatassembler.net/

2021-11-02 Thread Thorsten Glaser
Thomas Dickey dixit:

>(it's not related to user-agent...).  Recompiling those (to capture the
>actual headers _they_ see) would be simpler than firefox...
>
>That's something I'd do on the weekend.

It’s an HTTP site, so tcpdump -X is your friend.

For HTTPS sites, the Burp suite as proxy usually does wonders.

bye,
//mirabilos
-- 
If Harry Potter gets a splitting headache in his scar
when he’s near Tom Riddle (aka Voldemort),
does Tom get pain in the arse when Harry is near him?
-- me, wondering why it’s not Jerry Potter………



Re: [Lynx-dev] shebang URL hash - #!

2021-10-27 Thread Thorsten Glaser
David Woolley dixit:

>> Tell them it requires ECMAscript and therefore violates basic
>> accessibility principles.
>
> Unfortunately, the W3C web accessibility initiative hasn't taken that position

They’re not everyone. You know how many lynx users cannot evade
to something else with ECMAscript support who are active on this
mailing list, alone.

Plus, the BSI (German IT security ministry) is also forbidden
from turning on JS ☻ or at least were in 2018 or so, but this
probably hasn’t changed.

> (My take on this is that WCAG membership is mainly accessibility
> consultants, and consultants need solutions that are acceptable to
> businesses, or they will be out of business themselves.)

Unsurprisingly.

> I actually note the OP wanted an accessible way of using YouTube.  I

No, this is a different thread.

bye,
//mirabilos
-- 
Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend.   -- Andreas Bogk über boehm-gc in d.a.s.r



Re: [Lynx-dev] shebang URL hash - #!

2021-10-27 Thread Thorsten Glaser
Klaus-Peter Wegge dixit:

> It is just introduced in the brand new document management systems of ISO,
> CEN/CENELEC and many european national standards organisation.

Tell them it requires ECMAscript and therefore violates basic
accessibility principles. And don’t hold your breath for even
any reply at all… :'(

bye,
//mirabilos
-- 
Yes, I hate users and I want them to suffer.
-- Marco d'Itri on gmane.linux.debian.devel.general



Re: [Lynx-dev] shebang URL hash - #!

2021-10-27 Thread Thorsten Glaser
Klaus-Peter Wegge dixit:

> #! is called the shebang URL hash, used to hint to search engines that

There’s no such thing as a “shebang hash”. This is simply a hash
that starts with an exclamation mark.

Normally, a hash in an URI (scheme:authority/path?query#hash) would
be resolved by a webbrowser by scrolling to the position of element
with the corresponding identifier (used to be  but
for a while, any element with id="hash" attribute could be used, and
a name=… was removed from the standard).

> this site is using Ajax to display another page.

AJAX means “asynchronous JavaScript and XML”. Merkste selbst, ne? ☻
(sorry, this is rather idiomatic)

> href="https://docs.din.de/din-documents/ui/#!/doc/default/9637d154-ffae-4b40-97c1-7274b6faa837?p=din-email-docs-page;>Komprimieren

This simply means, to normal webbrowsers, to scroll to an element with
id="!/doc/default/9637d154-ffae-4b40-97c1-7274b6faa837?p=din-email-docs-page"
(which is probably invalid XML).

ECMAscript client-side code can intercept this (window.location.hash)
and do other things with it, but that requires a full DOM and ECMAscript
implementation, which I’m thankful for lynx not to have.

bye,
//mirabilos
-- 
>> Why don't you use JavaScript? I also don't like enabling JavaScript in
> Because I use lynx as browser.
+1
-- Octavio Alvarez, me and ⡍⠁⠗⠊⠕ (Mario Lang) on debian-devel



  1   2   3   4   5   6   7   8   >