From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55477: 29.0.50; flymake-goto-next-eror shows terminal like color codes in mini buffer Date: Thu, 19 May 2022 11:06:08 +0300 Message-ID: <8335h6dk0f.fsf@gnu.org> References: <87a6bg5wrt.fsf@codeisgreat.org> <87wnekktos.fsf@gnus.org> <87v8u43xq1.fsf@codeisgreat.org> <87sfp8krgy.fsf@gnus.org> <878rr0dolv.fsf@codeisgreat.org> <874k1ojakj.fsf@gnus.org> <875ym3ikht.fsf@codeisgreat.org> <87leuzdqxz.fsf@gnus.org> <0d94334a-0ae2-d4b0-f448-e05196ef8951@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6490"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, larsi@gnus.org, 55477@debbugs.gnu.org, pankaj@codeisgreat.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 19 10:07:31 2022 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 1nrbBy-0001WG-Ry for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 10:07:31 +0200 Original-Received: from localhost ([::1]:56682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrbBx-0005dK-Dt for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 04:07:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrbBW-0005aW-Oi for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 04:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrbBW-0004CR-G8 for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 04:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrbBW-0004g7-9g for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 04:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 May 2022 08:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55477 X-GNU-PR-Package: emacs Original-Received: via spool by 55477-submit@debbugs.gnu.org id=B55477.165294759217943 (code B ref 55477); Thu, 19 May 2022 08:07:02 +0000 Original-Received: (at 55477) by debbugs.gnu.org; 19 May 2022 08:06:32 +0000 Original-Received: from localhost ([127.0.0.1]:34407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrbB2-0004fL-28 for submit@debbugs.gnu.org; Thu, 19 May 2022 04:06:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrbAz-0004f7-US for 55477@debbugs.gnu.org; Thu, 19 May 2022 04:06:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrbAt-00044K-7y; Thu, 19 May 2022 04:06:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=cfccbMXnhAExjGvZIGV3O/81eJDfTmuTqSi0TJ0vn+4=; b=BaApGW5aW00/AUNcavSz 72FrXU46597FrwJCARiZ951ezgsEkLCiOLw18t+xQ8l09pkyuweIYKghvI/ERaxbgQ5eWmtQ/n7x/ NlKc1BmRAh0Tj/T3KYuOZXmH64akgK918jDDUk/3peFwju768pz5zUF8GlDVcnv0Alnesw/0gb92K N7etIYeiR76htQMGyQimpzPtz7C1y9NtWQtNWQbAYMlBsmcHTE9TiEw3x24t+oOrTPPeb+t1bgBGa rXYpXfTf4d+5okjzfFG3OIV1YaJ2S/Mu1ZOHmrYLoNg47ZCkZnEu/mAp1GDxvpQR2SJcFbQh2X9dP X1xGiMd0iNNxGA==; Original-Received: from [87.69.77.57] (port=3422 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrbAj-0004rV-R0; Thu, 19 May 2022 04:06:19 -0400 In-Reply-To: <0d94334a-0ae2-d4b0-f448-e05196ef8951@cs.ucla.edu> (message from Paul Eggert on Wed, 18 May 2022 13:11:46 -0700) 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" Xref: news.gmane.io gmane.emacs.bugs:232628 Archived-At: > Cc: Alan Mackenzie , 55477@debbugs.gnu.org, > Pankaj Jangid > Date: Wed, 18 May 2022 13:11:46 -0700 > From: Paul Eggert > > On 5/18/22 04:24, Lars Ingebrigtsen wrote: > >> The above expression is returning "curve"; in all three environments, > >> > >> en_US.UTF-8 > >> en_IN.UTF-8 > >> en_IN > > That seems like a bug, because in the final environment, Emacs doesn't > > seem to be able to display the curved quote. > > But Emacs *can* display curved quotes in that environment. It's > misdisplaying them as individual bytes, and that's the bug: it should > simply display the characters as-is. > > This bug is not limited to quotes. Put this into a file t.el: > > (defun δ-replace-string (from-string to-string) > (declare (interactive-only > "use `search-forward' and `replace-match' instead.")) > (interactive)) > > (defun test-fun (obj) > (if (stringp obj) > (δ-replace-string "from" "to"))) > > run "LC_ALL=en_IN emacs -Q", visit the file, evaluate the first form, > and then do M-x flymake-mode followed by repeated uses of M-x > flymake-goto-next-error. It will eventually report the diagnostic: > > ‘δ-replace-string’ is for interactive use only; use ‘search-forward’ > and ‘replace-match’ instead. > > That is, the "δ" (which in UTF-8 is #xCE #xB4) is misinterpreted as the > two Latin-1 characters Î (#xCE) and ´ (#xB4). Thanks for the test case. This has nothing to do with quoting style, nor with Alan's "symbols with positions" changes. The problem was that Flymake doesn't by itself know which encoding to use for the files it checks and for communicating with backend processes; when that is specific to the major-mode (as in the case of ELisp, where we use UTF-8 by default), the backend should arrange for that. I hope I fixed that now on the master branch.