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 04:08:55 -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="8297"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ola x Nilsson , 51549@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 06 12:10:27 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 1mjJac-00020l-In for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 12:10:26 +0100 Original-Received: from localhost ([::1]:41730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjJaa-000660-UW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 07:10:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjJaE-00065Y-E4 for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 07:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjJaE-0004W2-5f for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 07:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjJaE-0007J5-0t for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 07:10:02 -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 11:10:01 +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.163619694327994 (code B ref 51549); Sat, 06 Nov 2021 11:10:01 +0000 Original-Received: (at 51549) by debbugs.gnu.org; 6 Nov 2021 11:09:03 +0000 Original-Received: from localhost ([127.0.0.1]:48586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjJZG-0007HR-Px for submit@debbugs.gnu.org; Sat, 06 Nov 2021 07:09:02 -0400 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:43904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjJZF-0007Gu-KM for 51549@debbugs.gnu.org; Sat, 06 Nov 2021 07:09:02 -0400 Original-Received: by mail-pj1-f46.google.com with SMTP id nh10-20020a17090b364a00b001a69adad5ebso5180880pjb.2 for <51549@debbugs.gnu.org>; Sat, 06 Nov 2021 04:09:01 -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:mime-version:date :message-id:subject:to:cc:content-transfer-encoding; bh=quRvbMSUcb/O70TBZWY0UDpppqb+P4hvtxu6AGnxVSM=; b=rQkvDgCSwAwLZfLr0wZbMeExaBNgmCJOuPJoooDcT/uKbfx70dqdy9JnuLGfCC8V4R voi/Xn/+V7Pg/TmgaBMYn1L1cw8sBXNlzUJKAtuzCcJiaipWXBkX5JWL3reePd7fCXbg io9KT1fe3XzfEZ5h7PpDPklG+IM13KtBcBsSlmP/AkmneMQMSExyE/fYJQDzqwXZkFOA 50PGP94erMe8tYtG6/b+2zx+81QpQuRAqKOsKT8EPkp5tagPVyIkA4KkFwtbzG1Vlwut Xa7ou9CCDvXl7iXhjVDSwa6Epm4cQ+fEe/sHGqnEyWMO8JkqduLyByBRVuzbmrFRVKVZ LHhQ== X-Gm-Message-State: AOAM532J+vwWBabf8OiSXbSOkkZ5pa/VY8l03HRqiRQIBIbC2sWpzZAI /4BF/TyO8td1wanYIjog8LgoiCJlDDOCOfUfzLg= X-Google-Smtp-Source: ABdhPJw66hNPzbSo4Uf9QnviUOs+mcmSZ33ZmOVENRjATg98MNe5Y+DGLZOw/CkYyx45/9Jn8V3EeBNxPNpPGFjRpeM= X-Received: by 2002:a17:902:c145:b0:142:50c3:c2a with SMTP id 5-20020a170902c14500b0014250c30c2amr7693759plj.32.1636196935531; Sat, 06 Nov 2021 04:08:55 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 6 Nov 2021 04:08:55 -0700 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:219094 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > 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. That's what I thought too, until I looked at the code. Unfortunately, the fix we both thought of isn't that trivial as we set `warning-type-format' like this: (warning-type-format (format " [%s %s]" (or sublog 'flymake) (current-buffer))) And then we run `display-warning', which uses this variable as the first argument to format. Is there a strong need to have this format for flymake warnings? Emergency [flymake foo%sbar.c]: foo If not, my best idea for fixing this is to remove the filename from the `warning-type-format', and put it in the message instead. That would be a backwards-incompatible change, however.