From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Override Windows default Win-* key combinations when using Emacs Date: Thu, 14 Jan 2016 20:15:56 +0200 Message-ID: <83mvs8gh7n.fsf@gnu.org> References: <568BBC58.50702@aprikoodi.fi> <83y4c43qkh.fsf@gnu.org> <5691667C.5000009@aprikoodi.fi> <838u3wkkvb.fsf@gnu.org> <5694E07E.8010005@aprikoodi.fi> <83fuy2kd2w.fsf@gnu.org> <56961607.2090504@aprikoodi.fi> <569634D6.6030404@aprikoodi.fi> <83oacpiial.fsf@gnu.org> <5697995B.5010306@aprikoodi.fi> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1452795362 21521 80.91.229.3 (14 Jan 2016 18:16:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jan 2016 18:16:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jussi Lahdenniemi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 14 19:15:58 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aJmR9-0002TO-Dp for ged-emacs-devel@m.gmane.org; Thu, 14 Jan 2016 19:15:55 +0100 Original-Received: from localhost ([::1]:44100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJmR8-0006hN-My for ged-emacs-devel@m.gmane.org; Thu, 14 Jan 2016 13:15:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJmR2-0006hB-At for emacs-devel@gnu.org; Thu, 14 Jan 2016 13:15:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJmQx-0001rd-Hz for emacs-devel@gnu.org; Thu, 14 Jan 2016 13:15:48 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJmQx-0001rN-EF; Thu, 14 Jan 2016 13:15:43 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3586 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aJmQv-00006A-Rg; Thu, 14 Jan 2016 13:15:42 -0500 In-reply-to: <5697995B.5010306@aprikoodi.fi> (message from Jussi Lahdenniemi on Thu, 14 Jan 2016 14:49:31 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198145 Archived-At: > Cc: emacs-devel@gnu.org > From: Jussi Lahdenniemi > Date: Thu, 14 Jan 2016 14:49:31 +0200 > > On 13.1.2016 17.57, Eli Zaretskii wrote: > > If you can see in GDB where does this come from and show the > > backtrace, that would be great. Failing that, let's leave Windows 9X > > testing alone for a while (you can always test the fallback code by > > forcefully failing one of the run-time tests for the newer versions) > > and test only on W2K. We can return to the 9X problem later. > > I was able to get a GDB dump of this, after installing MinGW from 2009. > The backtrace is attached. Looks like it's unable to create a buffer. Hmm... If you can spare some time to try debugging this with me, please file a bug report about this problem with "M-x report-emacs-bug", and let's take it up there. The first thing I'd like to know is what buffer is that (I'm guessing *scratch* or *Messages*), and what is the value of 'a' in this call frame: #4 0x01103082 in make_lisp_ptr (ptr=0x2a3da84, type=Lisp_Vectorlike) at ../../emacs/src/lisp.h:1110 One of the major changes since Emacs 24.5 is that we allocate memory in a completely different manner, using VirtualAlloc directly for buffer text and HeapAlloc for everything else (see w32heap.c). Perhaps some of that doesn't work on Windows 9X? > I investigated the problem and found out that it resulted from NT4's > MultiByteToWideChar function not supporting the MB_ERR_INVALID_CHARS > flags. I made the flag conditional on the OS version, after which Emacs > runs just fine on NT4. I'm attaching a patch that contains this fix, > and the conditional use of _resetstkoflw (which is also not supported on > NT4) as well. Thanks, I will push these to the emacs-25 branch soon. > Also, I noticed that addpm.exe fails to load on a out-of-the-box NT4SP6, > due to its dependency to a Shell32.dll version that ships with IE4. > After installing IE4, addpm works. It's worth noting that directly > installing IE6 on NT4 does NOT make addpm functional, as IE6 does not > contain the shell update. Thanks, I will mention this in some place, although addpm is semi-obsolescent nowadays.