rkd77 / elinks Goto Github PK
View Code? Open in Web Editor NEWFork of elinks
License: Other
Fork of elinks
License: Other
Hello,
the SpiderMonkey is not reporting any errors. The error is due to following.
In SpiderMonkey 52 the function
JS::SetErrorReporter(ctx, message, error_reporter);
has been rename to
JS::SetWarningReporter(ctx, error_reporter);
And doesn't provide the same functionality at all.
In my opinion in the function spidermonkey_get_interpreter the SetWarningReporter is obsolete.
From what I found the correct way is as Follows:
http://mozilla.6506.n7.nabble.com/what-is-the-replacement-of-JS-SetErrorReporter-in-spidermonkey-60-td379888.html#a379890
To catch the exception after evaluation of the javascript code.
In that case I'd suggest to put the Error checking into the spidermonkey_eval.
I already prepared something that works.
It is something as follows (in spidermonkey_eval):
...
JS::Evaluate(ctx, options, code->source, code->length, &r_val);
if (JS_IsExceptionPending(ctx))
{
JS::RootedValue exception(ctx);
if(JS_GetPendingException(ctx,&exception) && exception.isObject()) {
JS::AutoSaveExceptionState savedExc(ctx);
JS::Rooted<JSObject*> exceptionObject(ctx, &exception.toObject());
JSErrorReport *report = JS_ErrorFromException(ctx,exceptionObject);
if(report) {
/* Somehow the reporter alway reports first error
* Undefined and with line 0. Let's filter this. */
if ((int) report->lineno>0) {
/* Optional printing javascript error to file */
//FILE *f = fopen("js.err","a");
//PrintError(ctx, f, what->message(), what, 1);
/* Send the error to the tui */
error_reporter(ctx, report);
}
JS_ClearPendingException(ctx);
}
}
}
done_heartbeat(interpreter->heartbeat);
JS_LeaveCompartment(ctx, comp);
...
If that's any good I can create a pull request for that.
Thank You
Reference:
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_SetErrorReporter
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1277278
i've had a hard time figuring how to copy an url to the clipboard with felinks. after quite some digging i've found this to work:
vim ~/.elinks/elinks.conf
# add this line for copying urls
set document.uri_passing.clip = "echo -n %c | xclip -sel clipboard"
maybe it could be added to the documentation, or even into the default elinks.conf ?
also, right now i'm searching about how to grab some text from a web page into the clipboard.
let's say for example, i'm searching the web for a specific bit of code (some regex, or python code whatever that may be), suppose i find a snippet that looks interesting, now how do i copy it into the clipboard, so i can go and paste it in my code editor ? is it even possible to select and copy some text from a webpage in felinks ?
by the way, i am not using gnu-screen or anything special. i just have my terminal.
somehow the shortcut "ctrl-insert" doesn't work for me:
bind "edit" "Ctrl-Insert" = "copy-clipboard"
i tried to change it to something else but nothing worked.
how can i copy text from a webpage in elinks / felinks ?
Hi, If I try to compile with gnutls option I can see this error
ssl.c:15:10: fatal error: gcrypt.h: No such file or directory
15 | #include <gcrypt.h>
| ^~~~~~~~~~
compilation terminated.
make[3]: *** [../../.././Makefile.lib:133: ssl.o] Error 1
make[3]: Leaving directory '/home/zubator/programming/get_advers/myGE/elinks/src/network/ssl'
make[2]: *** [../.././Makefile.lib:268: all-recursive] Error 1
make[2]: Leaving directory '/home/zubator/programming/get_advers/myGE/elinks/src/network'
make[1]: *** [.././Makefile.lib:268: all-recursive] Error 1
make[1]: Leaving directory '/home/zubator/programming/get_advers/myGE/elinks/src'
make: *** [Makefile.lib:268: all-recursive] Error 1
I installed headers files and compiled sources, but got error due linking, that cannot find function gcry_create_nonce. It is better to add libgcrypt library to linker.
Hi rkd77,
this is a request from a non computer expert but a layman user who already uses elinks ( ELinks 0.12pre6 on tinycore linux 11 64b to be precise) and i would love to use your uptodate version of it since, eg. , it could access sites that give SSL errors with older versions.
in this post i would like to write about using JS with felinks ( that i cannot use until available as binary).
This is to ask wether, once you finished with libDOM and put QuickJS to work, this features will be available :
thank you somuch for your good work
Here is the output.
config.guess timestamp = 2004-09-07
uname -m = aarch64
uname -r = 5.7.19-1-MANJARO-ARM
uname -s = Linux
uname -v = #1 SMP Wed Sep 2 20:43:09 +03 2020
/usr/bin/uname -p = unknown
/bin/uname -X =
hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch =
/usr/bin/oslevel =
/usr/convex/getsysinfo =
UNAME_MACHINE = aarch64
UNAME_RELEASE = 5.7.19-1-MANJARO-ARM
UNAME_SYSTEM = Linux
UNAME_VERSION = #1 SMP Wed Sep 2 20:43:09 +03 2020
configure: error: cannot guess build type; you must specify one
The following scripts need to be migrated to Python3:
doc/tools/asciidoc/asciidoc.py
test/cgi/chunked_bzip2.py
test/cgi/chunked_deflate.py
test/cgi/chunked_gzip.py
test/cgi/chunked_raw_deflate.py
test/server/crlf.py
test/server/w32.py
The default name of the file an image is saved to is the last part of the uri, everything that follows the last slash in it. In case of a data: uri, this results in a random-looking sequence of characters.
I suggest to use "data" instead, possibly followed by the file extension if the mime type is recognized (typically, jpeg, gif or png).
An image in an html file can be included in the file itself via the <img src="data:...">
syntax. Elinks correctly recognizes such images and also allows saving them and calling an external viewer on them, but uses the undecoded base64 data instead of the decoded data. This is especially inconvenient for running an external handler, which is typically an image viewer.
An example is attached.
hello
current master (0f6d431) fails to
build (most probably due to latest changes to plural.*):
[102/211] gcc -m64 -Isrc/elinks.p -Isrc -I../src -I. -I.. -I/opt/stow.d/stow/zlib/usr/include -I/opt/stow.d/versions/openssl-3.0.0-alpha9/usr/include -I/opt/stow.d/versions/expat-2.2.10/usr/include -I/opt/stow.d/versions/python3-3.9.1/usr/python3/include/python3.9 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g '-DGETTEXT_PACKAGE="elinks"' '-DBUILD_ID=""' -DHAVE_CONFIG_H -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Wno-address -MD -MQ src/elinks.p/intl_gettext_plural.c.o -MF src/elinks.p/intl_gettext_plural.c.o.d -o src/elinks.p/intl_gettext_plural.c.o -c ../src/intl/gettext/plural.c
FAILED: src/elinks.p/intl_gettext_plural.c.o
gcc -m64 -Isrc/elinks.p -Isrc -I../src -I. -I.. -I/opt/stow.d/stow/zlib/usr/include -I/opt/stow.d/versions/openssl-3.0.0-alpha9/usr/include -I/opt/stow.d/versions/expat-2.2.10/usr/include -I/opt/stow.d/versions/python3-3.9.1/usr/python3/include/python3.9 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g '-DGETTEXT_PACKAGE="elinks"' '-DBUILD_ID=""' -DHAVE_CONFIG_H -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Wno-address -MD -MQ src/elinks.p/intl_gettext_plural.c.o -MF src/elinks.p/intl_gettext_plural.c.o.d -o src/elinks.p/intl_gettext_plural.c.o -c ../src/intl/gettext/plural.c
plural.c:134:10: fatal error: plural.h: No such file or directory
compilation terminated.
Building with meson:
-Dperl=false
-Dpython=true
-Dgnutls=false
-Dspidermonkey=false
-Dsm-scripting=false
-Dtre=false
-Dfsp=false
and gcc:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/stow.d/versions/gcc-10.2.0/usr/lib64/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/balducci/tmp/install-us-d/gcc-10.2.0.d/gcc-10.2.0/configure --prefix=/opt/stow.d/versions/gcc-10.2.0/usr --libdir=/opt/stow.d/versions/gcc-10.2.0/usr/lib64 --libexecdir=/opt/stow.d/versions/gcc-10.2.0/usr/lib64 --enable-shared --disable-bootstrap --enable-languages=c,c++,objc,fortran --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (GCC)
thanks
ciao
-gabriele
example html file:
ab cd
<br />
ef gh
searching for 'ef gh' finds the second line, but searching for 'ab cd' does not find the first
firefox and opera find both
I'm trying to change the Mageia elinks package over to this fork. The compilation fails on the following:
/bin/ld: lib.o: in function `script_hook_pre_format_html':
/home/src/pkgs/elinks/BUILD/felinks-0.13.1/src/scripting/lua/hooks.c:147: undefined reference to `lua_strlen'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:41: elinks] Error 1
I googled for the problem, seems that the function in newer LUA versions is called lua_rawlen.
I found a commit whereby another project fixed the error using the following commit:
ValyriaTear/ValyriaTear@05f87f3
Relevant bit of the change:
#if LUA_VERSION_NUM > 501
return std::string(lua_tostring(L, index), lua_rawlen(L, index));
#else
return std::string(lua_tostring(L, index), lua_strlen(L, index));
#endif
Could a similar change be made to src/scripting/lua/hooks.c ? Thanks for forking elinks and continuing its development!
Using ELinks as a great HTML→text converter for my e-mail needs. Yep, some people still use text interfaces for e-mail! I use mutt
as my MUA, and vim
as text editor (for writing/replying to e-mail).
What'd be great is some sort of visual cue for blockquotes, that are often used for e-mail replies; let me give an example, might be easier to see what I'm coming at. What follows is a text/plain
e-mail conversation snippet:
>>> Should we call company X and try to renew their contract?
>> Good idea, though I see they barely used our services in the
>> last year.
>>
>> - Five logins total
>> - 3% of available resources used
>>
>> Is there any room for rebate or extra perks we
>> can offer them if they bring it up?
> You can discount 10% for sure.
Ok, I'll call them on Monday.
In the text/html
realm, it'd most likely be formatted as the following:
<blockquote>
<blockquote>
<blockquote>
<p>Should we call company X and try to renew their contract?</p>
</blockquote>
<p>Good idea, though I see they barely used our services in the last year.</p>
<ul>
<li>Five logins total</li>
<li>3% of available resources used</li>
</ul>
<p>Is there any room for rebate or extra perks we can offer them if they bring it up?</p>
</blockquote>
<p>You can discount 10% for sure.</p>
</blockquote>
<p>Ok, I'll call them on Monday.</p>
ELinks currently renders <blockquote>
as an indented paragraph with vertical margins, which makes it hard to contextualize the quotes' depth:
Should we call company X and try to renew their contract?
Good idea, though I see they barely used our services in the last
year.
• Five logins total
• 3% of available resources used
Is there any room for rebate or extra perks we can offer them if they
bring it up?
You can discount 10% for sure.
What'd be nice is to render <blockquote>
with a left border, using the >
character (so it more or less looks like the very first example in this ticket). Because >
is well-known as the standard quoting character for e-mail, both mutt
and vim
use syntax highlighting, e.g. colors, to distinguish quoting levels.
I guess that change could also be relevant in a regular web browsing session, I think that in most contexts, <blockquote>
needs some form of visual emphasis so it stands out from paragraphs surrounding it.
What I've tried so far is to massage the HTML before ELinks converts it to text, and change the <blockquote>
to some <table border="1">
so I get some context, but it just wastes screen estate, and makes it hard to manipulate the text again to change the quote level (if I reply to the e-mail):
+--------------------------------+
| +----------------------------+ |
| | +------------------------+ | |
| | | Should we call company | | |
| | | X and try to renew | | |
| | | their contract? | | |
| | +------------------------+ | |
| | | |
| | Good idea, though I see | |
| | they barely used our | |
| | services in the last year. | |
| | | |
| | o Five logins total | |
| | o 3% of available | |
| | resources used | |
| | | |
| | Is there any room for | |
| | rebate or extra perks we | |
| | can offer them if they | |
| | bring it up? | |
| +----------------------------+ |
| |
| You can discount 10% for sure. |
+--------------------------------+
Unfortunately it appears the code path to render <table>
in ELinks is quite distinct from the rest of the rendering code, and it does not seem to support having borders only on one side.
When building the XML documentation, I get an error regarding an invalid
reference: "CONFIG-SCRIPTING-SPIDERMONKEY", the reference is in: doc/smjs-scripting.txt .
Build error is:
Working on: /<>/doc/manual.xml
xmlto: /<>/doc/manual.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
/<>/doc/manual.xml:3993: element link: validity error : IDREF attribute linkend references an unknown ID "CONFIG-SCRIPTING-SPIDERMONKEY"
Document /<>/doc/manual.xml does not validate
make[2]: *** [Makefile:201: manual.html-chunked] Error 13
It is specified that when you visit a Gopher page which links to a HTML page in the form of hFoo URL:https://bar.com baz.com 70
that the baz.com
gopher server has the responsibility to provide a HTML redirection page. (See http://gopher.quux.org:70/Archives/Mailing%20Lists/gopher/gopher.2002-02%7C/MBOX-MESSAGE/34)
In Lynx, if you visit say gopher://thinkmoult.com/1/free-intervals-sheet-music and try to visit either of the two HTML links, you will get a redirection page. In elinks, you will not - I suspect because elinks does not realise it has to jump to HTTP.
Any ideas why this is happening?
felinks 0.13.5
When searching and the search term is already within the viewable width of terminal, felinks will still scroll to the right anyway. I've tried playing with the settings in Document -> Scrolling/Searching, but haven't found what might affect this. It means having to scroll left to read more context.
What I would expect to happen is that felinks only scroll sideways if the search term is off the visible width of the screen.
I've tried to narrow down some example pages, because it doesn't always seem to happen all the time:
https://bugs.gentoo.org/show_bug.cgi?id=194832
I was doing using a simple, non-regex, case-insensitive search for 'INSTALLDIR' and all matches are aligned to the left edge of the terminal.
Is there a setting that might affect this?
See this email correspondence I had with Peter, developer of the sgopherd
server. Not sure how much is applicable here.
> If you go to gopher://thinkmoult.com/ and click on the DIR for the atom feed,
> on my felinks it shows "Gopher directory gopher://thinkmoult.com/1/atom-feed/"
Ah, I see. Yes, my felinks does the same now.
When clicking on "atom feed", felinks requests the selector "atom-feed"
from the server. This is different from other clients, which request
"/atom-feed".
You use "/atom-feed" in your index file, so I think that this string is
the correct one.
This looks like a bug in felinks after all. The Gopher protocol
specification [0] says that clients should use selector strings exactly
as given in your index file:
"The selector string should mean nothing to the client software; it
should never be modified by the client."
[0]: https://tools.ietf.org/html/rfc1436
I guess servers other than sgopherd are simply a little more "client
friendly" and ignore client errors like this.
... waaaaaaait a minute. They just recently broke felinks with this
commit:
https://github.com/rkd77/felinks/commit/5106b31f6c67e180a24e49b83c640e350cff777b
That commit removes the "/" and this is wrong. I think you should report
that upstream.
Before that commit, felinks requested the correct selector and actually
got a response (according to wireshark), but it simply doesn't display
it. This could be a nasty issue: If I read felinks' source code
correctly, it appears that felinks *needs* lines to be terminated with
<CR><LF>. sgopherd does not enforce that for *all* files (and it
shouldn't do so), only for .INDEX*, .HEADER, and *.ANN files.
See, your root index file for gopher://thinkmoult.com/ appears to be
auto-generated by sgopherd from .INDEX, right? It then sends menu items
terminated by <CR><LF>:
i# Dion Moult's Blog\t-\t-\t0\r\n
i\t-\t-\t0\r\n
iMy name is Dion Moult, and thinkMoult is my blog. I work as an architect and\t-\t-\t0\r\n
...
There's \r\n, so that works.
But "/atom-feed" might be hand-written by you, I guess? In that file,
there's only <LF>:
i# thinkMoult Atom / RSS feed\t-\t-\t0\n
i\t-\t-\t0\n
i - Author: Dion Moult\t-\t-\t0\n
i - Date: 2018-12-15\t-\t-\t0\n
...
I'm pretty sure felinks chokes on the missing <CR> here.
So, long story short: Whenever you manually write menu files, make sure
to use <CR><LF> or "DOS" line endings. (It's stupid, but that's what the
protocol spec says.)
It might be worth a shot to ask the felinks developer to add support for
"UNIX" line endings with just <LF>. This is not a bug, though.
I won't change this in sgopherd, because to sgopherd your "/atom-feed"
is just a regular file. It doesn't really know anything about it. Could
be an image or an audio file. sgopherd has no business in messing with
line endings here.
Hope that helps. :)
Hey there,
I recently updated Debian to the latest Stable (10), which includes the 0.13.GIT version of elinks. I believe that it's the one from here.
Anyway, with this new version I'm running into a vexing problem: If I try to view, say, a jpg image file, I get a prompt asking if it's type image/jpeg (this is definitely associated in my ~/.mime.types file so there should be no question that that's the MIME type), and asking for me to provide a program to process it (I definitely have that defined to be eog in my ~/.mailcap file). My setup worked before in all previous versions of Debian and/or elinks that I've used. I did breeze through the man page to see if there was a reference to some fundamental change in this mechanism, but nothing jumped off the page. Did I misread it? Have I overlooked some new feature/requirement?
Many thanks!
cheers,
john
When I hit C-z
and then resume felinks
back with fg
, it occupies the terminal, but the TUI is not rendered anymore. The keypresses are just displayed raw and don't seem to be handled too, so the process is to be killed externally from that on.
Hello there,
great work on the spidermonkey side. Good that is compiles now. However I would be interested in determinig whether it's a correct behavior that no errors neitgher warnings are displayed. In the older builds the spidermonkey displayed error when there was an error in the javascript code in the page. Right now the spidermonkey doesn't display any error at all.
Steps to reproduce:
compile with ecmascript enabled (libmozjs-52-dev)
ECMAScript in options set to 1 [ option enable ]
Script error reporting set to 1 [ option error_reporting ]
Use test/ecmascript/document_write.html and change document.writeln to document.writelnasdf
In my opinion that should start to yell and error. From the tests not all html pages works. E.g. the test/ecmascript/document_write.html doesn't write to document neither the the spidermonkey doesn't yell anything on error.
However to confirm something works I used the ./test/ecmascript/scroll.html with success.
Thank You for Your work
Tried to compile latest git snapshot on Debian 8.11 jessie with the following options:
./configure --enable-256-colors --with-terminfo --with-perl
Then I got following error on make
:
lib.o: In function `get_temp_name':
/home/user/zzz/felinks/felinks/src/session/download.c:1008: warning: the use of `tempnam' is dangerous, better use `mkstemp'
lib.o: In function `match_uri_host_ip':
/home/user/zzz/felinks/felinks/src/network/ssl/socket.c:250: undefined reference to `ASN1_STRING_get0_data'
collect2: error: ld returned 1 exit status
Makefile:41: recipe for target 'elinks' failed
make[1]: *** [elinks] Error 1
make[1]: Leaving directory '/home/user/zzz/felinks/felinks/src'
Makefile.lib:268: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
What could be the problem?
Regards,
Piotr
Hi all.
Sorry for my english.
I pulled your source code and run compile, but sources compiled with gcc, not g++. I fixed makefile and all files compiled, but in linking process i have a lot of error about utils/string.c
/elinks/src/viewer/text/link.c:1524: undefined reference to add_to_string' /elinks/src/viewer/text/textarea.c:673: undefined reference to
init_string'
/elinks/src/viewer/text/form.c:1190: undefined reference to `add_crlf_to_string'
what should I do?
My system is Xubuntu. If you want, I can share config.log
https://github.com/sindresorhus/terminal-image#readme
https://github.com/hzeller/timg#readme
Spidermonkey 1.8.5 has been removed from Debian, because it is unmaintained and has a security vulnerability. Could elinks migrate to mozjs-52 or mozjs-60 ?
Anytime I try to use search-typeahead-text
it immediately pops up with an error "no previous search".
It looks like the commit 4f4df33 broke this by changing get_searched_all
:
diff --git a/src/viewer/text/search.c b/src/viewer/text/search.c
index 52d95c1d..f5be7204 100644
--- a/src/viewer/text/search.c
+++ b/src/viewer/text/search.c
@@ -982,7 +982,9 @@ get_searched_all(struct session *ses, struct document_view *doc_view, struct poi
if (*pt == NULL)
return FIND_ERROR_NOT_FOUND;
- return move_search_do(ses, doc_view, 0);
+ move_search_do(ses, doc_view, 0);
+
+ return FIND_ERROR_NONE;
}
static enum find_error
move_search_do
returns an entirely different kind of status (in this case FRAME_ERROR_REFRESH
) which is then misinterpreted as FIND_ERROR_NO_PREVIOUS_SEARCH
(both=1). Reverting this change fixes it for me, but I'm not entirely sure the motivation for it in the first place, so maybe there's a better fix.
hello
I have noticed a mouse problem with recent git commits.
Bisection gives me:
good: d05f781 (rev count: 4337)
bad: 0fea79c (rev count: 4338)
Problem is quite reproducible.
I report about three different occurrences of the (seemingly) same
problem, but there are probably more
There are probably other instances in which this problem shows up
All the above problems don't show with
d05f781 (rev count: 4337) (and older,
of course)
Building with meson:
-Dperl=false
-Dpython=true
-Dgnutls=false
-Dspidermonkey=false
-Dsm-scripting=false
-Dtre=false
-Dfsp=false
on:
Linux 5.9.8 #1 SMP Wed Nov 11 08:36:17 CET 2020 x86_64 GNU/Linux
ldd returns the following libraries:
libc.so.6
libcrypt.so.1
libcrypto.so.3
libdl.so.2
libexpat.so.1
libidn.so.12
libjpeg.so.8
libm.so.6
libpthread.so.0
libpython3.9.so.1.0
libssl.so.3
libutil.so.1
libz.so.1
thanks a lot for your valuable work
ciao
-gabriele
Felinks pulled from git today 2020-10-28. This was also a problem in Elinks too IIRC.
When passing the current URI to an external program, anything from # to the end of the URL is missing.
E.G. if I go to this wikipedia page:
https://en.wikipedia.org/wiki/Corrective_lens
and click on the link for 'Trifocal' so that the current URL is now:
https://en.wikipedia.org/wiki/Corrective_lens#Trifocal
Passing that URI to an external application omits the #Trifocal. A bit annoying if you need to copy/paste a specific part of a long document.
When the document contains pre or table elements, some parts of the document may fall "outside of the screen", on its right. When searching for a pattern that has a match in them, elinks correctly scrolls the screen to make them visible. It however does not if some other matches are already "in the screen".
An example is in this html page
notfound.html.gz
when viewed in 80 columns.
Searching for the pattern "some" highlights the first and third matches. However, the second is not in the screen, and elinks never scrolls to show it when pressing 'n'. It does when searching for "something".
I'm trying to choose the best for me. For example, Links has a GUI mode and advanced Tor support (e.g. the ability to mimic the Tor Browser). Does Elinks have this? Is Elinks better than Links or vice versa?
Hi rkd77,
this is a request from a non computer expert but a layman user who already uses elinks ( ELinks 0.12pre6 on tinycore linux 11 64b to be precise) and i would love to use your uptodate version of it since, eg. , it could access sites that give SSL errors with older versions.
I'm writting this post about those errors i have with my current installation of elinks.
Of course, if this is solved in current version of felinks, i'm prepared to test on a readily available build of felinks as soons as can have one and give you all the feedback i can.
Indeed, now a days more and more sites are becoming inaccessible and forcing me to use seamonkey whereas i could simply access them earlier with elinks.
So could there be a solution for a mere user to apply?
FYI : "set connection.ssl.cert_verify = 0" is not working in those cases.
Thank you for carrying on this great job.
This happens with bash shell. Using fg to bring process back make it stuck.
Felinks git pull 2020-10-28
It would be nice if felinks would keep the current search term indefinitely, until you type a different term or clear it.
After doing a search on a page, and then following a link elsewhere and clicking 'n' for next, the search term seems to have been lost. The behaviour after navigating and clicking 'n'ext seems to be a bit random at the moment, and hard to say exactly what's happening.
Elinks bundles a very old copy of gettext that might have security vulnerabilities. It would be great if it could also be built with an external gettext. (See https://bugs.gentoo.org/635110 .)
I think the copy of gettext has been slightly modified (something related to access keys?).
Recently the build of PDF manual fails on Debian, I pasted the relevant error:
> [JW] doc/manual.pdf
> Using catalogs: /etc/sgml/catalog
> Using stylesheet: /usr/share/docbook-utils/docbook-utils.dsl#print
> Working on: /<<PKGBUILDDIR>>/doc/manual.xml
> This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=pdfjadetex)
> restricted \write18 enabled.
> entering extended mode
> (/<<PKGBUILDDIR>>/doc/manual.tex
> JadeTeX 2003/04/27: 3.13
> (/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd)
> Elements will be labelled
> Jade begin document sequence at 20
> No file manual.aux.
> (/usr/share/texmf/tex/latex/tipa/t3ptm.fd)
> (/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1phv.fd) [1.0.40{/var/lib/texm
> f/fonts/map/pdftex/updmap/pdftex.map}] [2.0.40]
>
> Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use
> less on input line 183.
>
> ! Undefined control sequence.
> <recently read> \Hy@colorlink
Full log can be found at: http://qa-logs.debian.net/2020/12/05/amd64/elinks_0.13.2-1_unstable.log
Hi, thanks for your work on this fork. I'm trying to build elinks packages from source to ArchLinux distro.I found your fork, rkd77/felinks, that seems to be actively maintained, and a good candidate to build packages from.
But I am confused about the actual status of elinks.
This old page, http://elinks.cz/index.html , always comes up first in google searches.
But it is hopelessly outdated, references mailing lists and git repos http://repo.or.cz/elinks.git or http://elinks.cz/elinks.git that are outdated.
I'm having some confusion understanding where and if, there is still any "offficial" elinks repo or mailing list in 2020.
I see that you have a file called "SITES" that says:
Homepage:
http://elinks.cz/
Old page, 2009, 2012. It's not felinks homepage right ? Has nothing to do with this fork, only confuses more. Maybe put it it "old or original elinks official page".
Mailing list:
http://elinks.cz/community.html#mailinglist
[email protected] (user discussion, announcements)
[email protected] (weird development and sorcery talks)
Also confusing. http://lists.linuxfromscratch.org/listinfo/elinks-users , doesn exist anymore. If you plan to maintain felinks here, than maybe github is the "official" homepage and everything now.
I see a lot of recent commits by "Witold Filipczyk", a long time active contributor of elinks in the logs. Also found this from 2017:
https://marc.info/?l=elinks-dev&m=151049727519336&w=2
On 11/12/17, Witold Filipczyk [email protected] wrote:
I forked elinks. https://github.com/rkd77/felinks.git
Devel elinks git repository stopped to work. New repo gives more latitude to make changes.
http://lists.linuxfromscratch.org/listinfo/elinks-dev
Could you describe better your, rkd77/felinks, github repository in the README page ?
Do you plan on keeping working regularly only on this github repo ?
Is "felinks" indepedent of "elinks" ?
Do you have any other mailing list or bug tracker ? Or do you plan to use github only ?
Do you welcome pull requests on github ? Issues ?
Do you have any interest accepting contributions to:
Do you have any interest in using the wiki page, https://github.com/rkd77/felinks/wiki ?
It's very difficult to find updated documentation and things that work in 2020. And it is a pitty because elinks is still very usefull.
When following a link to a non-existent anchor in the page itself, elinks moves to the start of the page. An example is the html file in long-page-with-wrong-internal-link.zip: at the very bottom it contains a link to
"#nonexistinganchor", which does not exist. Elinks correctly signals the error, but also jumps to the top of the page. This is not what other browser such as opera and firefox do.
Any idea as to where to look if one wanted to fix this?
Please update NEWS file with new features/fixes
Thanks
Hi rkd77,
this is a request from a non computer expert but a layman user who already uses elinks ( ELinks 0.12pre6 on tinycore linux 11 64b to be precise)
and i would love to use your uptodate version of it since, eg. , it could access sites that give SSL errors with older versions.
I don't have a binary version of current release and, while waiting for one, I want to refer to the way bookmarks (Bm) , URI rewritting (Uw)
and user protocols (Up) are managed in above mentionned version, from the point of view of the user that i am.
Here is a list of points i'd like to mention :
great thing the bookmarks are kept in a plain text file so we can use simple tools to manipulate them.
i would find it useful to manage all the above in this same text file as they all represent URIs and can be seen as bookmarks to those URIs?
That's how they are managed in SeaMonkey/2.49.4 (based on Firefox/52.0) and it makes it handy to find what i look for in one place.
The format of the file shouldn't change much to remain compatible with prior versions but the old Bm would gain 'keywords' to call them and Uw could keep their extended syntax (with '%s'...).
in continuation : search in the Bms should :
uris (Bm, Uw,Up) could benefit from extra features :
concerning the dialog for the Bm manager :
thnak you for reading until here and also for still working on elinks as it is my main browser...
i love it since it make browsing much easier. of course i still turn to seamonkey for sites
like YT since they use full JS (rhe pages are only a JS template, you cannot escape) and elinks does SSL error on it.
Thank you very much
There appears to be a charset conversion problem within the html_hr()
function, that AFAICT only happens with the -dump
CLI option. When running elinks
in interactive mode I see no issue.
Instead of sending the 0xe2
0x95
0x90
bytestream to stdout (that corresponds to ═
on a UTF-8 terminal), elinks
sends 0xfd
0xbf
0xbf
0xbf
0xbf
0x8d
.
My best git bisect
skills indicate issue was probably introduced with commit 0fea79c. I'm 100% sure elinks-0.13.5
does not have the problem.
If I apply the following patch, I get something reasonable, but obviously wrong:
diff --git a/src/document/html/parser/general.c b/src/document/html/parser/general.c
index 8f30f5df..7b7a5e77 100644
--- a/src/document/html/parser/general.c
+++ b/src/document/html/parser/general.c
@@ -646,10 +646,10 @@ html_hr(struct html_context *html_context, char *a,
char *html, char *eof, char **end)
{
int i/* = par_format.width - 10*/;
- char r = BORDER_DHLINE;
+ char r = '=';
int q = get_num(a, "size", html_context->doc_cp);
- if (q >= 0 && q < 2) r = BORDER_SHLINE;
+ if (q >= 0 && q < 2) r = '-';
html_stack_dup(html_context, ELEMENT_KILLABLE);
par_format.align = ALIGN_CENTER;
mem_free_set(&format.link, NULL);
Hello,
when compiled with the current state there is a problem in memory allocation when visiting www.wikipedia.org.
From the stack there is following:
#0 0x00007f2b00f8c720 in _GI___nanosleep (requested_time=0x7ffdffa81860, remaining=0x7ffdffa81860) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1 0x00007f2b00f8c62a in sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#2 0x000055c8d9584194 in patience (of=0x55c8d95d82f5 "malloc") at memory.c:37
#3 0x000055c8d958421f in mem_alloc (size=18446744073709551584) at memory.c:61
#4 0x000055c8d9584300 in mem_realloc (p=0x0, size=18446744073709551584) at memory.c:91
#5 0x000055c8d94f7cb7 in mem_align_alloc (ptr=0x55c8da139dd8, old=0, new=18446744073709551612, objsize=8, mask=0)
at ../../.././src/util/memory.h:133
#6 0x000055c8d94fd17a in process_link (html_context=0x55c8da0d3240, link_state=LINK_STATE_NEW, chars=0x55c8da0ffb23 "/ Konknni", charslen=9,
cells=-4) at renderer.c:1750
#7 0x000055c8d94fd6d2 in put_chars (html_context=0x55c8da0d3240, chars=0x55c8da0ffb10 "कोंकणी / Konknni", charslen=28)
at renderer.c:1887
#8 0x000055c8d952e196 in convert_string_elinks (convert_table=0x55c8d9630fc0 <utf_table>,
chars2=0x7f2b00179a62 "कोंकणी / Konknni\n
And it results in:
ERROR at memory.c:34: Out of memory (malloc returned NULL): retry #2/3, I still exercise my patience and retry tirelessly.
Then the browser tries to allocate memory after it will display the page.
The interesting is frame #7 where the cells is allocted as follows:
... "Konknni", charslen=9, cells=-4)
Thank You
Build of documentation fails if make is invoked with parallel build enabled:
{{{
cd doc && make -j4 all-docs
make[2]: Entering directory '/<>/doc'
[CONF2DOC] doc/features.txt
[KEYS2DOC] doc/keymap-actions.txt
[KEYS2DOC] doc/keymap-defaults.txt
[HELP2XML] doc/option-command.frag.xml
[HELP2XML] doc/option-config.frag.xml
[ASCIIDOC] doc/elinkskeys.5.xml
[HELP2XML] doc/option-command.frag.xhtml
[HELP2XML] doc/option-config.frag.xhtml
ERROR: elinkskeys.5.txt: line 97: empty section is not valid
make[2]: *** [Makefile:185: elinkskeys.5.xml] Error 1
}}}
Hi rkd77,
this is a request from a non computer expert but a layman user who already uses elinks ( ELinks 0.12pre6 on tinycore linux 11 64b to be precise) and i would love to use your uptodate version of it since, eg. , it could access sites that give SSL errors with older versions.
The whole compiling stage is a real high barrier to start using it. But this might be an easier task for you (or other visitors and users/devs here), that you probably even practive every now and then on this particular application. So I'm asking if you could be so kind as to provide to us, for current release and future ones, an executable, ready to use, that we can drop in place of the old one ut that doesn't require any external dependences.
Of course, from the moment packages appear for the main distributions, that extra work wouldn't be necessary (i check pkgs.org regularly but only see sthing for netbsd).
The pro of my request is that you would have more people testing the release and, i hope, more feedback.
The probable con being the extra work for you or a helping dev who could contribute.
Thank you for understanding the needs of those, like me, who cannot do better that using your work, and, occasionaly provide feedbak in the for of issues... like this one probably.
Please add support for SOCKS4a/5 proxies, they are useful as they send DNS requests through the proxy.
Browsing of .onion addresses wouldn't be possible without this support (except using socat workarounds, which is really ugly)
hi
just tried to build latest master
(a92df85) and getting this failure:
----8<----
gcc -m64 -Isrc/elinks.p -Isrc -I../src -I. -I.. -I/opt/stow.d/stow/zlib/usr/include -I/opt/stow.d/versions/openssl-3.0.0-alpha8/usr/include -I/opt/stow.d/versions/expat-2.2.10/usr/include -I/opt/stow.d/versions/python3-3.9.0/usr/python3/include/python3.9 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g '-DGETTEXT_PACKAGE="elinks"' '-DBUILD_ID=""' -DHAVE_CONFIG_H -fno-strict-aliasing -Wno-pointer-sign -Wno-builtin-declaration-mismatch -Wno-address -MD -MQ src/elinks.p/dialogs_info.c.o -MF src/elinks.p/dialogs_info.c.o.d -o src/elinks.p/dialogs_info.c.o -c ../src/dialogs/info.c
In file included from ../src/dialogs/info.c:22:
../src/ecmascript/ecmascript.h:8:10: fatal error: jsapi.h: No such file or directory
8 | #include <jsapi.h>
| ^~~~~~~~~
compilation terminated.
---->8----
Previous commit (085a93d) builds just
fine (as any other commit before that, since quite a bit)
Building with meson:
----8<----
--prefix=/opt/stow.d/versions/felinks-4321/usr
--libdir=/opt/stow.d/versions/felinks-4321/usr/lib64
-Dperl=false
-Dpython=true
-Dgnutls=false
-Dspidermonkey=false
-Dsm-scripting=false
-Dtre=false
-Dfsp=false
---->8----
The build failure is apparently due to this include:
----8<----
#include "ecmascript/ecmascript.h"
---->8----
in the following source files:
----8<----
src/main/module.c
src/document/renderer.c
src/viewer/text/link.c
src/viewer/text/vs.c
src/viewer/text/form.c
src/protocol/protocol.c
src/dialogs/info.c
---->8----
As a matter of fact, if I comment the ecmascript.h include in those
files the build succeeds.
Shouldn't the ecmascript stuff be skipped when -Dspidermonkey=false
and -Dsm-scripting=false?
Thanks for any help
ciao
-gabriele
Same result by clearing the search pattern (e.g., '/', remove all and enter) and pressing 'n'.
This should result in a "no previous search" or something like that. I believe it used to be, but no longer is.
Maybe I'll dig more into this in the next weeks.
I ran across this project, which uses Firefox's reader-mode functionality as a terminal app.
https://gitlab.com/gardenappl/readability-cli
I think having this option as a plugin would make a lot of sites render much better.
How would I go about preprocessing html in (f)elinks with an external program? I am a web developer but unfamiliar with writing native apps.
Can someone point me in the right direction?
elinks(1) has a wried hehavior that blocks the controlling terminal from
being written by other background processes, while this may be intended to
maintain the readability the ELinks TUI, it usually causing problems due to
processes that trying to write to the terminal will be suspended by SIGTTOU;
to make the problem worse, user can't notice this immediately until exiting
elinks(1); after that the shell would indicates one or more background
processes being suspend, like '[1]+ Stopped ...' reported by bash(1).
It is very annoying for me because sometimes I would need to start a program
like ssh(1), to setup some port forwardings for use within elinks(1), in the
background, for example 'ssh ... -L 8000:... -N &'; it works on beginning,
but sometimes the background process may want to report a networking issue,
by printing an error message to stderr, then it being suspended, and the web
server forwarded by the background process becomes unresponsive, ELinks
stucks on 'Making connection' status until finally timed out... This
situation can only be recovered by exiting elinks(1), 'bg' that suspended
process and start elinks(1) again.
A Debian user suggested the following patch:
--- src/terminal/kbd.c.orig 2019-01-26 09:48:21.000000000 +0800
+++ src/terminal/kbd.c 2020-04-22 16:29:45.009109375 +0800
@@ -260,9 +260,6 @@
elinks_cfmakeraw(&t);
t.c_lflag |= ISIG;
-#ifdef TOSTOP
- t.c_lflag |= TOSTOP;
-#endif
t.c_oflag |= OPOST;
if (tcsetattr(itrm->in.ctl, TCSANOW, &t)) return -1;
This is old behaviour inherited from elinks, but some pages will not wrap text, although they seem to work fine in plain links and lynx. Adding links as an external app for these pages is useful.
One example:
https://trac.ffmpeg.org/wiki/StreamingGuide
The long ffmpeg commands refuse to wrap, likely because they are in <pre>
tags, but they do in links (2.12) or lynx.
Sometimes turning off table rendering fixes it, e.g on some pages on linuxquestions.org, or when duckduckgo searches print off the side.
I wonder if adding the capability to break <pre>
whitespace should be included in the 'wrap_nbsp' option? It's likely you would want both to happen with it enabled.
Steps to reproduce:
For some reason, elinks quits. I grant that readmulti.c is not exactly the most useful program in the world, but the point is that if a uri rule program reads from stdin for whichever reason, it may cause elinks to quit. The program itself does it from multiple processes, but it does also if restricted to a single one. It just happens rarely then.
/*
* readmulti.c
*
* multiple reads at the same time
*/
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
int main() {
int i, n = 10;
char c;
for (i = 0; i < n; i++) {
if (fork() == 0) {
read(STDIN_FILENO, &c, 1);
return EXIT_SUCCESS;
}
}
for (i = 0; i < n; i++)
wait(NULL);
return EXIT_SUCCESS;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.