From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed Date: Sat, 18 May 2024 10:58:05 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8108"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Vangelis Evangelou , 70816@debbugs.gnu.org To: Arash Esbati Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 18 16:59:13 2024 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 1s8LWj-0001t2-13 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 May 2024 16:59:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8LWY-0005AX-Mh; Sat, 18 May 2024 10:59:02 -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 1s8LWU-0005AB-Rv for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 10:59:00 -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 1s8LWU-0000Mf-HA for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 10:58:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8LWX-0005Om-Uh for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 10:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 May 2024 14:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70816 X-GNU-PR-Package: emacs Original-Received: via spool by 70816-submit@debbugs.gnu.org id=B70816.171604429620711 (code B ref 70816); Sat, 18 May 2024 14:59:01 +0000 Original-Received: (at 70816) by debbugs.gnu.org; 18 May 2024 14:58:16 +0000 Original-Received: from localhost ([127.0.0.1]:33916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8LVo-0005Nz-4M for submit@debbugs.gnu.org; Sat, 18 May 2024 10:58:16 -0400 Original-Received: from mxout1.mail.janestreet.com ([38.105.200.78]:49809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8LVm-0005Nr-0V for 70816@debbugs.gnu.org; Sat, 18 May 2024 10:58:14 -0400 In-Reply-To: (Spencer Baugh's message of "Sat, 18 May 2024 10:51:35 -0400") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1716044285; bh=cahzbaKZqIvO6E91ZJDzNGN3xZJ6KDCmBEbmvVEZUBw=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=xqEQh/+/TGhIvZnvuNu6FGzeeFDvDykXMm4W0ToZ9Wwfgw3J08RAUio2lc8ZeuGC/ NjhggQHPljLLnGSOSOuUsFNpBNDti9xKcIjc0lNlU+F7XD7AViqXkzWtSKQSfi7Fse 5sZKnyETUxIgmUwY+3btI8yOlbCm2810PwvGDeSeKeqP1EaVhw+kHxPFoIti7+9oqL YQ9Xo7SgUXz5LSl647xMnmPF58poXZlCuQy0KIDgparaE6N8bIxdmXVGkovGz28HSf 8Uju26y/kcggK/Aqdmxh3ZoqvDfpGQuR+q+GXyjk7BqyoJZ0QUHQA3I2LgKzZ9qmvF UgILDr6qKmJrQ== 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:285342 Archived-At: Spencer Baugh writes: > Can you test with the following patch, please? Context: It looks like the latex-mode flymake diagnostic function, tex-chktex, widens before sending the buffer contents to the external linter process. So the line numbers of errors are reported relative to the widened buffer, not the narrowed buffer. A number of different checkers in Emacs seem to do the same thing. The bug is that these checkers call flymake-diag-region to translate the line numbers into buffer positions. But flymake-diag-region does not widen the buffer when doing this translation, so it fails. I expect you have some flymake logs of the form "Invalid region line=%s col=%s". when triggering this bug. Probably the right fix in flymake is to make flymake-diag-region widen, as in the patch I posted, but that's a bit of a behavior change... will think about it, but it's probably fine.