From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 52295@debbugs.gnu.org
Subject: bug#52295: 28.0.90; Killing text results in coding system complaint
Date: Tue, 07 Dec 2021 11:42:07 +0800 [thread overview]
Message-ID: <874k7ljd2o.fsf@yahoo.com> (raw)
In-Reply-To: <83a6hd3oba.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 Dec 2021 14:33:45 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Po Lu <luangruo@yahoo.com>
>> Cc: 52295@debbugs.gnu.org
>> Date: Sun, 05 Dec 2021 17:26:11 +0800
>>
>> >> > selection-coding-system
>> >> > next-selection-coding-system
>> >>
>> >> Both variables are nil.
>> >
>> > That's the problem. But I don't understand why is that so. The value
>> > of selection-coding-system is set in globals_of_w32select, which is
>> > called during startup, and where we have this code:
>> >
>> > ANSICP = GetACP ();
>> > OEMCP = GetOEMCP ();
>> >
>> > QANSICP = coding_from_cp (ANSICP);
>> > QOEMCP = coding_from_cp (OEMCP);
>> >
>> > if (os_subtype == OS_SUBTYPE_NT)
>> > Vselection_coding_system = Qutf_16le_dos;
>> > else if (inhibit_window_system)
>> > Vselection_coding_system = QOEMCP;
>> > else
>> > Vselection_coding_system = QANSICP;
>> >
>> > On Windows 9X, this should assign the ANSI codepage to
>> > selection-coding-system. Since your codepage seems to be 1252, it
>> > should assign the symbol 'cp1252-dos' to selection-coding-system, see
>> > coding_from_cp.
>> >
>> > Why doesn't this happen in your case?
>>
>> Maybe that variable is dumped during the build process, with a value
>> appropriate for NT, and when Emacs starts on a 9X system some other code
>> sees that it is invalid and sets it to nil?
>
> No, the code above is run in the dumped Emacs, when it starts, not in
> temacs. So the values should reflect what happens when you start
> Emacs on the Windows 9X system.
> Could you perhaps add some printf's there to see what actually
> happens? It almost looks like that code doesn't get called (which
> would be strange by itself), since coding_from_cp cannot possibly
> return nil. Or maybe the initial assignment does work, but then some
> code resets the variable back to nil?
`globals_of_w32select' is called, but QANSICP is nil:
Fprint (QANSICP, Qexternal_debugging_output);
Prints "nil" onto the console.
next prev parent reply other threads:[~2021-12-07 3:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <875ys3sgfv.fsf.ref@yahoo.com>
2021-12-05 6:40 ` bug#52295: 28.0.90; Killing text results in coding system complaint luangruo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-05 8:45 ` Eli Zaretskii
2021-12-05 8:58 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-05 9:12 ` Eli Zaretskii
2021-12-05 9:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-06 12:33 ` Eli Zaretskii
2021-12-07 3:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-12-07 5:51 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-07 7:33 ` Eli Zaretskii
2021-12-07 9:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-07 10:07 ` Eli Zaretskii
2021-12-07 10:33 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-07 10:50 ` Eli Zaretskii
2021-12-07 14:05 ` Eli Zaretskii
2021-12-12 10:58 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-12 11:22 ` Eli Zaretskii
2021-12-12 12:47 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-12 13:31 ` Eli Zaretskii
2021-12-13 0:50 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-13 3:23 ` Eli Zaretskii
2021-12-18 0:29 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-18 6:48 ` Eli Zaretskii
2021-12-18 18:30 ` Eli Zaretskii
2021-12-19 0:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-27 9:09 ` bug#52295: windows 98: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=874k7ljd2o.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=52295@debbugs.gnu.org \
--cc=eliz@gnu.org \
--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 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).