0

I am using GNU Emacs 28.2.50 along with emacsclient.

I am using https://www.emacswiki.org/emacs/ManMode. When I have a smaller width size in a iTerm terminal, man-mode kind of messed up for long lines. The comparasion could be seen here:

=> Upper window is in emacs. => Lower window is in less where original (command man wget) is applied.

enter image description here

In emacs, for the long line, it continues from second line without a TAB. For example:

DESCRIPTION
    GNU Wget is a free utility for non-interactive download of files from the Web.  It supports HTTP, HTTPS, and FTP protocols, 
as well as retrieval through
       HTTP proxies.

should be:

DESCRIPTION
    GNU Wget is a free utility for non-interactive download of files from the Web.  It supports HTTP, HTTPS, and FTP protocols, as well 
    as retrieval through HTTP proxies.

Even I have set Man-width to nil and Man-width-max to 80 Link: https://emacs.stackexchange.com/a/62535/18414, it is not helped.

(define-key Man-mode-map "q" 'my-kill-emacs)
(define-key Man-mode-map "Q" 'my-kill-emacs)

(setq Man-width 80)
(setq Man-width-max 80)

The way I run man-mode page in emacs:

man () {
    emacsclient -cqut -nw -e "(let ((Man-notify-method 'bully)) (man \"$1\"))";
}

I am not sure what is preventing Man-width-max to be applied.

10
  • Which version of Emacs are you using?
    – phils
    Mar 21, 2023 at 21:44
  • Currently I am using GNU Emacs 28.2.50
    – alper
    Mar 21, 2023 at 23:21
  • Do you see the same problems if you don't use your emacsclient script? I.e. just using M-x man? If so, you should simplify the question by eliminating the client/server aspect. If not, then clarify the difference.
    – phils
    Mar 21, 2023 at 23:38
  • Also, does typing u in the man buffer to refresh it change the formatting? And what does C-h v Man-width-max report in that buffer?
    – phils
    Mar 21, 2023 at 23:43
  • 1
    I have tried Terminal is macOS and I observed the same behavior. Man-update-manpag (u) did not do anything. Man-width-max reported as 80. I see the same problem if I don't use emacsclient and instead use emacs -nw
    – alper
    Mar 24, 2023 at 9:18

1 Answer 1

1

Try setting Man-width-max to 0 instead of nil.

1
  • I don't understand how this helped vs setting Man-width-max to 80. A value of zero looks to be an undocumented way of not using the max width at all; but when it is used it acts as a limit, and a limit of 80 would not produce the longer lines seen in the screenshots.
    – phils
    Mar 25, 2023 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.