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: Sun, 8 Oct 2023 16:47:43 +0200 Message-ID: <2294A949-ACB1-4962-91B1-B798F22C5C1C@gmail.com> 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> <4F844611-9A1E-409C-9E93-31C073E25453@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_59C195E2-5E34-41A7-BA0F-B37E7A82743A" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="973"; 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 Sun Oct 08 16:49:00 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 1qpV5Y-00008P-H0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Oct 2023 16:49:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpV5I-0000FS-81; Sun, 08 Oct 2023 10:48: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 1qpV5G-0000F5-Pd for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 10:48:42 -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 1qpV5G-0002cV-GT for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 10:48:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpV5a-0002y5-3w for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 10:49:02 -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: Sun, 08 Oct 2023 14:49:02 +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.169677649511135 (code B ref 60830); Sun, 08 Oct 2023 14:49:02 +0000 Original-Received: (at 60830) by debbugs.gnu.org; 8 Oct 2023 14:48:15 +0000 Original-Received: from localhost ([127.0.0.1]:58250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpV4p-0002tW-0E for submit@debbugs.gnu.org; Sun, 08 Oct 2023 10:48:15 -0400 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:42466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpV4m-0002sc-JM for 60830@debbugs.gnu.org; Sun, 08 Oct 2023 10:48:13 -0400 Original-Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c1807f3400so45562141fa.1 for <60830@debbugs.gnu.org>; Sun, 08 Oct 2023 07:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696776466; x=1697381266; 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=UxpwSqGgQqfUftZ8s1PijK3lbGN3T2XSK6NbqvWqwyo=; b=eSvi/+sbAZvgXeYzPYr/iYavURC2M5nCTLx8EpC4nsXsM66+wL71VySjCH8mlgHwOh vngwXgsBiFW1gCT1jXyE3+VaHq93VS9/Plbcgd9ME+tl4JyxvhcVhjeh9BPKGekWuBSs ljD5pfp7isptl03osdolfPMB5pU1UcvFBx/99YLXBZeUEazzzjWPaaaoNRKIQ9kleNVO VyJ7iShkTzZum18lTUxRG0y5agY9JGdRHCBbtooVLgy82UnDdSJuNH/Ve9DqnGteoJzq x1JW+hUtPFY96DFcXH8bMqT8ly4WHxY301qdRSSF1MuVxWeamqmQsKgSLgswfKrNcXdK Srog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696776466; x=1697381266; 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=UxpwSqGgQqfUftZ8s1PijK3lbGN3T2XSK6NbqvWqwyo=; b=NglOcbUJkqvKgQHek9Et3nx0ki3SyObjNk+UH5Frymz1na0y4EmSi8Ec80fSo/vXH3 IifsS0x5ofGTyIq5EGlBc1hIx/Nn6q6Ki0O+iUg5CJ/7uDCZf8iYSP//e0wbP6yAldyt kjwGfYd/hQC89dY+8ZbR2ojbR2z7FU3VzTAKCmujhxrr+RcnzrrwR8SimOUHQFVHEBSc UnYGIMfoUY+UKOPOBWqHQm3U9DmCFudiFirRVibbPWc1ii/MN1Hcgnt9bv+nF53ihic8 X85iMzvukIVLv9o4PHflGi12cU73Rb3ke2pasqaU5md4Lvy+udboAgBWWyd422dZJrdm +Xhw== X-Gm-Message-State: AOJu0YyTPexSQawUx0cRkb29FMiTi9269fno+3HGZT5KuWradUNk7pj+ btcM5suNOsKw4ze5pVX+3CA= X-Google-Smtp-Source: AGHT+IFOSBSpX8cQdQfbw/PS6piTqvXLwHK6gpAeW+++dyYHLY/BB4unK6YeGpAMVCwnQ5KjO30Lzw== X-Received: by 2002:a2e:a4a3:0:b0:2c0:a0d:1f0a with SMTP id g3-20020a2ea4a3000000b002c00a0d1f0amr7115587ljm.18.1696776465645; Sun, 08 Oct 2023 07:47:45 -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 q2-20020a2e9682000000b002b9ef00b10csm1663829lji.2.2023.10.08.07.47.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Oct 2023 07:47:45 -0700 (PDT) In-Reply-To: <4F844611-9A1E-409C-9E93-31C073E25453@gmail.com> 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:272095 Archived-At: --Apple-Mail=_59C195E2-5E34-41A7-BA0F-B37E7A82743A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > Is there a way to somehow preprocess a value before the widget = machinery tries to type-match it? If so, we could run CERA through a = centrifuge that moves all symbols to the end of the list. Of course there is, and here is the patch with the centrifuge installed. (It may reorder the list if edited this way but again, this shouldn't be = much of a problem in practice.) --Apple-Mail=_59C195E2-5E34-41A7-BA0F-B37E7A82743A 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..79bf3f07f60 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -748,11 +748,39 @@ 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"))) + ;; Segregate explicit rule specs and rule names in the list before we edit, + ;; to allow the names to be edited using a `set' widget. + :get (lambda (_) + (let ((specs nil) (syms nil)) + (dolist (x compilation-error-regexp-alist) + (push x (if (symbolp x) syms specs))) + (append (nreverse specs) (nreverse syms)))) + :type '(list :tag "Rules" + (repeat :tag "Custom message rules" + :inline t + (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 :tag "Predefined rules" + :inline t + :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=_59C195E2-5E34-41A7-BA0F-B37E7A82743A--