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: Eli Zaretskii <eliz <at> gnu.org>
To: David Caldwell <david <at> porkrind.org>
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 09:08:47 +0300
> Date: Sun, 15 Jun 2025 12:21:29 -0700
> From: David Caldwell <david <at> porkrind.org>
> Cc: 77944 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
> 
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > To: Przemysław Kryger <pkryger <at> gmail.com>
> > Cc: 77944 <at> debbugs.gnu.org, gerd.moellmann <at> gmail.com, michael.albinus <at> gmx.de
> > Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error
> > Date: Fri, 30 May 2025 07:42:38 +0300
> >
> > > Date: Thu, 29 May 2025 17:40:35 +0100
> > > From: Przemysław Kryger <pkryger <at> gmail.com>
> > > CC: gerd.moellmann <at> gmail.com, eliz <at> gnu.org
> > 
> > > 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.
> 
> What about something more surgical, like:
> 
> diff --git a/lisp/man.el b/lisp/man.el
> index dcfab8d2035..060c3f99916 100644
> --- a/lisp/man.el
> +++ b/lisp/man.el
> @@ -650,9 +650,11 @@ Man-init-defvars
>  	     (if Man-sed-script
>  		 (concat "-e '" Man-sed-script "'")
>  	       "")
> -             ;; Use octal numbers.  Otherwise, \032 (Ctrl-Z) would
> -             ;; suspend remote connections.
> -	     "-e '/^[\\o001-\\o032][\\o001-\\o032]*$/d'"
> +             (if (eq system-type 'darwin)
> +                 ;; Darwin sed doesn't support \o notation.
> +                 "-e '/^[[:cntrl:]][[:cntrl:]]*$/d'"
> +               ;; Use octal numbers.  Otherwise, \032 (Ctrl-Z) would
> +               ;; suspend remote connections.
> +	       "-e '/^[\\o001-\\o032][\\o001-\\o032]*$/d'")
>  	     "-e '/\e[789]/s///g'"
>  	     "-e '/Reformatting page.  Wait/d'"
>  	     "-e '/Reformatting entry.  Wait/d'"
> 
> That way it only impacts darwin users (which are totally without it).

I could consider this if otherwise "M-x man" is completely broken on
macOS.  Is it?

> I'd love to not have to patch emacs or install an alternative sed...

I don't understand why: installing GNU Sed should be easy, and you
don't lose anything by doing that.




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.