From unknown Sun Jun 15 08:47:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78128: [PATCH] 31.0.50; csharp-mode compilation-mode incorrectly matches filenames when output contains leading spaces Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Apr 2025 09:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 78128 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 78128@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174591909032582 (code B ref -1); Tue, 29 Apr 2025 09:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Apr 2025 09:31:30 +0000 Received: from localhost ([127.0.0.1]:49391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u9hJK-0008TR-4i for submit@debbugs.gnu.org; Tue, 29 Apr 2025 05:31:30 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60226) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u9hJH-0008TA-DB for submit@debbugs.gnu.org; Tue, 29 Apr 2025 05:31:27 -0400 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 1u9hJA-0002O8-GU for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2025 05:31:20 -0400 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u9hJ7-0006bb-RZ for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2025 05:31:19 -0400 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 9BBF411401D1 for ; Tue, 29 Apr 2025 05:31:14 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Tue, 29 Apr 2025 05:31:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1745919074; x=1746005474; bh=lAUpM2oue8 O4CfXvLUiqt8q1GCHwQo8+Xb2ZBMgJGsc=; b=CHXLaYEXKjDHDM4ORo47I+mRVR /nrM4h88Bm0UYORTAYM8kYpthSTtHtwtZ8LvEvz3xsT3Nr3bDgsz+ANHMIM2dqeY 2rFiMn452UtX8xkbBXGczXsMQX/slzbDp1vw+VpAm6dctSn0aNkvvg8MwzBNC4Ph 4P52ejvRA2znfdCbO9at6yLus/YDiSFx1EBWU/4vT8KgNo5pxAOIB0Ty6Awd+ivh WTXbT+VDkMcOAubgRpeXiVT8mjVzWZOeacQ0ba+d03mdhx64uFMJKjVEZl8ZfCgv O/pKO5F+eGWOLVVEDCqambLEjlwCq6Cje7mIl13Tj90fx9RjvFQPrm3Ka+6g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1745919074; x= 1746005474; bh=lAUpM2oue8O4CfXvLUiqt8q1GCHwQo8+Xb2ZBMgJGsc=; b=v PHKSTqGAhqi3rRZ4+ZdnqY9IH/6z9m61AqXmIvc15kamRsxoKd68I2SkOnXg60dI bvyd1iUU4qjhV8sGDZEbKCqlPY7aLGS4ph7RecHCqWXI+4DdqOerjCqz0hC6tkR4 21vVWk/9xtbQ77CJiTubhTiFfwHey0YVSx8gvBJEsVD6oS9IdbXujC28p4wb7r5X Z5LqJQ9qua79+CLPQDcDX49FArI64kX8GuOJu9KjWrf5XkelkPqHNleo7qcQNvY1 8yb211DXlEl+4Vb3kI9l0t2HiCSJNFH92cZFTo3XMNu6k7v8AuKroSB9PHJStJA0 skbQ1o+/Vx0YeL7R0yP8g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieefgeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhtg gguffkfffvofesrgdtmherhhdtjeenucfhrhhomheplfhoshhtvghinhcumfhjpphnihhg shgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvtheqne cuggftrfgrthhtvghrnhepffdtieegteeggffhkefgtdelffdufffgffefvdefffeghedu vdejvdfhvdffveeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepjhhoshhtvghinhesshgvtghurhgvrdhkjhhonhhighhsvghnrdhnvghtpdhn sggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsuhhgqd hgnhhuqdgvmhgrtghssehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 29 Apr 2025 05:31:13 -0400 (EDT) From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Content-Type: multipart/alternative; boundary="Apple-Mail=_A3AEB45E-1A96-4332-A4AC-D2DE11CE766E" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\)) Message-Id: <0B6431AE-B665-461D-8FF4-EAC686012360@secure.kjonigsen.net> Date: Tue, 29 Apr 2025 11:31:02 +0200 X-Mailer: Apple Mail (2.3826.500.181.1.5) Received-SPF: pass client-ip=202.12.124.151; envelope-from=jostein@secure.kjonigsen.net; helo=fout-b8-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) --Apple-Mail=_A3AEB45E-1A96-4332-A4AC-D2DE11CE766E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hey everyone When using csharp-mode (or csharp-ts-mode) in Emacs, and you invoke M-x = compile with "dotnet build", sometimes errors in the compiler output = will contain leading whitespace (especially for nuget errors). The expressions defined in csharp-mode.el does not account for this = leading whitespace, and in those cases will capture it as part of the = filename where the error occurred. This leads to failure to navigate to = the point of error. Attached is a patch which corrects this bug. =E2=80=94 Kind Regards Jostein Kj=C3=B8nigsen =EF=BF=BC= --Apple-Mail=_A3AEB45E-1A96-4332-A4AC-D2DE11CE766E Content-Type: multipart/mixed; boundary="Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2" --Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hey = everyone

When using csharp-mode (or csharp-ts-mode) = in Emacs, and you invoke M-x compile with "dotnet build", sometimes = errors in the compiler output will contain leading whitespace = (especially for nuget errors).

The expressions = defined in csharp-mode.el does not account for this leading whitespace, = and in those cases will capture it as part of the filename where the = error occurred. This leads to failure to navigate to the point of = error.

Attached is a patch which corrects this = bug.

=E2=80=94
Kind Regards
Jostein = Kj=C3=B8nigsen


= --Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2 Content-Disposition: attachment; filename=0001-csharp-mode.el-fix-incorrect-compilation-mode-matche.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-csharp-mode.el-fix-incorrect-compilation-mode-matche.patch" Content-Transfer-Encoding: quoted-printable =46rom=202afab388e81ccb0f0a3fef7853be38d95def8569=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Jostein=3D20Kj=3DC3=3DB8nigsen?=3D=20= =0ADate:=20Fri,=2025=20Apr=202025=2015:29:31=20= +0200=0ASubject:=20[PATCH]=20csharp-mode.el:=20fix=20incorrect=20= compilation-mode=20matches=0A=0A-=20csharp-compilation-re-dotnet-error:=20= ignore=20leading=20whitespace=0A-=20= csharp-compilation-re-dotnet-warning:=20ignore=20leading=20whitespace=0A= ---=0A=20lisp/progmodes/csharp-mode.el=20|=204=20++--=0A=201=20file=20= changed,=202=20insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/csharp-mode.el=20b/lisp/progmodes/csharp-mode.el=0A= index=20db5777b64b5..12c6a169016=20100644=0A---=20= a/lisp/progmodes/csharp-mode.el=0A+++=20b/lisp/progmodes/csharp-mode.el=0A= @@=20-584,10=20+584,10=20@@=20csharp-compilation-re-xbuild-warning=0A=20=20= =20"Regexp=20to=20match=20compilation=20warning=20from=20xbuild.")=0A=20=0A= =20(defconst=20csharp-compilation-re-dotnet-error=0A-=20=20= "\\([^\r\n]+\\)=20:=20error=20[A-Z]+[0-9]+:")=0A+=20=20= "[[:blank:]]*\\([^\r\n]+\\)=20:=20error=20[A-Z]+[0-9]+:")=0A=20=0A=20= (defconst=20csharp-compilation-re-dotnet-warning=0A-=20=20= "\\([^\r\n]+\\)=20:=20warning=20[A-Z]+[0-9]+:")=0A+=20=20= "[[:blank:]]*\\([^\r\n]+\\)=20:=20warning=20[A-Z]+[0-9]+:")=0A=20=0A=20= (defconst=20csharp-compilation-re-dotnet-testfail=0A=20=20=20(concat=0A= --=20=0A2.49.0=0A=0A= --Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
--Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2-- --Apple-Mail=_A3AEB45E-1A96-4332-A4AC-D2DE11CE766E-- From unknown Sun Jun 15 08:47:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Subject: bug#78128: closed (Re: bug#78128: [PATCH] 31.0.50; csharp-mode compilation-mode incorrectly matches filenames when output contains leading spaces) Message-ID: References: <0B6431AE-B665-461D-8FF4-EAC686012360@secure.kjonigsen.net> X-Gnu-PR-Message: they-closed 78128 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 78128@debbugs.gnu.org Date: Thu, 01 May 2025 07:55:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1746086102-15517-1" This is a multi-part message in MIME format... ------------=_1746086102-15517-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #78128: [PATCH] 31.0.50; csharp-mode compilation-mode incorrectly matches f= ilenames when output contains leading spaces which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 78128@debbugs.gnu.org. --=20 78128: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78128 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1746086102-15517-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 78128-done) by debbugs.gnu.org; 1 May 2025 07:54:21 +0000 Received: from localhost ([127.0.0.1]:48227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uAOkO-00040Q-Of for submit@debbugs.gnu.org; Thu, 01 May 2025 03:54:21 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:46532) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uAOkL-000405-W3 for 78128-done@debbugs.gnu.org; Thu, 01 May 2025 03:54:19 -0400 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-b170c99aa49so441847a12.1 for <78128-done@debbugs.gnu.org>; Thu, 01 May 2025 00:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746086052; x=1746690852; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Bw/qvdphtyQKfHRdnvv+pN1giZi+OFomwVVfx1tCSlc=; b=A8z8SRiH8UHTBqIKWFLS3baWTS4mrFzkgji5K0kVFkfEHTrrfuis6OtDB1Z/FJhd2Y ywR/B1hQD/nRPyj9ZBxA8ZuPVLB5sq8XxCzOg6N/8y2P6orObISw4b1Ai7gzgkSGP19e bareEA96LWoS/t66+zkdjZvEuTWIf3OSnS9XQrbIPiZmJyK9f61LHb6eJMiuZyKxpuYP Fc/pf2twYHROi4cf2saNLIE/RsDbnvd2/ulPRImerNyITJTW6ZDelGT9sXAqlXfLcuRT qZxN22ldk9dj2pRvHhMlknkQoHXVr944peRaKhtKEHEV8cIdtsKB8wsiiZknQirDbqIN gYVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746086052; x=1746690852; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bw/qvdphtyQKfHRdnvv+pN1giZi+OFomwVVfx1tCSlc=; b=fEh8Qcd0uqNpG5NY2+Loi6Kh5yHLEt26lHAhIXWaKNBugSdPwiEctOmemOa9kkU1uB I5pCxO/3zjTbSBYfpNoavmuYxHzdx01D62MAGpDLoZmH7t76QGBzf09qJ8voYo6yONyR pDvfiX1o/MZMuYQhEkvOOE5eS2QZts//641+DAL2C1XUnT95Kqh4RDgUFShI7v55Q9/E IakZUR7vDYkexne8lozcWiN9uT2Q2WGvP+HBsQ8XGzlm5yl5ppSAblPtbIC9jAfFGpXw d5UhNPnX5EUMzf/4NAFlBGT1rn5yxxQvyxjLwjhuddN5k3YxrhFfEo6emUUB/FivqYgw VLpw== X-Gm-Message-State: AOJu0YwUt45Ra2kzjZzq24WtJdhHwiIXiRraVsIYrkK9cXsfdmPmcQwF 70mHuuLwbjQvZC/843cge57l2zXncvejyNUjVyxcHIgKmiUK1rjvMjGCEg== X-Gm-Gg: ASbGncshG/EqgIqRnKEKrW8x+xQXIBQx1dsa9kNeMCO2WWTgXu7IZBVYhY9xaDIa3bG oqo03F9S34FS3ifvDD3WMjaX0hsvFQSeQDn3KY8wNPvcSHI5xiTFP9Y6DZ+ZnKj6dzZ2ErBXxdi 60JaGIUnTV0MgH3DqfCb2ny+gQORo0SW49/fcLX82eDfMyZb61u8KK+0zIFQhbWn9/D6pP8ZgbD 0EfK2SHdiq2K+VJ9+e4GM0/MqGN4BK0do8bZEJ0fidwa867VGxfu0AjmVfrs6Uhfx3EgW9BNvVG O9bxfUpH5cWd/VjCGv6j7mTqu+/aROhdvUKueMqDuqYB41624vEMT7lfVCykfL4U X-Google-Smtp-Source: AGHT+IGZkam0Gv9r4MqEzAA0X9DnpaU5Qjwi+nFOQ3L+hPDufZJTKSvDKn3V2Ghyt37MLjvhDdWmeA== X-Received: by 2002:a17:90b:53d0:b0:30a:2162:c76a with SMTP id 98e67ed59e1d1-30a3335f48cmr9158813a91.25.1746086051532; Thu, 01 May 2025 00:54:11 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:18f0:f917:9183:850d]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22e0bc7b0aasm1442065ad.169.2025.05.01.00.54.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 May 2025 00:54:10 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\)) Subject: Re: bug#78128: [PATCH] 31.0.50; csharp-mode compilation-mode incorrectly matches filenames when output contains leading spaces From: Yuan Fu In-Reply-To: <0B6431AE-B665-461D-8FF4-EAC686012360@secure.kjonigsen.net> Date: Thu, 1 May 2025 00:53:59 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <0B6431AE-B665-461D-8FF4-EAC686012360@secure.kjonigsen.net> To: =?utf-8?Q?Jostein_Kj=C3=B8nigsen?= X-Mailer: Apple Mail (2.3826.500.181.1.5) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78128-done Cc: 78128-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Apr 29, 2025, at 2:31=E2=80=AFAM, Jostein Kj=C3=B8nigsen = wrote: >=20 > Hey everyone >=20 > When using csharp-mode (or csharp-ts-mode) in Emacs, and you invoke = M-x compile with "dotnet build", sometimes errors in the compiler output = will contain leading whitespace (especially for nuget errors). >=20 > The expressions defined in csharp-mode.el does not account for this = leading whitespace, and in those cases will capture it as part of the = filename where the error occurred. This leads to failure to navigate to = the point of error. >=20 > Attached is a patch which corrects this bug. Thanks! I applied the patch to emacs-30 since it=E2=80=99s a bug fix. = BTW, checkout the CONTRIBUTE file under emacs repo root for the commit = message convention. You can also just take a look at the commit messages = in git history. If you use magit, you can just press C with point in a = hunk to automatically insert the correct commit message entry to the = commit message buffer. Yuan= ------------=_1746086102-15517-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Apr 2025 09:31:30 +0000 Received: from localhost ([127.0.0.1]:49391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u9hJK-0008TR-4i for submit@debbugs.gnu.org; Tue, 29 Apr 2025 05:31:30 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60226) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u9hJH-0008TA-DB for submit@debbugs.gnu.org; Tue, 29 Apr 2025 05:31:27 -0400 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 1u9hJA-0002O8-GU for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2025 05:31:20 -0400 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u9hJ7-0006bb-RZ for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2025 05:31:19 -0400 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 9BBF411401D1 for ; Tue, 29 Apr 2025 05:31:14 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Tue, 29 Apr 2025 05:31:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1745919074; x=1746005474; bh=lAUpM2oue8 O4CfXvLUiqt8q1GCHwQo8+Xb2ZBMgJGsc=; b=CHXLaYEXKjDHDM4ORo47I+mRVR /nrM4h88Bm0UYORTAYM8kYpthSTtHtwtZ8LvEvz3xsT3Nr3bDgsz+ANHMIM2dqeY 2rFiMn452UtX8xkbBXGczXsMQX/slzbDp1vw+VpAm6dctSn0aNkvvg8MwzBNC4Ph 4P52ejvRA2znfdCbO9at6yLus/YDiSFx1EBWU/4vT8KgNo5pxAOIB0Ty6Awd+ivh WTXbT+VDkMcOAubgRpeXiVT8mjVzWZOeacQ0ba+d03mdhx64uFMJKjVEZl8ZfCgv O/pKO5F+eGWOLVVEDCqambLEjlwCq6Cje7mIl13Tj90fx9RjvFQPrm3Ka+6g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1745919074; x= 1746005474; bh=lAUpM2oue8O4CfXvLUiqt8q1GCHwQo8+Xb2ZBMgJGsc=; b=v PHKSTqGAhqi3rRZ4+ZdnqY9IH/6z9m61AqXmIvc15kamRsxoKd68I2SkOnXg60dI bvyd1iUU4qjhV8sGDZEbKCqlPY7aLGS4ph7RecHCqWXI+4DdqOerjCqz0hC6tkR4 21vVWk/9xtbQ77CJiTubhTiFfwHey0YVSx8gvBJEsVD6oS9IdbXujC28p4wb7r5X Z5LqJQ9qua79+CLPQDcDX49FArI64kX8GuOJu9KjWrf5XkelkPqHNleo7qcQNvY1 8yb211DXlEl+4Vb3kI9l0t2HiCSJNFH92cZFTo3XMNu6k7v8AuKroSB9PHJStJA0 skbQ1o+/Vx0YeL7R0yP8g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieefgeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhtg gguffkfffvofesrgdtmherhhdtjeenucfhrhhomheplfhoshhtvghinhcumfhjpphnihhg shgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvtheqne cuggftrfgrthhtvghrnhepffdtieegteeggffhkefgtdelffdufffgffefvdefffeghedu vdejvdfhvdffveeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepjhhoshhtvghinhesshgvtghurhgvrdhkjhhonhhighhsvghnrdhnvghtpdhn sggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsuhhgqd hgnhhuqdgvmhgrtghssehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 29 Apr 2025 05:31:13 -0400 (EDT) From: =?utf-8?Q?Jostein_Kj=C3=B8nigsen?= Content-Type: multipart/alternative; boundary="Apple-Mail=_A3AEB45E-1A96-4332-A4AC-D2DE11CE766E" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\)) Subject: [PATCH] 31.0.50; csharp-mode compilation-mode incorrectly matches filenames when output contains leading spaces Message-Id: <0B6431AE-B665-461D-8FF4-EAC686012360@secure.kjonigsen.net> Date: Tue, 29 Apr 2025 11:31:02 +0200 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3826.500.181.1.5) Received-SPF: pass client-ip=202.12.124.151; envelope-from=jostein@secure.kjonigsen.net; helo=fout-b8-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) --Apple-Mail=_A3AEB45E-1A96-4332-A4AC-D2DE11CE766E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hey everyone When using csharp-mode (or csharp-ts-mode) in Emacs, and you invoke M-x = compile with "dotnet build", sometimes errors in the compiler output = will contain leading whitespace (especially for nuget errors). The expressions defined in csharp-mode.el does not account for this = leading whitespace, and in those cases will capture it as part of the = filename where the error occurred. This leads to failure to navigate to = the point of error. Attached is a patch which corrects this bug. =E2=80=94 Kind Regards Jostein Kj=C3=B8nigsen =EF=BF=BC= --Apple-Mail=_A3AEB45E-1A96-4332-A4AC-D2DE11CE766E Content-Type: multipart/mixed; boundary="Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2" --Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hey = everyone

When using csharp-mode (or csharp-ts-mode) = in Emacs, and you invoke M-x compile with "dotnet build", sometimes = errors in the compiler output will contain leading whitespace = (especially for nuget errors).

The expressions = defined in csharp-mode.el does not account for this leading whitespace, = and in those cases will capture it as part of the filename where the = error occurred. This leads to failure to navigate to the point of = error.

Attached is a patch which corrects this = bug.

=E2=80=94
Kind Regards
Jostein = Kj=C3=B8nigsen


= --Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2 Content-Disposition: attachment; filename=0001-csharp-mode.el-fix-incorrect-compilation-mode-matche.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-csharp-mode.el-fix-incorrect-compilation-mode-matche.patch" Content-Transfer-Encoding: quoted-printable =46rom=202afab388e81ccb0f0a3fef7853be38d95def8569=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Jostein=3D20Kj=3DC3=3DB8nigsen?=3D=20= =0ADate:=20Fri,=2025=20Apr=202025=2015:29:31=20= +0200=0ASubject:=20[PATCH]=20csharp-mode.el:=20fix=20incorrect=20= compilation-mode=20matches=0A=0A-=20csharp-compilation-re-dotnet-error:=20= ignore=20leading=20whitespace=0A-=20= csharp-compilation-re-dotnet-warning:=20ignore=20leading=20whitespace=0A= ---=0A=20lisp/progmodes/csharp-mode.el=20|=204=20++--=0A=201=20file=20= changed,=202=20insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/csharp-mode.el=20b/lisp/progmodes/csharp-mode.el=0A= index=20db5777b64b5..12c6a169016=20100644=0A---=20= a/lisp/progmodes/csharp-mode.el=0A+++=20b/lisp/progmodes/csharp-mode.el=0A= @@=20-584,10=20+584,10=20@@=20csharp-compilation-re-xbuild-warning=0A=20=20= =20"Regexp=20to=20match=20compilation=20warning=20from=20xbuild.")=0A=20=0A= =20(defconst=20csharp-compilation-re-dotnet-error=0A-=20=20= "\\([^\r\n]+\\)=20:=20error=20[A-Z]+[0-9]+:")=0A+=20=20= "[[:blank:]]*\\([^\r\n]+\\)=20:=20error=20[A-Z]+[0-9]+:")=0A=20=0A=20= (defconst=20csharp-compilation-re-dotnet-warning=0A-=20=20= "\\([^\r\n]+\\)=20:=20warning=20[A-Z]+[0-9]+:")=0A+=20=20= "[[:blank:]]*\\([^\r\n]+\\)=20:=20warning=20[A-Z]+[0-9]+:")=0A=20=0A=20= (defconst=20csharp-compilation-re-dotnet-testfail=0A=20=20=20(concat=0A= --=20=0A2.49.0=0A=0A= --Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
--Apple-Mail=_2F0ECB72-C8D4-447B-A672-8E77475C50E2-- --Apple-Mail=_A3AEB45E-1A96-4332-A4AC-D2DE11CE766E-- ------------=_1746086102-15517-1--