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#61104: 29.0.60; typescript-ts-mode does not provide compilation-mode support Date: Mon, 6 Feb 2023 12:19:32 +0100 Message-ID: <2F86FB50-87F7-432D-B87A-1738056907AB@gmail.com> References: <792EC2CE-006B-42F1-81C2-453E71C2173C@gmail.com> <12a97d26-90cc-4a25-61a5-5aff33915610@secure.kjonigsen.net> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_C3F4CE4C-5452-4678-94B8-8B2450BEA8B2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10387"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 61104@debbugs.gnu.org, Theodor Thornhill , Eli Zaretskii To: jostein@kjonigsen.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 06 12:20:36 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 1pOzY1-0002Ix-Rf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Feb 2023 12:20:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOzXf-0003dM-Hq; Mon, 06 Feb 2023 06:20:11 -0500 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 1pOzXX-0003b1-El for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2023 06:20:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pOzXX-0002jw-2U for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2023 06:20:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pOzXW-0001F5-IQ for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2023 06:20:02 -0500 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: Mon, 06 Feb 2023 11:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61104 X-GNU-PR-Package: emacs Original-Received: via spool by 61104-submit@debbugs.gnu.org id=B61104.16756823824738 (code B ref 61104); Mon, 06 Feb 2023 11:20:02 +0000 Original-Received: (at 61104) by debbugs.gnu.org; 6 Feb 2023 11:19:42 +0000 Original-Received: from localhost ([127.0.0.1]:47475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOzXB-0001EM-Se for submit@debbugs.gnu.org; Mon, 06 Feb 2023 06:19:42 -0500 Original-Received: from mail-ed1-f43.google.com ([209.85.208.43]:43712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOzXA-0001E4-FY for 61104@debbugs.gnu.org; Mon, 06 Feb 2023 06:19:40 -0500 Original-Received: by mail-ed1-f43.google.com with SMTP id m8so11247761edd.10 for <61104@debbugs.gnu.org>; Mon, 06 Feb 2023 03:19:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=GcFkSSYyTyYIFBo2siaKo6mOuYIZ2mQvVtFu0NFbGiA=; b=PrWuka7rDAe1KV6WRgDpSR8SPv/R/s4HGv0LMD0bAq8zXlF+Frk1St8TE1T3l3YkPT BOdSZFYk6ZebYk8CL16bqQySLBfQH7IuUYTHNlkjm3hgLP+XCn3Uh1Wg+YzZYnDhnz3i svscZnljxo7wY2HjcU7IrwW0OLyO5dy0yN1rZd65cnXjbRtgxep3176hRPq2eeXoHPtW 5POzjI1RXdU7LtQTsJENbc1fnyd/a8rNyC64GdIrBodD2Lkvcnt+i0E4ko7YiK1eoD22 /gU/N6SzzG5jVv+YeQpSZQtbAjOz2KRywlH6h3urgJmwjbQAaurxETgZRSwnh6ZydQxp peWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=GcFkSSYyTyYIFBo2siaKo6mOuYIZ2mQvVtFu0NFbGiA=; b=dwTzRqbsqQ2uoGT16NRpsNPrknm4yrpT77CMx4crp9zxeojX/dd752UnV80TAQCxD4 V8Dx/CNnOKVptjnR+7LTU2Oq7HbwuSdQWd7mm50bWvHNRKJxNezMYw4WKO0InA873Zvs 6/Cxq1cbpKiZvuB4ZO4WrXsirmswXCtZoVvgYa8139JWrUXV8Zru7BXmaB+ZCjlQ8zAX ULgt5DArEQ0HQCnuJPTtmsEDvIuojDignCP7ynsDDWVr6gk3TMTa4lshpxmAbZi6IqMG Dt73sWUa9JD3Ys7KInq05X8GbD16FlHIUmGpzHVH6ggNiVdBmfmx7pRGP1a5DKSYu09x oZmQ== X-Gm-Message-State: AO0yUKWKdAifN58//GcZVSeNjO78CwdWZ826pFSqGIOo5EOjL3jnzXGY 3KZHnYWisnYxxB7i/HiReQU= X-Google-Smtp-Source: AK7set+NYMMudWvcUCbfW99MWf36BcoK4UqFcYYIGwkm7/R/LqUu4loQMX//Uc+4njB5uVMlVrahXw== X-Received: by 2002:a50:aade:0:b0:4aa:b26f:1a0a with SMTP id r30-20020a50aade000000b004aab26f1a0amr4299695edc.27.1675682374392; Mon, 06 Feb 2023 03:19:34 -0800 (PST) Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se. [188.150.171.209]) by smtp.gmail.com with ESMTPSA id b15-20020a509f0f000000b004aaa3c872d0sm2946324edf.87.2023.02.06.03.19.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2023 03:19:34 -0800 (PST) In-Reply-To: <12a97d26-90cc-4a25-61a5-5aff33915610@secure.kjonigsen.net> X-Mailer: Apple Mail (2.3654.120.0.1.14) 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:254950 Archived-At: --Apple-Mail=_C3F4CE4C-5452-4678-94B8-8B2450BEA8B2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 5 feb. 2023 kl. 21.36 skrev Jostein Kj=C3=B8nigsen = : > Attached is a patch which codifies all these changes, and from what I = can tell, still does the job. You make take it as is, or you may further = work on it, if you think that is still needed. Thank you! I translated the regexps to rx (which I personally find more = maintainable and has plenty of precedence in this context) and tightened = them up further. They are now anchored at beginning-of-line again, and = file names cannot start with whitespace (for disambiguation and speed). I also removed the part that matches the actual message text since it = isn't needed, and it would highlight (with an underline in the standard = theme) the whole text which is a bit ungainly to read. If the message is = multi-line, which earlier examples in this discussions indicated might = be the case, then only the first would be highlighted this way which = wasn't ideal either. Patch attached, please tell me what you think. Does tsc distinguish between warnings, errors, and 'informational' = messages (such as locations of interest that are not errors in their own = right)? The examples you supplied all had the word "error" in a = prominent place. It would be possible to join the two tsc rules into a single one which = would be slightly faster, but having them separate could also be an = advantage since it would allow for them to be disabled individually in = case of clashes. --Apple-Mail=_C3F4CE4C-5452-4678-94B8-8B2450BEA8B2 Content-Disposition: attachment; filename=0001-Simplify-typescript-compilation-mode-patterns-bug-61.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Simplify-typescript-compilation-mode-patterns-bug-61.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d6d336cfe588dd5d8a5bf647c5beb9e45b47ef3d=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Mon,=206=20Feb=202023=2011:45:33=20+0100=0A= Subject:=20[PATCH]=20Simplify=20typescript=20compilation-mode=20patterns=20= (bug#61104)=0AMIME-Version:=201.0=0AContent-Type:=20text/plain;=20= charset=3DUTF-8=0AContent-Transfer-Encoding:=208bit=0A=0A*=20= lisp/progmodes/compile.el=20(compilation-error-regexp-alist-alist):=0A= Tighten=20regexps=20and=20simplify.=20=20Translate=20to=20rx.=0A*=20= etc/compilation.txt:=20Add=20examples.=0A=0AIn=20collaboration=20with=20= Jostein=20Kj=C3=B8nigsen.=0A---=0A=20etc/compilation.txt=20=20=20=20=20=20= =20|=2014=20++++++++++++++=0A=20lisp/progmodes/compile.el=20|=2028=20= ++++++++++++++++++++--------=0A=202=20files=20changed,=2034=20= insertions(+),=208=20deletions(-)=0A=0Adiff=20--git=20= a/etc/compilation.txt=20b/etc/compilation.txt=0Aindex=20= 672cbebafff..5f6ecb09cc2=20100644=0A---=20a/etc/compilation.txt=0A+++=20= b/etc/compilation.txt=0A@@=20-639,6=20+639,20=20@@=20symbol:=20weblint=0A= =20index.html=20(13:1)=20Unknown=20element=20=0A=20=0A=20=0A+*=20= Typescript=20prior=20to=20tsc=20version=202.7,=20"plain"=20format=0A+=0A= +symbol:=20typescript-tsc-plain=0A+=0A+greeter.ts(30,12):=20error=20= TS2339:=20Property=20'foo'=20does=20not=20exist.=0A+=0A+=0A+*=20= Typescript=20after=20tsc=20version=202.7,=20"pretty"=20format=0A+=0A= +symbol:=20typescript-tsc-pretty=0A+=0A+src/resources/document.ts:140:22=20= -=20error=20TS2362:=20something.=0A+=0A+=0A=20*=20Directory=20tracking=0A= =20=0A=20Directories=20are=20matched=20via=20= 'compilation-directory-matcher'.=20=20Files=20which=20are=0Adiff=20--git=20= a/lisp/progmodes/compile.el=20b/lisp/progmodes/compile.el=0Aindex=20= 1e57d0b7bb2..ccf64fb670b=20100644=0A---=20a/lisp/progmodes/compile.el=0A= +++=20b/lisp/progmodes/compile.el=0A@@=20-653,19=20+653,31=20@@=20= compilation-error-regexp-alist-alist=0A=20=20=20=20=20;;=20Typescript=20= compilation=20prior=20to=20tsc=20version=202.7,=20"plain"=20format:=0A=20= =20=20=20=20;;=20greeter.ts(30,12):=20error=20TS2339:=20Property=20'foo'=20= does=20not=20exist.=0A=20=20=20=20=20(typescript-tsc-plain=0A-=20=20=20=20= =20,(concat=0A-=20=20=20=20=20=20"^[[:blank:]]*"=0A-=20=20=20=20=20=20= "\\([^(\r\n)]+\\)(\\([0-9]+\\),\\([0-9]+\\)):[[:blank:]]+"=0A-=20=20=20=20= =20=20"error=20[[:alnum:]]+:=20[^\r\n]+$")=0A+=20=20=20=20=20,(rx=20bol=0A= +=20=20=20=20=20=20=20=20=20=20(group=20(not=20(in=20"=20\t\n()"))=20=20=20= ;=201:=20file=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(*=20= (not=20(in=20"\n()"))))=0A+=20=20=20=20=20=20=20=20=20=20"("=0A+=20=20=20= =20=20=20=20=20=20=20(group=20(+=20(in=20"0-9")))=20=20=20=20=20=20=20=20= ;=202:=20line=0A+=20=20=20=20=20=20=20=20=20=20","=0A+=20=20=20=20=20=20=20= =20=20=20(group=20(+=20(in=20"0-9")))=20=20=20=20=20=20=20=20;=203:=20= column=0A+=20=20=20=20=20=20=20=20=20=20"):=20error=20"=0A+=20=20=20=20=20= =20=20=20=20=20(+=20(in=20"0-9A-Z"))=20=20=20=20=20=20=20=20=20=20=20=20=20= ;=20error=20code=0A+=20=20=20=20=20=20=20=20=20=20":=20")=0A=20=20=20=20=20= =201=202=203=202)=0A=20=0A=20=20=20=20=20;;=20Typescript=20compilation=20= after=20tsc=20version=202.7,=20"pretty"=20format:=0A=20=20=20=20=20;;=20= src/resources/document.ts:140:22=20-=20error=20TS2362:=20something.=0A=20= =20=20=20=20(typescript-tsc-pretty=0A-=20=20=20=20=20,(concat=0A-=20=20=20= =20=20=20=20"^[[:blank:]]*"=0A-=20=20=20=20=20=20=20= "\\([^(\r\n)]+\\):\\([0-9]+\\):\\([0-9]+\\)=20-=20[[:blank:]]*"=0A-=20=20= =20=20=20=20=20"error=20[[:alnum:]]+:=20[^\r\n]+$")=0A+=20=20=20=20=20= ,(rx=20bol=0A+=20=20=20=20=20=20=20=20=20=20(group=20(not=20(in=20"=20= \t\n()"))=20=20=20;=201:=20file=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(*=20(not=20(in=20"\n()"))))=0A+=20=20=20=20=20=20=20=20=20=20= ":"=0A+=20=20=20=20=20=20=20=20=20=20(group=20(+=20(in=20"0-9")))=20=20=20= =20=20=20=20=20;=202:=20line=0A+=20=20=20=20=20=20=20=20=20=20":"=0A+=20=20= =20=20=20=20=20=20=20=20(group=20(+=20(in=20"0-9")))=20=20=20=20=20=20=20= =20;=203:=20column=0A+=20=20=20=20=20=20=20=20=20=20"=20-=20error=20"=0A= +=20=20=20=20=20=20=20=20=20=20(+=20(in=20"0-9A-Z"))=20=20=20=20=20=20=20= =20=20=20=20=20=20;=20error=20code=0A+=20=20=20=20=20=20=20=20=20=20":=20= ")=0A=20=20=20=20=20=201=202=203=202)=0A=20=20=20=20=20))=0A=20=20=20= "Alist=20of=20values=20for=20`compilation-error-regexp-alist'.")=0A--=20=0A= 2.32.0=20(Apple=20Git-132)=0A=0A= --Apple-Mail=_C3F4CE4C-5452-4678-94B8-8B2450BEA8B2--