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.

alper
  • 1,238
  • 11
  • 30
  • Which version of Emacs are you using? – phils Mar 21 '23 at 21:44
  • Currently I am using GNU Emacs 28.2.50 – alper Mar 21 '23 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 '23 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 '23 at 23:43
  • Last question: Do you see the same in other terminals? (i.e. not iTerm) – phils Mar 22 '23 at 22:35
  • 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 '23 at 09:18
  • Please simplify your question to the `emacs -nw` case, without the custom shell script. – phils Mar 24 '23 at 10:08
  • Clarify whether you see the same thing starting from `emacs -Q` and setting those user options manually. If you do, simplify your question further to that case. If you do not, then state that in your question (and probably start bisecting your config at that point). – phils Mar 24 '23 at 10:14
  • Assuming Emacs is compiled with GUI support, please also clarify whether the terminal is actually a factor at all -- do you see the problem in GUI frames? – phils Mar 24 '23 at 10:16
  • Pleasae note that there is no GUI support. – alper Mar 25 '23 at 21:27

1 Answers1

1

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

db48x
  • 15,741
  • 1
  • 19
  • 23
  • 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 '23 at 22:31