Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error

From: Eli Zaretskii <[email-masked]>
Date: Fri, 30 May 2025 07:42:38 +0300

> Date: Thu, 29 May 2025 17:40:35 +0100
> From: Przemysław Kryger <[email-masked]>
> CC: [email-masked], [email-masked]
> 
> (Sorry for duplicate e-mail for some, but it seems that my previous attempt has failed.)
> 
> I can see the same issue on 30.1.50 on macOS as well, (built from:
> https://github.com/jdtsmith/emacs-mac/commit/4caf8199ea11305ce5f6ca0a380cf18d200d5039).
> That is, in emacs -Q
> 
> M-x man RET ls RET
> 
> yields a man buffer that shows:
> 
> sed: 1: "/^[\o001-\o032][\o001-\ ...": RE error: invalid character range
> 
> A quick check with:
> 
> M-x find-library RET man RET
> 
> shows that the line with
> 
>  "-e '/^[\\o001-\\o032][\\o001-\\o032]*$/d'"
> 
> is there as well.  The same line is also present in
> 8881dca81c95bac1977aa2c924be173382444c4a (tip of branch emacs-30).
> 
> 
> I can see the fix (fc5e905dc90e21b1a381bde42e22c06f45c17e16) is contained in
> branch master, but it's not in branch emacs-30 yet.  Does it mean it's not
> planned to be included in Emacs-30.2 (or Emacs-30.3)?

Indeed, we don't plan to have the fix in Emacs 30.2.  The change is
not simple, and the handling of system-dependent idiosyncrasies in
"M-x man" is delicate and fragile, so we prefer not to risk any
breakage there.

You can, however, patch your man.el locally.