GNU bug report logs -
#2588
23.0.90; Man buffer improperly formatted - wrong width
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sat, 7 Mar 2009 00:30:02 UTC
Severity: normal
Merged with 9084,
17831
Found in version 24.0.50
Fixed in version 24.4.50
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #30 received at 2588 <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: Eli Zaretskii Sent: Saturday, March 07, 2009 5:58 AM
> > M-x set-variable RET pop-up-frames RET t
> >
> > Resize the current frame so that it is, say, only 30 chars wide.
> >
> > M-x man RET bash RET
> >
> > Buffer *Man bash* is shown in a new frame. The frame has the usual
> > default width of 80 chars. But the text of the buffer is
> > formatted to be only 30 chars wide.
>
> I cannot reproduce this on my system, but I think I know why, see
> below.
>
> > This same bug exists for Emacs 22 (e.g. 22.3) and Emacs 21
> > (e.g. 21.3.1). Emacs 20 (e.g. 20.7) has no such bug.
>
> That's because Emacs 20 didn't set COLUMNS in the environment before
> invoking the `man' program. But that had other adverse effects on X,
> see the comments in man.el where it sets COLUMNS.
>
> > In Emacs 21, the bug occurs even without loading the two
> > Cywin helper libraries. With my SHELL var set to /bin/bash.exe,
> > I cannot test Emacs 22 or 23 without loading those libraries,
> > but I suspect the same bug occurs, as it does in Emacs 21. IOW,
> > I don't think this has anything to do with using Cygwin.
>
> Actually, it does have something to do with Cygwin: I'm guessing your
> man.exe comes from Cygwin, and tries to honor the COLUMNS environment
> variable. My man.exe is a natively compiled clone of the Unix `man'
> command, and it doesn't pay attention to COLUMNS, so it always
> produces text whose width assumes an 80-column display, no matter what
> COLUMNS says.
That makes sense.
That Emacs sets COLUMNS to `Man-width' is fine. The problem is apparently that
If `Man-width' is not defined (as a positive integer) then Emacs sets COLUMNS to
the current `frame-width'. That's the cause of the bug, AFAICT. Logically, the
current (soon to be previous) frame width is 100% irrelevant to `man's display.
This bug report was last modified 11 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.