From: Stefan Kangas <stefan@marxist.se>
To: Ola x Nilsson <ola.x.nilsson@axis.com>
Cc: 51549@debbugs.gnu.org, "João Távora" <joaotavora@gmail.com>
Subject: bug#51549: 29.0.50; flymake error when filename contain '%'
Date: Sat, 6 Nov 2021 01:30:53 -0700 [thread overview]
Message-ID: <CADwFkmkWiLLw4jqHMZRQ264AWpVwGginL=7V2yrB2OWfqjF8xQ@mail.gmail.com> (raw)
In-Reply-To: <jwq7dds855r.fsf@axis.com> (Ola x. Nilsson's message of "Mon, 1 Nov 2021 12:52:00 +0100")
tags 51549 + confirmed
thanks
Ola x Nilsson <ola.x.nilsson@axis.com> 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ão, what do you think?
next prev parent reply other threads:[~2021-11-06 8:30 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 [this message]
2021-11-06 9:37 ` João Távora
2021-11-06 11:08 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmkWiLLw4jqHMZRQ264AWpVwGginL=7V2yrB2OWfqjF8xQ@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.