From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: acm@muc.de, larsi@gnus.org, 55477@debbugs.gnu.org,
pankaj@codeisgreat.org
Subject: bug#55477: 29.0.50; flymake-goto-next-eror shows terminal like color codes in mini buffer
Date: Thu, 19 May 2022 11:06:08 +0300 [thread overview]
Message-ID: <8335h6dk0f.fsf@gnu.org> (raw)
In-Reply-To: <0d94334a-0ae2-d4b0-f448-e05196ef8951@cs.ucla.edu> (message from Paul Eggert on Wed, 18 May 2022 13:11:46 -0700)
> Cc: Alan Mackenzie <acm@muc.de>, 55477@debbugs.gnu.org,
> Pankaj Jangid <pankaj@codeisgreat.org>
> Date: Wed, 18 May 2022 13:11:46 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
>
> On 5/18/22 04:24, Lars Ingebrigtsen wrote:
> >> The above expression is returning "curve"; in all three environments,
> >>
> >> en_US.UTF-8
> >> en_IN.UTF-8
> >> en_IN
> > That seems like a bug, because in the final environment, Emacs doesn't
> > seem to be able to display the curved quote.
>
> But Emacs *can* display curved quotes in that environment. It's
> misdisplaying them as individual bytes, and that's the bug: it should
> simply display the characters as-is.
>
> This bug is not limited to quotes. Put this into a file t.el:
>
> (defun δ-replace-string (from-string to-string)
> (declare (interactive-only
> "use `search-forward' and `replace-match' instead."))
> (interactive))
>
> (defun test-fun (obj)
> (if (stringp obj)
> (δ-replace-string "from" "to")))
>
> run "LC_ALL=en_IN emacs -Q", visit the file, evaluate the first form,
> and then do M-x flymake-mode followed by repeated uses of M-x
> flymake-goto-next-error. It will eventually report the diagnostic:
>
> ‘δ-replace-string’ is for interactive use only; use ‘search-forward’
> and ‘replace-match’ instead.
>
> That is, the "δ" (which in UTF-8 is #xCE #xB4) is misinterpreted as the
> two Latin-1 characters Î (#xCE) and ´ (#xB4).
Thanks for the test case.
This has nothing to do with quoting style, nor with Alan's "symbols
with positions" changes. The problem was that Flymake doesn't by
itself know which encoding to use for the files it checks and for
communicating with backend processes; when that is specific to the
major-mode (as in the case of ELisp, where we use UTF-8 by default),
the backend should arrange for that.
I hope I fixed that now on the master branch.
next prev parent reply other threads:[~2022-05-19 8:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 9:33 bug#55477: 29.0.50; flymake-goto-next-eror shows terminal like color codes in mini buffer Pankaj Jangid
2022-05-17 16:27 ` Pankaj Jangid
2022-05-17 16:30 ` Lars Ingebrigtsen
2022-05-17 16:55 ` Pankaj Jangid
2022-05-17 17:18 ` Lars Ingebrigtsen
2022-05-17 17:55 ` Pankaj Jangid
2022-05-17 18:02 ` Pankaj Jangid
2022-05-17 18:09 ` Lars Ingebrigtsen
2022-05-18 3:32 ` Pankaj Jangid
2022-05-18 11:18 ` Eli Zaretskii
2022-05-19 3:07 ` Pankaj Jangid
2022-05-18 11:24 ` Lars Ingebrigtsen
2022-05-18 20:11 ` Paul Eggert
2022-05-19 3:13 ` Paul Eggert
2022-05-19 4:54 ` Eli Zaretskii
2022-05-19 8:06 ` Eli Zaretskii [this message]
2022-05-19 18:09 ` Pankaj Jangid
2022-05-19 18:20 ` Eli Zaretskii
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=8335h6dk0f.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=55477@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=eggert@cs.ucla.edu \
--cc=larsi@gnus.org \
--cc=pankaj@codeisgreat.org \
/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.