From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#60830: 30.0.50; The *Compilation* buffer does not recognize Lua errors Date: Sat, 7 Oct 2023 13:18:51 +0200 Message-ID: References: <909EF5E1-6F30-4A35-84E8-2EF4333115FD@gmail.com> <4996E536-72CE-4E6A-9C75-CF7307A82469@gmail.com> <5CB2325C-0A1E-4AC6-B61E-DFA46F3CFC80@gmail.com> <6F3E07C8-3E9E-481C-B89C-7045D1028A2A@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_ED491BBF-718E-4A02-B67B-DDFC0C122014" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6124"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60830@debbugs.gnu.org, Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= , Stefan Kangas To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 07 13:19:52 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qp5Lc-0001Oq-1l for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Oct 2023 13:19:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qp5LU-0006Ul-Gb; Sat, 07 Oct 2023 07:19:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qp5LT-0006Uc-6x for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 07:19:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qp5LS-0002hC-VL for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 07:19:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qp5Ll-0002Fc-Ul for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 07:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Oct 2023 11:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60830 X-GNU-PR-Package: emacs Original-Received: via spool by 60830-submit@debbugs.gnu.org id=B60830.16966775608588 (code B ref 60830); Sat, 07 Oct 2023 11:20:01 +0000 Original-Received: (at 60830) by debbugs.gnu.org; 7 Oct 2023 11:19:20 +0000 Original-Received: from localhost ([127.0.0.1]:53486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qp5L6-0002ER-Fj for submit@debbugs.gnu.org; Sat, 07 Oct 2023 07:19:20 -0400 Original-Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:53363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qp5L4-0002ED-Ts for 60830@debbugs.gnu.org; Sat, 07 Oct 2023 07:19:19 -0400 Original-Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50435ad51bbso3667813e87.2 for <60830@debbugs.gnu.org>; Sat, 07 Oct 2023 04:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696677533; x=1697282333; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=HE82fKsRqNui1lL85Tut5y5rEeddBFtWKXtw14M0LWA=; b=RYXBWXJLI7/cY0/dsmF5jqcPd/smAcGhCVIhZGzV+WZBQm7W5rww7328WatHK68Pg3 EefarGZMFKZKyi63e6I6nbRON0yhhhqRYeX6w66xf4+BIubjaFkSQ8XBkO9jw8R5pY8v +V7bwQtGQpZUrHKWAVLqHrzpVk+8Rfi+4DpuHNk7nX33fkmUGlEX4ETLxYY0CwyarCir y9PZAu64HuC07gsdrLzOOOBY0FSVsFPsAI2BVq4ekmbLBhswyxtC6+7UCojR4ZIMpUre WL9NnhoIUZzDuyQRc1RjRWSoP0gD2Y6fpRN1dyoOo8mAP92MSAs1EYrtCSEdbIHilW5m Ceiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696677533; x=1697282333; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HE82fKsRqNui1lL85Tut5y5rEeddBFtWKXtw14M0LWA=; b=EAQiI4e8a2mQwQ1tQQbndqs+ddxcbhy6+dLlnDxIH4jM/JcvAUECfegI39fTpR/Zf9 fP5TZYkdeOSChy5ds1BvXvQmyF0gDCDAsU0gisA4VLMalkT9a/GGxDbs7pWDThbDU23l oiSL1g76gx4we+we0ocLLA4v816Yp2S5IVZkMVtwBe9hCXlce3HMd+nRP/UhYFSv0JoK g8K1T3iTlBuci5qHRMzOKhN/0RPNlI53DothpW05Hjfzd6YMj5yuW8w0mRFx/9DgxWnh M81++w+hW4J2nxt4RqDeKKvYdItcdLWQAjpBrBiAg6mBVJJiekaQKHTZkKUbzhNChRAa XKqw== X-Gm-Message-State: AOJu0YxK9arLiqwT1UfdryTTJUHOs8twvLCfRkZTdKwqUt8hYRR7CXhm EVoTp7hPYuofiqKBjUc+bUo= X-Google-Smtp-Source: AGHT+IF/MN6p5Opci4Ix4doEbmfG6Gf1CP50e465bea85TgVLq4jQ9zDWVMxt+DF5zAfnMiIVlQfUA== X-Received: by 2002:a05:6512:208d:b0:500:bfcb:1bf9 with SMTP id t13-20020a056512208d00b00500bfcb1bf9mr8604112lfr.67.1696677533258; Sat, 07 Oct 2023 04:18:53 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id u7-20020a056512040700b00501ce0cacb6sm659151lfk.188.2023.10.07.04.18.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Oct 2023 04:18:52 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271994 Archived-At: --Apple-Mail=_ED491BBF-718E-4A02-B67B-DDFC0C122014 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 6 okt. 2023 kl. 18.49 skrev Stefan Monnier : > How 'bout we only activate a handful of rules, and then use a "low > priority background" search for matches to the non-active rules and = when > we find such a match we bring it to the users' attention that maybe = they > should enable that extra rule? "It looks like you are compiling a Pascal program using a Sun compiler = from 1989. Would you like me to parse the error messages for you?" Even if we were to pull off the 'low priority background' part, it seems = difficult to balance such a mechanism so that it's never annoying yet = relevant when it needs to be. In any case we would benefit from a better way to select rules. One = problem is that packages (and users) go wild modifying both CERA and = CERAA. Here is a patch that I'm not satisfied with but tries to make = CERA easier to customise interactively. Its main limitation is assuming that explicit rule specs precede symbols = that refer to CERAA, which makes some kind of sense (new rules are added = for a reason so they should take priority) but may not correspond to = reality. Not sure what to do about that, but at least it's a start. --Apple-Mail=_ED491BBF-718E-4A02-B67B-DDFC0C122014 Content-Disposition: attachment; filename=cera-type.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="cera-type.diff" Content-Transfer-Encoding: 7bit diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 9e441dbfcf7..f683859a179 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -748,11 +748,32 @@ compilation-error-regexp-alist variable, the `compilation-transform-file-match-alist' variable is then consulted. It allows further transformations of the matched file names, and weeding out false positives." - :type '(repeat (choice (symbol :tag "Predefined symbol") - (sexp :tag "Error specification"))) + :type '(list :tag "Rules" + (repeat :inline t + :tag "Custom message rules" + (list :tag "Rule specification" + regexp + (sexp :tag "File") + (sexp :tag "Line") + (sexp :tag "Column") + (sexp :tag "Type") + (sexp :tag "Hyperlink") + (repeat :inline t + :tag "Highlights" + (list :tag "Highlight" + (natnum :tag "Submatch") + (sexp :tag "Face"))))) + (set :inline t + :tag "Predefined rules" + :convert-widget compilation--predef-rules-widgets)) :link `(file-link :tag "example file" ,(expand-file-name "compilation.txt" data-directory))) +(defun compilation--predef-rules-widgets (widget) + (widget-put widget :args (mapcar (lambda (x) (list 'const (car x))) + compilation-error-regexp-alist-alist)) + widget) + (defvar compilation-error-case-fold-search nil "If non-nil, use case-insensitive matching of compilation errors. If nil, matching is case-sensitive. --Apple-Mail=_ED491BBF-718E-4A02-B67B-DDFC0C122014--