unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Stefan Kangas <stefan@marxist.se>
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 16:45:59 +0000	[thread overview]
Message-ID: <CALDnm512q_gZYEKE4dtSgj_22W2XTxyWhVWWSnhaK-Y0sxsSkA@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmkAXLS=SkXq03gbjKOjYD+9Y67YK2ymPaL7p=_hFjCzDw@mail.gmail.com>

On Sat, Nov 6, 2021 at 11:08 AM Stefan Kangas <stefan@marxist.se> wrote:

> 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)))

Ah I see.  Then maybe the problem is how that is used forward.

> 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?

Absolutely not.  This is probably one of the most over-engineered
things I put in Flymake.  It's occasionally useful, but not terribly so.

>     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.

Yes, do what you think is best, and thanks in advance.
It's good to have the buffer name where the warning came from,
but it doesn't have to be in that exact place.  Maybe just
escaping the "%" in the return value of `current-buffer`
would work though?  Doubling the "%" into "%%", perhaps.

João





  reply	other threads:[~2021-11-06 16:45 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
2021-11-06 16:45       ` João Távora [this message]
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=CALDnm512q_gZYEKE4dtSgj_22W2XTxyWhVWWSnhaK-Y0sxsSkA@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=51549@debbugs.gnu.org \
    --cc=ola.x.nilsson@axis.com \
    --cc=stefan@marxist.se \
    /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).