luakit icon indicating copy to clipboard operation
luakit copied to clipboard

:tab command causes a (confusing) error

Open sfindeisen opened this issue 2 years ago • 1 comments

Current Behavior: Red flashy error with a stacktrace

Desired Behavior: Nice error message

How can we reproduce it (step by step): luakit :tab

Environment:

Linux Distribution & Version: Debian stable Output of luakit --version: luakit 2.0.0 built with webkit 2.22.6 (installed version: 2.36.4)

Note about webkit issues:

If you're reporting a rendering issue, please test it with the gnome browser ephiphany as well. If the issue occurs there too, we're very likely not able to help. These issues should be reported to webkit: https://bugs.webkit.org

sfindeisen avatar Jul 28 '22 13:07 sfindeisen

I think this is a pretty reasonable suggestion. The stacktrace which is used to report errors of this sort would be confronting and difficult to parse even if it used sensible colours. The garish white on red is enough to make ones eyes bleed.

However, there are lots of places where user supplied arguments are used without being tested first, and tracking down and nice-ifying all of them would be a largish job. I'd suggest that pull requests would probably be accepted, but it's unlikely to get to the top of anyone's todo list anytime soon.

You can correct this yourself by overriding the default bind:

modes.add_cmds({
    { ":tab", "Execute command and open result in new tab.", {
        func = function (w, o) if o.arg then
                                   w:new_tab() w:run_cmd(":" .. o.arg)
                               else
                                   w:error("No command given")
                               end end,
        format = "{command}",
    }},
})

and given that you're still using 2.0.0, a fix in upstream is unlikely to benefit you.

taobert avatar Jul 30 '22 02:07 taobert

I fixed it in the current luakit. Thanks for reporting it! We're not going to fix it in 2.0.0 (which is 4 years old by now).

Debian stable is bullseye, which includes luakit 2.2.1. https://packages.debian.org/de/bullseye/luakit

Old-stable (buster) also contained 2.2.1. So you're at least two debian releases behind.

Maybe consider to upgrade?

c0dev0id avatar Aug 31 '22 15:08 c0dev0id