From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#51549: 29.0.50; flymake error when filename contain '%' Date: Sat, 6 Nov 2021 01:30:53 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9211"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51549@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Ola x Nilsson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 06 09:32:12 2021 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 1mjH7T-00028j-Tj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 09:32:11 +0100 Original-Received: from localhost ([::1]:57866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjH7S-0001s6-Dj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 04:32:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjH7K-0001rZ-6w for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 04:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjH7J-0001nJ-UN for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 04:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjH7J-0000K2-SH for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 04:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 08:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51549 X-GNU-PR-Package: emacs Original-Received: via spool by 51549-submit@debbugs.gnu.org id=B51549.163618746230779 (code B ref 51549); Sat, 06 Nov 2021 08:32:01 +0000 Original-Received: (at 51549) by debbugs.gnu.org; 6 Nov 2021 08:31:02 +0000 Original-Received: from localhost ([127.0.0.1]:48316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjH6M-0007zz-A2 for submit@debbugs.gnu.org; Sat, 06 Nov 2021 04:31:02 -0400 Original-Received: from mail-pj1-f53.google.com ([209.85.216.53]:33630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjH6J-0007sc-P6 for 51549@debbugs.gnu.org; Sat, 06 Nov 2021 04:31:00 -0400 Original-Received: by mail-pj1-f53.google.com with SMTP id w33-20020a17090a6ba400b001a722a06212so1715916pjj.0 for <51549@debbugs.gnu.org>; Sat, 06 Nov 2021 01:30:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc :content-transfer-encoding; bh=aeOgI0Uy6FndRhiIK/9gYQj8QROMze3P5/v7UlhM7oo=; b=av2yHU2+CQJPZYWWBV0/eY1Q3N2HVSfIawGk3SYuo+hJ4S5CP0ZBgpl+ZQ85d9gpnj 5+VjQNy9XFMuRIITFik95PyTEWhoo9OQlwUeKnKqwhElf9ESSOJan3zbNPs5qWmuK7ef +g8ecFZG4iIJzYFo0SKdZTD11NGSE9HP+jCpPttTAMwONH2O6l6rOqNKXey4XsykopLf +rXUPajeXncvUOUg3p9zEq/kt+5d+2GsqD7P/lrSTIsKruqjpqjWdYIGHv3scKJFEhHP M4HHlt2QSognvv7D4TEyN/rtEaYHtM3Iyj3wUAmEUZp8QdBD6isWfcoc90x0DQ/TqkUh Z9JQ== X-Gm-Message-State: AOAM533vdYWGHX6+x9tqgiMSgtqBWTsoOSbBUXt+lSgEz0WBXq+E5wxH cH3wuy9e/qXkLZ7ARo987RDjZ3Gec6nHcpDf6+0= X-Google-Smtp-Source: ABdhPJzsrawHkaQfeYpNq0y4IUpt+6auqRYZrfgF9QFGFphucRHpkQ7BqTJo2tqousNhztvb2a9LC+Vy2Pa5xevTIUE= X-Received: by 2002:a17:90b:1e0e:: with SMTP id pg14mr35937240pjb.143.1636187454062; Sat, 06 Nov 2021 01:30:54 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 6 Nov 2021 01:30:53 -0700 In-Reply-To: (Ola x. Nilsson's message of "Mon, 1 Nov 2021 12:52:00 +0100") 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:219085 Archived-At: tags 51549 + confirmed thanks Ola x Nilsson writes: > Flymake includes the buffer name in `warning-type-format' (see > `flymake--log-1'). > When the file name - and the buffer name - contain a % character it is > very probable that the `format' call in `display-warning' either fails > or produce unexpected results. > > In my case I used a file name arm-trusted-firmware-2.4_%.bbappend with a > local flymake backend running a local linter. > The local backend uses a process sentinel to process errors and generate > flymake diagnostic objects with > > (flymake-make-diagnostic source beg end type msg) > > where > source is the buffer visiting arm-trusted-firmware-2.4_%.bbappend, > bed and end set from `flymake-diag-region' > type is :warning > and msg is a string with the error message from the linter. Thanks for the bug report. I can reproduce this using this contrived example: ./src/emacs -Q --eval "(progn (require 'flymake) (find-file \"/tmp/foo%sbar.c\") \ (flymake--log-1 :emergency nil \"foo\"))" I now see in the *Warnings* buffer: Emergency [flymake fooflymakebar.c]: foo The expected output is: Emergency [flymake foo%sbar.c]: foo Your analysis of why the problem happens seems correct to me, but I'm not sure how to best fix it. Jo=C3=A3o, what do you think?