Ludovic Courtès (2015-07-13 23:08 +0300) wrote: > * emacs/guix-info.el (guix-package-info-insert-heading): Add call to > 'fill-region'. > --- > emacs/guix-info.el | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/emacs/guix-info.el b/emacs/guix-info.el > index bb21024..1e03d65 100644 > --- a/emacs/guix-info.el > +++ b/emacs/guix-info.el > @@ -494,8 +494,11 @@ Show package name, version, and `guix-package-info-heading-params'." > (face (guix-get-symbol (symbol-name param) > 'info 'package))) > (when val > - (guix-format-insert val (and (facep face) face)) > - (insert "\n\n")))) > + (let ((begin (point)) > + (fill-column (min (window-width) 72))) Since there is a buffer-local 'fill-column' variable, I think we may use it instead of hard-coding '72', so that a user could change it, for example like this: (add-hook 'guix-package-info-mode-hook (lambda () (setq fill-column 60))) > + (guix-format-insert val (and (facep face) face)) > + (fill-region begin (point)) I think it's better to use 'guix-get-filled-string' instead of (let ((begin (point))) ... (fill-region begin (point))) > + (insert "\n\n"))))) > guix-package-info-heading-params)) > > (defun guix-package-info-insert-with-heading (entry) Actually, I think that preserving the original formatting used in "description" fields is a feature, not a bug, as it allows to find too long lines or other related things and then to fix those. (For example, I've just accidentally found that the first line of "pulseaudio" description is too long, and when I looked at the source, I also noticed that the description ends with a space. With your change it wouldn't be possible to notice :-)) But as we can always add another option for a user to choose the variant he wants, I agree. What about the attached modified patch? Also as it may concern synopsis (when a current window is too small to fit the synopsis), I renamed the patch into "emacs: Fill package heading in Info buffers."