From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#51549: 29.0.50; flymake error when filename contain '%' Date: Sat, 6 Nov 2021 09:37:54 +0000 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="33697"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ola x Nilsson , 51549@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 06 10:39:13 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 1mjIAL-0008YS-4e for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 10:39:13 +0100 Original-Received: from localhost ([::1]:33176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjIAK-0001In-6M for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 05:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjIAA-0001IQ-Qj for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 05:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36885) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjIAA-0006IC-Hh for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 05:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjIAA-0004jt-F4 for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 05:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 09:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51549 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 51549-submit@debbugs.gnu.org id=B51549.163619149418159 (code B ref 51549); Sat, 06 Nov 2021 09:39:02 +0000 Original-Received: (at 51549) by debbugs.gnu.org; 6 Nov 2021 09:38:14 +0000 Original-Received: from localhost ([127.0.0.1]:48431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjI9O-0004io-En for submit@debbugs.gnu.org; Sat, 06 Nov 2021 05:38:14 -0400 Original-Received: from mail-pl1-f172.google.com ([209.85.214.172]:40880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjI9L-0004iZ-5P for 51549@debbugs.gnu.org; Sat, 06 Nov 2021 05:38:13 -0400 Original-Received: by mail-pl1-f172.google.com with SMTP id v20so12571433plo.7 for <51549@debbugs.gnu.org>; Sat, 06 Nov 2021 02:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=sTQFR4KDnR5jghPIg6A5Lf4uFP1JzwgjvCNGfyGRJOk=; b=EgIHqwNMnU0QN5Uq4r63Z+ljMTGa8QzWqPDyI6KHXsHfXdMSA0qmdYM0W2JesXRlKX spQ6UtgOEgEHmafuAC5yeHbsQQSYL8aVfA+i9dxI1JE4uasxgg6kMe5AL+1FTvU2Ifz0 g2mWksFv84xYB8/FlLL02AmCwuWGbVgOsKzqDm++vOk1PpNBXR0MFudeldJzi9sLFu88 j9JFuBv7eBwIMvDPTr0gzarQ5ZuCVzNDyNbmNxX+QpLxyhBcp+dZdrlEWhTu06XPydV+ vI+0LBWS0cY4Nxlw4YPtxvnhpWN36TrUhevnwO4Sm0mbal0Vj8npCX3OhFDsWOuBxrBI hjEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=sTQFR4KDnR5jghPIg6A5Lf4uFP1JzwgjvCNGfyGRJOk=; b=7rz0wBGeHRTJ+8rCj3077/aRxbXX23j4s6AraNmZOwUDAqIWbvqyyIaAmkzn4XKI9k Fo04eLykE0ZbhstYx/hjr0vZ7gfDAAmgaC8DwomgyOgRSNDAg7IMQ+Ln7dGLyN5YlbyP mdti3F5P1teA571VTsXLEYcnOtA3BbXxZotAJTZvHfzTL9RBgPvm4Yshi4ce1XT026qL qrrVWRxF13OxxCfWNZyf7J4vk/HMV5CqeP2L6qUD+0GWS6D02qeB14uMJ9lAQNINBC4I a/29auT2M+DQ5+CVXR6K7zwcvvYQK7ddRrNAt0PsxSjbFCT91Pxt6ZGEitHOAQnYr9r2 9SsQ== X-Gm-Message-State: AOAM532QzsSseXJ76FWzo6jLpXEL4fB0COuOA6Y6uFgwreY9S8YHLl0F e7KPTm2omYGquebXOkORBILXPNvj3/qTpxneTA0= X-Google-Smtp-Source: ABdhPJy/BeuIznAAH5TwSV5rglGTcGHRM056whKSo4No/eJ6BmmDClnomCXSnNlWcStdwoNV0rVxQhyCozDBSMCj9Rg= X-Received: by 2002:a17:90a:df97:: with SMTP id p23mr36608667pjv.3.1636191485149; Sat, 06 Nov 2021 02:38:05 -0700 (PDT) In-Reply-To: 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:219091 Archived-At: Hi Stefan, Ola Thanks for the report. I don't have much time to look into this but this looks like the typical problem where a user-provided string is being passed as the first argument of format/message. In these cases, one normally makes it so that the first argument is simply the string "%s" and then the second argument is that user-provided thing. Thanks very much for looking into this, Jo=C3=A3o On Sat, Nov 6, 2021 at 8:30 AM Stefan Kangas wrote: > > 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 generat= e > > 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? --=20 Jo=C3=A3o T=C3=A1vora