From: Stefan Kangas <stefan@marxist.se>
To: "João Távora" <joaotavora@gmail.com>
Cc: Ola x Nilsson <ola.x.nilsson@axis.com>, 51549@debbugs.gnu.org
Subject: bug#51549: 29.0.50; flymake error when filename contain '%'
Date: Sat, 6 Nov 2021 04:08:55 -0700 [thread overview]
Message-ID: <CADwFkmkAXLS=SkXq03gbjKOjYD+9Y67YK2ymPaL7p=_hFjCzDw@mail.gmail.com> (raw)
In-Reply-To: <CALDnm53=JasmX+t6-6xgRnb+oathepA2Unv6oFAhX2LREM6F3w@mail.gmail.com>
João Távora <joaotavora@gmail.com> 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.
next prev parent reply other threads:[~2021-11-06 11:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 11:52 bug#51549: 29.0.50; flymake error when filename contain '%' Ola x Nilsson
2021-11-06 8:30 ` Stefan Kangas
2021-11-06 9:37 ` João Távora
2021-11-06 11:08 ` Stefan Kangas [this message]
2021-11-06 16:45 ` João Távora
2021-11-06 20:06 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmkAXLS=SkXq03gbjKOjYD+9Y67YK2ymPaL7p=_hFjCzDw@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=51549@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
--cc=ola.x.nilsson@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).