GNU bug report logs - #77944
31.0.50; M-x man on macOS fails with error

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Sun, 20 Apr 2025 16:29:02 UTC

Severity: normal

Found in version 31.0.50

Fixed in version 31.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: David Caldwell <david <at> porkrind.org>
To: Eli Zaretskii <eliz <at> gnu.org>, Przemysław Kryger <pkryger <at> gmail.com>
Cc: 77944 <at> debbugs.gnu.org, michael.albinus <at> gmx.de
Subject: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Mon, 16 Jun 2025 15:08:46 -0700
On 6/16/25 2:16 AM, Eli Zaretskii wrote:
>> From: Przemysław Kryger <pkryger <at> gmail.com>
>> Cc: 77944 <at> debbugs.gnu.org, david <at> porkrind.org, michael.albinus <at> gmx.de
>> Date: Mon, 16 Jun 2025 09:20:53 +0100
>>
>>
>>> I could consider this if otherwise "M-x man" is completely broken on
>>> macOS. Is it?
>>
>> It is. At least in my case.
> 
> Can someone please provide a comprehensive answer to this: does "M-x
> man" always fail on all supported versions of macOS?  If not, which
> versions are affected?

I ran some tests on macOS VMs I have. I don't know which ones Emacs 
officially supports. macOS 11 and below were tested on an Intel VM, and 
12 and higher were on an M1 VM. I doubt that matters though.


*** sed test:

#!/bin/bash
echo octal; printf "\001\002" | sed -e '/[\o001-\o002]/d' | od -c
echo char;  printf "\001\002" | sed -e '/[[:cntrl:]]/d' | od -c

I got 3 types of outputs with this test:

1. macOS With gnu sed the:
octal
char

2. With older macOS sed:

octal
0000000  001 002  \n
0000003
char

3. With newer macOS sed:

octal
sed: 1: "/[\o001-\o002]/d
": RE error: invalid character range
char


*** Emacs 30.1 test: `M-x man RET ascii RET`


Results
=======

OS Version    Emacs  Sed
--------------------------
macOS 10.12   works  #2
macOS 10.14   works  #2
macOS 10.15   works  #2
macOS 11      works  #2
macOS 12      works  #2
macOS 13      works  #2
macOS 14      works  #2
macOS 15      fails  #3


The interesting thing is that even on the Emacs versions that work, the 
sed script isn't actually doing what it is supposed to do. So it's 
broken but just not in an immediately fatal way.

Even the earliest version I tested supported the `[:cntrl:]` notation so 
it seems that's a good fix for macOS 15 and will work on even very old 
macOS versions.

-David





This bug report was last modified 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.