From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simen =?UTF-8?Q?Endsj=C3=B8?= Newsgroups: gmane.emacs.bugs Subject: bug#70914: 29.3; Crashes often on Windows Date: Wed, 15 May 2024 13:24:23 +0200 Message-ID: References: <86msouxamh.fsf@gnu.org> <86h6f0wsbv.fsf@gnu.org> <864jb0wp7p.fsf@gnu.org> <86zfssv5mq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14108"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70914@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 15 13:26:11 2024 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 1s7Clu-0003Qe-RO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 May 2024 13:26:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7Clo-0006d1-Ku; Wed, 15 May 2024 07:26:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7Cll-0006ch-5Z for bug-gnu-emacs@gnu.org; Wed, 15 May 2024 07:26:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Clk-0005t1-Rp for bug-gnu-emacs@gnu.org; Wed, 15 May 2024 07:26:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Clm-0005Ml-EC for bug-gnu-emacs@gnu.org; Wed, 15 May 2024 07:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simen =?UTF-8?Q?Endsj=C3=B8?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 May 2024 11:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70914 X-GNU-PR-Package: emacs Original-Received: via spool by 70914-submit@debbugs.gnu.org id=B70914.171577234520615 (code B ref 70914); Wed, 15 May 2024 11:26:02 +0000 Original-Received: (at 70914) by debbugs.gnu.org; 15 May 2024 11:25:45 +0000 Original-Received: from localhost ([127.0.0.1]:42102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7ClV-0005MR-1K for submit@debbugs.gnu.org; Wed, 15 May 2024 07:25:45 -0400 Original-Received: from mail-lf1-f50.google.com ([209.85.167.50]:58795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7ClS-0005MF-8F for 70914@debbugs.gnu.org; Wed, 15 May 2024 07:25:43 -0400 Original-Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-51f0b6b682fso7271967e87.1 for <70914@debbugs.gnu.org>; Wed, 15 May 2024 04:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715772274; x=1716377074; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3osgAEi+6E1odLmFvt/qn5t9zsFPrf22bCsaVzBPG24=; b=U6geUGVaRohUP1WT+XJa3E45GuHqaX2XB13Q5tXvpi578/89P2gtjdL5KHGm3Ct6c5 J6jMR81uTqHHHfFezv50N1KKXAPlki6SyN2KmjARKvvSdcj7IMWVqftphdn1tl8EfR4r B0u8dFKm7r2KsWe2y742t5MdNOkVWLHK1HeEgoGjRo9WLfthOmKDd2NSFrbUOH+3YRcE 8UCpy8n2JLhRsuhwgGfYQf669+lybMAIZg6AhlfAFSzfPzwClf2hVL4Z9YhOUZoD52PK XrTi0B3wIg9zxSDrxD5cDLW504t/RxziLl4nE7a9FqFwYRuP9PbuCPZhCDid1rqFUqnJ 8JYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715772274; x=1716377074; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3osgAEi+6E1odLmFvt/qn5t9zsFPrf22bCsaVzBPG24=; b=jHM/zuHRjPYatAu1+DrEYjkDYf+Vba2doefjr74vlEnPpIvFcR962hqjyNSywKTNdu aUTsB38SoxmLLTNbyXFbOh6g6mBcIMEAzIyYnQ26MQjlvjfRvcTMC+dVxXUkQ96Qb6yb vx9U3waUa9oH0U6zxkTppDqKQpKmrnga8Liu0Vt8xhLRgEhC+KtFn9eYymHXz1Jkmxxx A6mza2JAPmO+faz6su5QS8XO7KiV0w4nmxEKJ/njKnnS6oIo5zitvKayUsqJgtNfOfR0 gsVBYQLsc7M+wHi7H4h3yPt2yS1RwYshRcx7GGmpz8Mo3FkYRQptgTeJXaglVXFW13UM IMcw== X-Gm-Message-State: AOJu0Yyh6mIRFNis73rE6MDFa3n/Yc4y5Q3NaNiZ3r9g8tU48PpA/8F9 v+VbYn6qQ9ezxpxg7zEajsT/GOsFK6SsLvZSZXx41XZr/OYJKf9ekvwlSyY/cNzD1Hmi/8oZWtw Kk6pGIuuMBc0ud0iqctcNym5j+PfKP4Mr X-Google-Smtp-Source: AGHT+IEwdL8jyL2PtaoZ2usSUoqu6GO9/MrBdIDm+Kflx8KgRhagBmXuk+WplhRimI77UTnq/IqiN3csvxZzJFKZM/E= X-Received: by 2002:a05:6512:2347:b0:51a:f689:b4df with SMTP id 2adb3069b0e04-5221016b5a7mr17173517e87.44.1715772274094; Wed, 15 May 2024 04:24:34 -0700 (PDT) In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285074 Archived-At: This issue is solved by setting `(prefer-coding-system 'utf-8)`. Not sure if this is the preferred fix or if this gets me into trouble later though. On Wed, May 15, 2024 at 1:19=E2=80=AFPM Simen Endsj=C3=B8 wrote: > > I found another issue. My files are stored in UTF-8 also on Windows. > Without setting Windows in the "Beta: Use UTF-8 everywhere", tools > like ripgrep will somehow interpret the files as latin-1. So I cannot > search for special characters in my language, and I even remember > having crashes happening when searching documents which includes them. > > On Wed, May 15, 2024 at 12:25=E2=80=AFPM Simen Endsj=C3=B8 wrote: > > > > > I suggest to remove them, and see if the crashes keep happening. > > > > No crashes yet at least, so let's hope. > > > > > If removing these hacks make something stop working, describe the > > > problems with the details: there are definitely ways to solve them > > > without these dangerous customizations. > > > > Nothing has stopped working per se, but I encounter encoding problems > > which is probably why I added this in the first place. > > I tested using `emacs -Q`, so the default settings. > > > > When running in a regular terminal , I get the output: > > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=AC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=AC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=AC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=AC=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =AC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=90 > > =E2=94=82 Package = =E2=94=82 > > Installed =E2=94=82 Released =E2=94=82 Lates= t =E2=94=82 Released > > =E2=94=82 Age (y) =E2=94=82 > > > > Tested with Git Bash, msys2, Powershell 5, Powershell 7 in Windows > > Terminal, Powershell 7, Command Prompt. > > > > But in eshell, I get: > > =C3=9A=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84= =C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=82=C3=84=C3=84=C3=84=C3=84=C3=84=C3= =84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=82=C3=84= =C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=82=C3= =84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=82=C3=84=C3=84=C3=84=C3=84= =C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=84=C3=82=C3=84=C3=84=C3=84=C3= =84=C3=84=C3=84=C3=84=C3=84=C3=84=C2=BF > > =C2=B3 Package =C2=B3 Installed =C2=B3 Released =C2= =B3 Latest =C2=B3 Released > > =C2=B3 Age (y) =C2=B3 > > > > And in shell: > > +------------------------------------------------------------------= ------------+ > > Package Installed Released Latest > > Released Age (y) > > > > > > Guess I'll have to dig into encoding in emacs and integration with Wind= ows. > > > > =E2=94=8C and =C3=9A: > > > > position: 1 of 155 (0%), column: 0 > > character: =E2=94=8C (displayed as =E2=94=8C) (codepoin= t 9484, #o22414, #x250c) > > charset: unicode-bmp (Unicode Basic Multilingual Plane > > (U+0000..U+FFFF)) > > code point in charset: 0x250C > > script: symbol > > syntax: _ which means: symbol > > category: .:Base, P:Haskell symbol constituent > > characters, c:Chinese, h:Korean, j:Japanese > > to input: type "C-x 8 RET 250c" or "C-x 8 RET BOX > > DRAWINGS LIGHT DOWN AND RIGHT" > > buffer code: #xE2 #x94 #x8C > > file code: #xE2 #x94 #x8C (encoded by coding system utf= -8-dos) > > display: by this font (glyph code): > > harfbuzz:-outline-Iosevka Slab > > Regular-regular-normal-normal-mono-24-*-*-*-c-*-iso8859-1 (#x605F) > > > > Character code properties: customize what to show > > name: BOX DRAWINGS LIGHT DOWN AND RIGHT > > old-name: FORMS LIGHT DOWN AND RIGHT > > general-category: So (Symbol, Other) > > decomposition: (9484) ('=E2=94=8C') > > > > > > position: 155 of 1140 (14%), column: 0 > > character: =C3=9A (displayed as =C3=9A) (codepoint 218,= #o332, #xda) > > charset: unicode-bmp (Unicode Basic Multilingual Plane > > (U+0000..U+FFFF)) > > code point in charset: 0xDA > > script: latin > > syntax: w which means: word > > category: .:Base, L:Strong L2R, j:Japanese, l:Latin, v:= Viet > > to input: type "C-x 8 RET da" or "C-x 8 RET LATIN > > CAPITAL LETTER U WITH ACUTE" > > buffer code: #xC3 #x9A > > file code: #xC3 #x9A (encoded by coding system utf-8-do= s) > > display: by this font (glyph code): > > harfbuzz:-outline-Iosevka Slab > > Regular-regular-normal-normal-mono-24-*-*-*-c-*-iso8859-1 (#x9B) > > > > Character code properties: customize what to show > > name: LATIN CAPITAL LETTER U WITH ACUTE > > old-name: LATIN CAPITAL LETTER U ACUTE > > general-category: Lu (Letter, Uppercase) > > decomposition: (85 769) ('U' '=CC=81') > > > > On Tue, May 14, 2024 at 4:18=E2=80=AFPM Eli Zaretskii wr= ote: > > > > > > > From: Simen Endsj=C3=B8 > > > > Date: Tue, 14 May 2024 15:58:48 +0200 > > > > Cc: 70914@debbugs.gnu.org > > > > > > > > I'm not really sure why I've added these anymore. I've added them o= ver time > > > > since 2016 first using Spacemacs, then Doom Emacs. > > > > > > > > >> ;; Windows doesn't set this, but some packages might depend on= the variable > > > > >> (setenv "LANG" "en_US") > > > > > > > > > > The comment is not correct. To see for yourself, ensure LANG is = not > > > > > set in the system-wide environment, start "emacs -Q", and then ty= pe > > > > > > > > > > M-: (getenv "LANG") RET > > > > > > > > That's interesting. I usually just { M-x getenv }, and LANG isn't l= isted there. > > > > (getenv "LANG") returns "ENU" though. Looking at the environment va= riables for > > > > the process, I see LANG listed there. How is getenv *not* listing t= he variable? > > > > Has it marked it special somehow and filter it out? > > > > > > It's a Windows-specific trick: we ad a few environment variables at > > > startup such that getenv can access them, but don't want it to appear > > > in process-environment explicitly, and so the function that prompts > > > for the variable when you invoke getenv interactively doesn't know > > > about them. > > > > > > > > This is a very bad idea, IME. The clipboard on Windows uses UTF-= 16, > > > > > and Emacs knows how to decode it correctly. Customizing > > > > > clipboard-coding-system to something else just gets in the way. > > > > > > > > Probably something I did after changing Windows to use utf-8, which= also > > > > includes the clipboard. > > > > > > > > > I don't know where does the comment about latin-1 by default come= from > > > > > (maybe from Windows 9X days?), but it is not true on Windows for = a > > > > > very long time. The default value of selection-coding-system on > > > > > Windows is utf-16le-dos, you can again verify that in "emacs -Q". > > > > > > > > Maybe I broke something else when trying to get text to work proper= ly and added > > > > that hack as a workaround..? I really have no idea. Don't want to d= ig through my > > > > git commits to find out ;) > > > > > > > > > Again, I'm not sure this is relevant to the crashes. But it does= n't > > > > > do any harm to make your Emacs configuration healthier ;-) > > > > > > > > Yes, thanks a lot for the help! I'm a bit scared to remove these ha= cks I've > > > > accumulated over time as I probably added them there for a reason t= hough. But > > > > hopefully the workarounds was just for some symptoms and not the ro= ot cause -- > > > > we'll see. > > > > > > I suggest to remove them, and see if the crashes keep happening. > > > > > > If removing these hacks make something stop working, describe the > > > problems with the details: there are definitely ways to solve them > > > without these dangerous customizations.