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>

To reply to this bug, email your comments to 77944 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Sun, 20 Apr 2025 16:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gerd Möllmann <gerd.moellmann <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 20 Apr 2025 16:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; M-x man on macOS fails with error
Date: Sun, 20 Apr 2025 18:27:44 +0200
To reproduce with emacs -Q

M-x man RET ls RET

The man buffer shows

sed: 1: "/^[\o001-\o032][\o001-\ ...": RE error: invalid character range




In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.4.0, NS
 appkit-2575.50 Version 15.4.1 (Build 24E263)) of 2025-04-20 built on
 pro2
Repository revision: 6fb2a4691f4d53473c0a326d3a6c23df9008b6e8
Repository branch: master
System Description:  macOS 15.4.1

Configured using:
 'configure --cache-file
 /var/folders/1d/k_6t25f94sl83szqbf8gpkrh0000gn/T//config.cache.master
 --enable-checking=yes --with-native-compilation=no CC=clang
 'CFLAGS=-Wgnu-imaginary-constant -Wunused-result -g -g -O0 -F
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks
 -Wno-ignored-attributes -Wno-flag-enum -Wno-missing-method-return-type
 -Wno-variadic-macros -Wno-strict-prototypes -Wno-availability
 -Wno-nullability-completeness''

Configured features:
ACL DBUS GLIB GNUTLS LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG
RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Sun, 20 Apr 2025 18:54:01 GMT) Full text and rfc822 format available.

Message #8 received at 77944 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Michael Albinus <michael.albinus <at> gmx.de>
Cc: 77944 <at> debbugs.gnu.org
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Sun, 20 Apr 2025 21:53:24 +0300
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Date: Sun, 20 Apr 2025 18:27:44 +0200
> 
> To reproduce with emacs -Q
> 
> M-x man RET ls RET
> 
> The man buffer shows
> 
> sed: 1: "/^[\o001-\o032][\o001-\ ...": RE error: invalid character range

Micheal, that's your addition.  Are these octal escapes not portable
enough?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Mon, 21 Apr 2025 15:20:03 GMT) Full text and rfc822 format available.

Message #11 received at 77944 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 77944 <at> debbugs.gnu.org
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Mon, 21 Apr 2025 17:18:47 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

Hi Gerd,

>> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
>> Date: Sun, 20 Apr 2025 18:27:44 +0200
>> 
>> To reproduce with emacs -Q
>> 
>> M-x man RET ls RET
>> 
>> The man buffer shows
>> 
>> sed: 1: "/^[\o001-\o032][\o001-\ ...": RE error: invalid character range
>
> Micheal, that's your addition.  Are these octal escapes not portable
> enough?

Don't know. It was "-e '/^[\001-\032][\001-\032]*$/d'" before. I've
changed it due to problems with remote man pages, see the comment above.

This is macOS, isn't it? What does the following shell command show?

--8<---------------cut here---------------start------------->8---
# sed -e '/^[\o001-\o032][\o001-\o032]*$/d' /dev/null
--8<---------------cut here---------------end--------------->8---

If it fails, does the following work?

--8<---------------cut here---------------start------------->8---
# sed -e '/^[\001-\032][\001-\032]*$/d' /dev/null
--8<---------------cut here---------------end--------------->8---

Does 'sed --version' return something useful? Do you know which sed
version it is, otherwise?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Mon, 21 Apr 2025 15:32:02 GMT) Full text and rfc822 format available.

Message #14 received at 77944 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 77944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Mon, 21 Apr 2025 17:31:19 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

Frohe Ostern!

> This is macOS, isn't it? What does the following shell command show?

Right, it's macOS.
>
> # sed -e '/^[\o001-\o032][\o001-\o032]*$/d' /dev/null
>

$ /usr/bin/sed -e '/^[\o001-\o032][\o001-\o032]*$/d' /dev/null
sed: 1: "/^[\o001-\o032][\o001-\ ...": RE error: invalid character rangeThat gives 

(I've installed the GNU sed package "gsed" for now, as a workaround.
That's why I invoke /usr/bin/sed.

> If it fails, does the following work?
>
> # sed -e '/^[\001-\032][\001-\032]*$/d' /dev/null

/usr/bin/sed -e '/^[\001-\032][\001-\032]*$/d' /dev/null
sed: 1: "/^[\001-\032][\001-\032 ...": RE error: invalid character range
>
> Does 'sed --version' return something useful? Do you know which sed
> version it is, otherwise?

It doesn't have a --version. The man page says

AUTHORS
     Diomidis D. Spinellis <dds <at> FreeBSD.org>

so I guess it's the FreeBSD one.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Mon, 21 Apr 2025 16:17:01 GMT) Full text and rfc822 format available.

Message #17 received at 77944 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 77944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Mon, 21 Apr 2025 18:16:40 +0200
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

Hi Gerd,

> Frohe Ostern!

Naja, fast vorbei. Trotzdem auch fuer Dich viele Ostereier!

>> If it fails, does the following work?
>>
>> # sed -e '/^[\001-\032][\001-\032]*$/d' /dev/null
>
> /usr/bin/sed -e '/^[\001-\032][\001-\032]*$/d' /dev/null
> sed: 1: "/^[\001-\032][\001-\032 ...": RE error: invalid character range

So it isn't due to my change. GNU sed is required for this expression
anyway.

I could check whether GNU sed is in game. But I don't know what to do in
case it isn't: don't use this regexp silently? Or use something else?
What works for BSD sed?

>> Does 'sed --version' return something useful? Do you know which sed
>> version it is, otherwise?
>
> It doesn't have a --version. The man page says
>
> AUTHORS
>      Diomidis D. Spinellis <dds <at> FreeBSD.org>
>
> so I guess it's the FreeBSD one.

I see. Does of the following work with BSD sed?

--8<---------------cut here---------------start------------->8---
# sed -e '/^[[:cntrl:]][[:cntrl:]]*$/d' /dev/null
# sed -e '/^[\\o0001-\\o0032][\\o0001-\\o0032]*$/d' /dev/null
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Mon, 21 Apr 2025 16:42:02 GMT) Full text and rfc822 format available.

Message #20 received at 77944 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 77944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Mon, 21 Apr 2025 18:41:25 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

> I see. Does of the following work with BSD sed?
>
> # sed -e '/^[[:cntrl:]][[:cntrl:]]*$/d' /dev/null
> # sed -e '/^[\\o0001-\\o0032][\\o0001-\\o0032]*$/d' /dev/null

Neither prints an error in the shell.

I then

1 file changed, 1 insertion(+), 1 deletion(-)
lisp/man.el | 2 +-

modified   lisp/man.el
@@ -637,7 +637,7 @@ Man-init-defvars
 	       "")
              ;; Use octal numbers.  Otherwise, \032 (Ctrl-Z) would
              ;; suspend remote connections.
-	     "-e '/^[\\o001-\\o032][\\o001-\\o032]*$/d'"
+	     "-e '/^[[:cntrl:]][[:cntrl:]]*$/d'"
 	     "-e '/\e[789]/s///g'"
 	     "-e '/Reformatting page.  Wait/d'"
 	     "-e '/Reformatting entry.  Wait/d'"

built and M-x man in emacs -Q, and that works (with gsed uninstalled).
Didn't try the other one, but I could if you want me to.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Mon, 21 Apr 2025 17:27:02 GMT) Full text and rfc822 format available.

Message #23 received at 77944 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 77944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Mon, 21 Apr 2025 19:26:18 +0200
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

Hi Gerd,

> I then
>
> 1 file changed, 1 insertion(+), 1 deletion(-)
> lisp/man.el | 2 +-
>
> modified   lisp/man.el
> @@ -637,7 +637,7 @@ Man-init-defvars
>  	       "")
>               ;; Use octal numbers.  Otherwise, \032 (Ctrl-Z) would
>               ;; suspend remote connections.
> -	     "-e '/^[\\o001-\\o032][\\o001-\\o032]*$/d'"
> +	     "-e '/^[[:cntrl:]][[:cntrl:]]*$/d'"
>  	     "-e '/\e[789]/s///g'"
>  	     "-e '/Reformatting page.  Wait/d'"
>  	     "-e '/Reformatting entry.  Wait/d'"
>
> built and M-x man in emacs -Q, and that works (with gsed uninstalled).

Great!

> Didn't try the other one, but I could if you want me to.

Yes, please try. [[:cntrl:]] is equal to [\\o0000-\\o0037]. Much
more than [\\o0001-\\o0032], so I'd prefer the latter.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Mon, 21 Apr 2025 17:56:02 GMT) Full text and rfc822 format available.

Message #26 received at 77944 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 77944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Mon, 21 Apr 2025 19:55:20 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
>
> Hi Gerd,
>
>> I then
>>
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> lisp/man.el | 2 +-
>>
>> modified   lisp/man.el
>> @@ -637,7 +637,7 @@ Man-init-defvars
>>  	       "")
>>               ;; Use octal numbers.  Otherwise, \032 (Ctrl-Z) would
>>               ;; suspend remote connections.
>> -	     "-e '/^[\\o001-\\o032][\\o001-\\o032]*$/d'"
>> +	     "-e '/^[[:cntrl:]][[:cntrl:]]*$/d'"
>>  	     "-e '/\e[789]/s///g'"
>>  	     "-e '/Reformatting page.  Wait/d'"
>>  	     "-e '/Reformatting entry.  Wait/d'"
>>
>> built and M-x man in emacs -Q, and that works (with gsed uninstalled).
>
> Great!
>
>> Didn't try the other one, but I could if you want me to.
>
> Yes, please try. [[:cntrl:]] is equal to [\\o0000-\\o0037]. Much
> more than [\\o0001-\\o0032], so I'd prefer the latter.

The second one doesn't work. It gives the error again in M-x man. Also
in the shell

/Users/gerd/emacs/github/cl-packages % sed -e '/^[\\o0001-\\o0032][\\o0001-\\o0032]*$/d' /dev/null
sed: 1: "/^[\\o0001-\\o0032][\\o ...": RE error: invalid character range

I guess I had gsed still installed when I tried that in zsh, and forgot
to add the /usr/bin/.





Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Tue, 22 Apr 2025 06:53:05 GMT) Full text and rfc822 format available.

Notification sent to Gerd Möllmann <gerd.moellmann <at> gmail.com>:
bug acknowledged by developer. (Tue, 22 Apr 2025 06:53:06 GMT) Full text and rfc822 format available.

Message #31 received at 77944-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 77944-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Tue, 22 Apr 2025 08:52:44 +0200
Version: 31.1

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

Hi Gerd,

>> Yes, please try. [[:cntrl:]] is equal to [\\o0000-\\o0037]. Much
>> more than [\\o0001-\\o0032], so I'd prefer the latter.
>
> The second one doesn't work. It gives the error again in M-x man. Also
> in the shell
>
> /Users/gerd/emacs/github/cl-packages % sed -e '/^[\\o0001-\\o0032][\\o0001-\\o0032]*$/d' /dev/null
> sed: 1: "/^[\\o0001-\\o0032][\\o ...": RE error: invalid character range
>
> I guess I had gsed still installed when I tried that in zsh, and forgot
> to add the /usr/bin/.

Thanks for the check. So I've pushed a patch using [:cntrl:] to
master. Closing the bug.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77944; Package emacs. (Tue, 22 Apr 2025 07:03:01 GMT) Full text and rfc822 format available.

Message #34 received at 77944-done <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 77944-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
Date: Tue, 22 Apr 2025 09:01:55 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Version: 31.1
>
> Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
>
> Hi Gerd,
>
>>> Yes, please try. [[:cntrl:]] is equal to [\\o0000-\\o0037]. Much
>>> more than [\\o0001-\\o0032], so I'd prefer the latter.
>>
>> The second one doesn't work. It gives the error again in M-x man. Also
>> in the shell
>>
>> /Users/gerd/emacs/github/cl-packages % sed -e '/^[\\o0001-\\o0032][\\o0001-\\o0032]*$/d' /dev/null
>> sed: 1: "/^[\\o0001-\\o0032][\\o ...": RE error: invalid character range
>>
>> I guess I had gsed still installed when I tried that in zsh, and forgot
>> to add the /usr/bin/.
>
> Thanks for the check. So I've pushed a patch using [:cntrl:] to
> master. Closing the bug.
>
> Best regards, Michael.

Thanks for the quick fix!




This bug report was last modified 2 days ago.

Previous Next


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