bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#60830: 30.0.50; The *Compilation* buffer does not recognize Lua erro


From: Rudolf Adamkovič
Subject: bug#60830: 30.0.50; The *Compilation* buffer does not recognize Lua errors
Date: Sat, 07 Oct 2023 23:02:25 +0200

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> Your rules incorrectly match "[C]" as a file name. This isn't just a
> matter of aesthetics; the user must be able to step through matches
> without tripping.

Good catch!  I have two questions:

(1) How can I specify "this group cannot be '[C]'" in the regexp?
(2) How can I test this scenario in 'compile-tests.el'?

> I see no reason for the non-greedy match in the first regexp, do you?

I made the relevant groups greedy, but I wonder what difference it
makes.  Is there a way to test the change in 'compile-tests.el'?

> We try to make rules work with Windows file names (or names containing
> spaces, which are also somewhat common on Windows) where relevant and
> practical. Your patterns don't; can you argue that it's not useful for
> Lua or not possible to do so?

Good catch!  Fixed.

> Don't keep capture groups that you don't use.

Fixed and TIL about "shy groups".

> I'm still erring on having these rules disabled by default because
> they seem very close to unrelated compiler output. Would that be a
> major inconvenience?

I would understand if we did that for some long-dead compilers but not
for Lua.  I think we need a systematic approach to solve the performance
penalty and false positives.  Arbitrarily disabling languages that are
alive and well, and even supported by Emacs out of the box, such as Lua,
is not a good idea, IMHO.

>> While on it, I also added support for stack frames with no line
>> number, as per Lua source code.
>
> That doesn't result in anything useful as far as I can tell.

We still detect the file path/name, which is useful.  That said, Lua
stack frames typically include line numbers.

> Please include an addition to etc/compilation.txt as well.

Fixed.

[The current version of the patch is attached below.]

Rudy

Attachment: 0001-Make-the-Compilation-mode-recognize-Lua-errors.patch
Description: Text Data

-- 
"It is no paradox to say that in our most theoretical moods we may be
nearest to our most practical applications."
-- Alfred North Whitehead, 1861-1947

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia

reply via email to

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