From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Петров Андрей" <an.petrov@pay-lab.ru>
Cc: 55727@debbugs.gnu.org
Subject: bug#55727: 29.0.50; Incorrect zero symbol transcoding between applications
Date: Mon, 30 May 2022 21:42:51 +0800 [thread overview]
Message-ID: <878rqjb0h0.fsf@yahoo.com> (raw)
In-Reply-To: <ff0de15159cb43f5a5d68578ca66ae59@pay-lab.ru> ("Петров Андрей"'s message of "Mon, 30 May 2022 13:08:52 +0000")
Петров Андрей <an.petrov@pay-lab.ru> writes:
> Hello, team!
>
> Please check the following behavior:
>
> 1. Start two instances of emacs -Q.
> 2. Switch to the "*scratch*" buffer of the first one and type the following:
> M-: (insert (format "%S" "000\000000")) [RET]
> You should see "000^@000" string.
> 3. Copy the string into clipboard and paste into the other instance of
> Emacs (which you have started before).
> I get "000\0000" instead of "000\000000"
> 4. Try evaluating inserted text ("000\0000")
> C-c C-e
> I get "000^@0" instead of "000^@000".
>
> It seems that "^@" is transcoded between applications into "\0"
> instead of "\000". If I do the same test inside single instance
> of Emacs I get the correct result.
That's not a bug. Most programs cannot tolerate NUL bytes inside
selection strings, so the Emacs selection converter deliberately
replaces those inside a string with "\0" before sending the string to a
requestor.
When one Emacs instance owns the selection, the contents of the kill
ring are used directly when yanking text, so that conversion doesn't
take place.
next prev parent reply other threads:[~2022-05-30 13:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 13:08 bug#55727: 29.0.50; Incorrect zero symbol transcoding between applications Петров Андрей
2022-05-30 13:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-05-30 14:27 ` Петров Андрей
2022-05-30 15:42 ` Eli Zaretskii
2022-05-30 16:23 ` Петров Андрей
2022-05-30 18:09 ` Eli Zaretskii
2022-05-31 0:16 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-30 14:06 ` 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=878rqjb0h0.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=55727@debbugs.gnu.org \
--cc=an.petrov@pay-lab.ru \
--cc=luangruo@yahoo.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.