unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Simen Endsjø" <simendsjo@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 70914@debbugs.gnu.org
Subject: bug#70914: 29.3; Crashes often on Windows
Date: Wed, 15 May 2024 12:25:42 +0200	[thread overview]
Message-ID: <CAHkVV6Hz-8Wxqtb1SbWzf6pCHTL_OUDMaorAQt5PCL+0L3x4_g@mail.gmail.com> (raw)
In-Reply-To: <86zfssv5mq.fsf@gnu.org>

> 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:
    ┌───────────────────────────────────────────────────────────┬───────────────────────────────┬─────────────────┬───────────┬─────────────────┬───────────┐
    │ Package                                                   │
Installed                     │ Released        │ Latest    │ Released
       │ Age (y)   │

Tested with Git Bash, msys2, Powershell 5, Powershell 7 in Windows
Terminal, Powershell 7, Command Prompt.

But in eshell, I get:
    ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄ¿
    ³ Package        ³ Installed      ³ Released   ³ Latest ³ Released
  ³ Age (y) ³

And in shell:
    +------------------------------------------------------------------------------+
      Package            Installed          Released   Latest
Released   Age (y)


Guess I'll have to dig into encoding in emacs and integration with Windows.

┌ and Ú:

                position: 1 of 155 (0%), column: 0
                character: ┌ (displayed as ┌) (codepoint 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) ('┌')


                position: 155 of 1140 (14%), column: 0
                character: Ú (displayed as Ú) (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-dos)
                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' '́')

On Tue, May 14, 2024 at 4:18 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Simen Endsjø <simendsjo@gmail.com>
> > 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 over 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 type
> > >
> > >  M-: (getenv "LANG") RET
> >
> > That's interesting. I usually just { M-x getenv }, and LANG isn't listed there.
> > (getenv "LANG") returns "ENU" though. Looking at the environment variables for
> > the process, I see LANG listed there. How is getenv *not* listing the 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 properly and added
> > that hack as a workaround..? I really have no idea. Don't want to dig through my
> > git commits to find out ;)
> >
> > > Again, I'm not sure this is relevant to the crashes.  But it doesn'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 hacks I've
> > accumulated over time as I probably added them there for a reason though. But
> > hopefully the workarounds was just for some symptoms and not the root 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.





  reply	other threads:[~2024-05-15 10:25 UTC|newest]

Thread overview: 141+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13  8:47 bug#70914: 29.3; Crashes often on Windows Simen Endsjø
2024-05-13 10:35 ` Eli Zaretskii
2024-05-14 10:14   ` Simen Endsjø
2024-05-14 11:23     ` Eli Zaretskii
2024-05-14 12:08       ` Simen Endsjø
2024-05-14 12:30         ` Eli Zaretskii
2024-05-14 13:58           ` Simen Endsjø
2024-05-14 14:18             ` Eli Zaretskii
2024-05-15 10:25               ` Simen Endsjø [this message]
2024-05-15 11:19                 ` Simen Endsjø
2024-05-15 11:24                   ` Simen Endsjø
2024-05-15 12:20                     ` Eli Zaretskii
2024-05-15 12:15                   ` Eli Zaretskii
2024-05-15 13:50                     ` Simen Endsjø
2024-05-15 12:04                 ` Eli Zaretskii
2024-05-15 13:45                   ` Simen Endsjø
2024-05-16  7:05           ` Simen Endsjø
2024-05-16 10:11             ` Eli Zaretskii
2024-05-24 10:13         ` Simen Endsjø
2024-05-15 10:53       ` Simen Endsjø
2024-05-15 12:11         ` Eli Zaretskii
2024-05-15 13:00           ` Simen Endsjø
2024-05-15 13:36             ` Simen Endsjø
2024-05-15 13:58               ` Simen Endsjø
2024-05-15 15:25               ` Eli Zaretskii
2024-05-15 18:13                 ` Simen Endsjø
2024-05-15 18:21                   ` Simen Endsjø
2024-05-15 18:53                     ` Eli Zaretskii
2024-05-15 20:03                       ` Simen Endsjø
2024-05-16  8:07                         ` Eli Zaretskii
2024-05-16 10:50                           ` Simen Endsjø
2024-05-16 11:44                             ` Simen Endsjø
2024-05-16 12:15                               ` Eli Zaretskii
2024-05-18 18:47                           ` Simen Endsjø
2024-05-18 19:46                             ` Eli Zaretskii
2024-05-18 21:45                               ` Simen Endsjø
2024-05-19  5:50                                 ` Eli Zaretskii
2024-05-19  9:03                                   ` Eli Zaretskii
2024-05-19 17:41                                     ` Simen Endsjø
2024-05-19 18:31                                       ` Eli Zaretskii
2024-05-19 18:38                                         ` Simen Endsjø
2024-05-20 13:47                                           ` Eli Zaretskii
2024-05-20 17:54                                             ` Simen Endsjø
2024-05-20 18:20                                               ` Eli Zaretskii
2024-05-20 18:41                                                 ` Simen Endsjø
2024-05-20 19:00                                                   ` Eli Zaretskii
2024-05-20 19:22                                                     ` Eli Zaretskii
2024-05-20 20:28                                                       ` Simen Endsjø
2024-05-21 14:06                                                         ` Eli Zaretskii
2024-05-21 17:39                                                           ` Simen Endsjø
2024-05-21 18:29                                                             ` Eli Zaretskii
2024-05-21 19:05                                                               ` Hannes Domani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-21 19:24                                                                 ` Eli Zaretskii
2024-05-21 20:31                                                                 ` Simen Endsjø
2024-05-22  4:32                                                                   ` Hannes Domani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22  4:35                                                                     ` Simen Endsjø
2024-05-22  5:08                                                                       ` Hannes Domani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22  5:57                                                                         ` Simen Endsjø
2024-05-22  6:12                                                                           ` Hannes Domani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22  8:16                                                                             ` Simen Endsjø
2024-05-22  8:23                                                                               ` Hannes Domani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22  8:41                                                                                 ` Simen Endsjø
2024-05-22  8:50                                                                                   ` Hannes Domani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22 11:09                                                                                     ` Simen Endsjø
2024-05-22 11:21                                                                                       ` Simen Endsjø
2024-05-22 11:24                                                                                         ` Simen Endsjø
2024-05-22 13:26                                                                                         ` Eli Zaretskii
2024-05-22 13:35                                                                                           ` Simen Endsjø
2024-05-22 14:07                                                                                             ` Eli Zaretskii
2024-05-22 11:40                                                                                     ` Eli Zaretskii
2024-05-22 11:36                                                                                   ` Eli Zaretskii
2024-05-22 11:24                                                                             ` Eli Zaretskii
2024-05-22 13:14                                                                               ` Simen Endsjø
2024-05-22 14:03                                                                                 ` Eli Zaretskii
2024-05-22 16:54                                                                                   ` Simen Endsjø
2024-05-22 18:19                                                                                     ` Eli Zaretskii
2024-05-22 19:21                                                                                       ` Simen Endsjø
2024-05-22 20:28                                                                                         ` Simen Endsjø
2024-05-23  5:19                                                                                           ` Eli Zaretskii
2024-05-23  7:31                                                                                             ` Simen Endsjø
2024-05-23  8:18                                                                                               ` Eli Zaretskii
2024-05-23 10:05                                                                                                 ` Simen Endsjø
2024-05-23 10:30                                                                                             ` Ihor Radchenko
2024-05-23 10:39                                                                                               ` Eli Zaretskii
2024-05-23 10:48                                                                                                 ` Ihor Radchenko
2024-05-23 11:31                                                                                                   ` Eli Zaretskii
2024-05-23 11:51                                                                                                     ` Ihor Radchenko
2024-05-23 13:33                                                                                                       ` Eli Zaretskii
2024-05-23 13:52                                                                                                         ` Ihor Radchenko
2024-05-23 14:05                                                                                                           ` Eli Zaretskii
2024-05-23 14:23                                                                                                             ` Ihor Radchenko
2024-05-23 16:02                                                                                                               ` Eli Zaretskii
2024-05-23 18:33                                                                                                                 ` Simen Endsjø
2024-05-23 18:46                                                                                                                   ` Eli Zaretskii
2024-05-22 12:26                                                                   ` Eli Zaretskii
2024-05-22 13:34                                                                     ` Simen Endsjø
2024-05-22 14:05                                                                       ` Eli Zaretskii
2024-05-22 14:28                                                                         ` Hannes Domani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22 14:58                                                                           ` Eli Zaretskii
2024-05-22 18:12                                                                             ` Hannes Domani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22 18:32                                                                               ` Eli Zaretskii
2024-05-21 20:01                                                               ` Simen Endsjø
2024-05-16  6:42                       ` Simen Endsjø
2024-05-16 10:03                         ` Eli Zaretskii
2024-05-16 11:00                           ` Simen Endsjø
2024-05-16 12:13                             ` Eli Zaretskii
2024-05-16 12:11                           ` Andrea Corallo
2024-05-16 12:22                             ` Eli Zaretskii
2024-05-16 15:26                               ` Andrea Corallo
2024-05-16 16:03                                 ` Eli Zaretskii
2024-05-16 17:04                                   ` Andrea Corallo
2024-05-16 18:24                                     ` Eli Zaretskii
2024-05-24  7:59                                 ` Andrea Corallo
2024-05-24 10:48                                   ` Eli Zaretskii
2024-05-27  9:53                                     ` Andrea Corallo
2024-05-27 11:55                                       ` Eli Zaretskii
2024-05-16 18:40                             ` Simen Endsjø
2024-05-16 19:28                               ` Eli Zaretskii
2024-05-16 20:13                                 ` Simen Endsjø
2024-05-16 21:03                                   ` Simen Endsjø
2024-05-17  6:51                                     ` Eli Zaretskii
2024-05-17 18:05                                       ` Simen Endsjø
2024-05-17 18:38                                         ` Eli Zaretskii
2024-05-17 20:39                                           ` Simen Endsjø
2024-05-18 11:18                                           ` Simen Endsjø
2024-05-18 11:49                                             ` Eli Zaretskii
2024-05-18 18:36                                               ` Simen Endsjø
2024-05-18 19:35                                                 ` Eli Zaretskii
2024-05-18 19:43                                                   ` Simen Endsjø
2024-05-18 11:55                                             ` Eli Zaretskii
2024-05-18 18:42                                               ` Simen Endsjø
2024-05-18 19:40                                                 ` Eli Zaretskii
2024-05-17  6:16                                   ` Eli Zaretskii
2024-05-15 18:35                   ` Eli Zaretskii
2024-05-15 15:18             ` Eli Zaretskii
2024-05-24 10:07       ` Simen Endsjø
2024-05-24 10:47         ` Eli Zaretskii
2024-05-24 13:08           ` Simen Endsjø
2024-05-27 12:54             ` Simen Endsjø
2024-05-27 13:22               ` Eli Zaretskii
     [not found]                 ` <87sey1g5dg.fsf@simendsjo.me>
2024-05-28 18:40                   ` 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

  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=CAHkVV6Hz-8Wxqtb1SbWzf6pCHTL_OUDMaorAQt5PCL+0L3x4_g@mail.gmail.com \
    --to=simendsjo@gmail.com \
    --cc=70914@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).