From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#52295: 28.0.90; Killing text results in coding system complaint Date: Tue, 07 Dec 2021 11:42:07 +0800 Message-ID: <874k7ljd2o.fsf@yahoo.com> References: <875ys3sgfv.fsf.ref@yahoo.com> <875ys3sgfv.fsf@yahoo.com> <83k0gj4ezx.fsf@gnu.org> <87sfv7qvgs.fsf@yahoo.com> <83ee6r4dq5.fsf@gnu.org> <87ee6rqu6k.fsf@yahoo.com> <83a6hd3oba.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23082"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: 52295@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 07 04:43:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muRNm-0005qB-FJ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 04:43:10 +0100 Original-Received: from localhost ([::1]:40710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muRNl-0003iZ-1O for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Dec 2021 22:43:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muRNe-0003iD-C9 for bug-gnu-emacs@gnu.org; Mon, 06 Dec 2021 22:43:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1muRNd-0001Cc-R5 for bug-gnu-emacs@gnu.org; Mon, 06 Dec 2021 22:43:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1muRNd-0002SL-Ok for bug-gnu-emacs@gnu.org; Mon, 06 Dec 2021 22:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Dec 2021 03:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52295 X-GNU-PR-Package: emacs Original-Received: via spool by 52295-submit@debbugs.gnu.org id=B52295.16388485439395 (code B ref 52295); Tue, 07 Dec 2021 03:43:01 +0000 Original-Received: (at 52295) by debbugs.gnu.org; 7 Dec 2021 03:42:23 +0000 Original-Received: from localhost ([127.0.0.1]:35842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muRN1-0002RS-1M for submit@debbugs.gnu.org; Mon, 06 Dec 2021 22:42:23 -0500 Original-Received: from sonic311-25.consmr.mail.ne1.yahoo.com ([66.163.188.206]:41648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muRMz-0002RE-Mv for 52295@debbugs.gnu.org; Mon, 06 Dec 2021 22:42:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638848535; bh=0Bbph8OlC9NZKimkODA0kUGeQH8tnC6OdNYkagyj3Yo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Liw2eRm+L9bQS0w9KgBoLLY5ndtwu/rFdaatrqPv4Na4xAOIAM4DA/HC0YkwdeHrBkvLcquuFsIxCWOfaRrz4blF6LJtJwO4KL7oqC2CqUq4MeCDlxSUaIBtZYx6SaRPPhOR1F6K4SqXNQrUzG6sLrftual255gd7TPLdLH5rmuhk1T1zVbO5oB3LNG+OEDS12tgyr2DQznzJ1x7x/b3CPYY6Co2rl53Afy3KX+Vkxy0LJVfKxvE5+j8DaccBtsr6JbPuAJc7f09GU+GurO3gg02jBu23vBZBdBsS87IZ+RN3FbZ6miko+KU1gF1IlCy1YAURCdOV30cv+i6ASGnzQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638848535; bh=94vJo03hM3Vnpz18ntGAcZfad+6i5jd3ppoqXPTme5J=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Ro7nsTX+HZ6KpOKEdZDIN5jhwnh/PckdXCtu+EwWJI1ivS7Yx2iL3gSQ+VtdRaGp827MTR4ZlyyYRzxcsR+kzyRZsoWiEycOfvqSmia4r/FwNygju5DUL7zyIEdjmqalrMyPmBrVyghvWMlVfHLaNeICz1uLIgtnJ4V9ZaaFUHMJDpOaWxITpiwP7ZQWTTOdUL1QyYD9C0AZHdVce7+GFx3rm0U10YfNdu4KFDsMX6kupZ89+WQaZgi3Fvpem4TpjBCmZl1iJVJ8qrxd9je4mPimwl4oj7uXks6Enq7O73bW6I22xYNosQ1mDK43m9aT5trYVgY5O7ti6gNkZEvuRw== X-YMail-OSG: NU7LbBoVM1khPrjJRJvo3F4nQfX5.yLoQV2TTZbqu1xmWdX0fCy2o.KL9TCGGpK nK27sVu1TZOech_odWMrg7V5RptXkImbCds3QVKefuCtWgimw1zR8.DVUc8X5NHSMiDjO2GhBniy 1rb2DuDYUlAixEPoVqOIYgJYneullaoCQYjIoXIY3wcsizAZfozqT7kTPzuUWwMGugcyjsjjC9nR JPynKTWDHszdKQAz2Ydx8CuIKoPXHW13R92BBYPaK3WViDdTEyz77r9Aw8HErwdRmJ_0Mk1.LKBf N1FO0foIvd6pESrsHH2A7IIxm8Uj1en1qZgFhRTaXmQafBywniJazfyVlfBPQdodEIUFUveLm6UZ hGj6W_TgReNsOUAFddlLisZ1ngQAQw5NiXD06XhkDiOkLpsPGKkBIZU9J2Fv_Of2zoBqIe9p0W.h HKpLX47_za7eALFuxpDyLeBUCBjYBDpxOcjWpqshOB9GhIBWspY_56iQYj4M.YxbbVnMrRTffzOt yuJ6HiyoD.zrLHYKdFFsJDhKaJrZjq80ZBv0dfAtja4pv7j9sUISXghjqPKy6g.SUGM2umOAY05S Be4kLK.1xX5KZufyvCBToN2XJqbluVoDaKffHqGlQjtROlFzQmB4Cs4XFOCC1vgt07wxfedKCJ_W hCerUtRhssLsc0A7Um8t_oav1JIEDy6B0d34zZpGt7PmVn6dDb2FMJwMicCaYBNcaasOXbMC.ZnP x9fu1rWHR0Aniy5mC7dTRD0Ii4UBXJ1iq2.u_MHTQAQ6jZrT7u4kOG9wvwponVBP9hY18n._nOnJ O8plQJXrHUjkGCJY6SDM8FWdDcExCO1OJMGNZpdLcw X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Tue, 7 Dec 2021 03:42:15 +0000 Original-Received: by kubenode518.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 7b74471dc27c8c9917636cbe8a22515a; Tue, 07 Dec 2021 03:42:12 +0000 (UTC) In-Reply-To: <83a6hd3oba.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 Dec 2021 14:33:45 +0200") X-Mailer: WebService/1.1.19415 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221804 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> 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.