From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] emacs: Fill package description in Info buffers. Date: Tue, 14 Jul 2015 15:15:08 +0200 Message-ID: <87vbdmswwz.fsf@gnu.org> References: <1436818091-6524-1-git-send-email-ludo@gnu.org> <87y4ijxhrf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF03O-0000OO-Nz for guix-devel@gnu.org; Tue, 14 Jul 2015 09:15:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZF03I-0003G5-CB for guix-devel@gnu.org; Tue, 14 Jul 2015 09:15:22 -0400 In-Reply-To: <87y4ijxhrf.fsf@gmail.com> (Alex Kost's message of "Tue, 14 Jul 2015 11:31:16 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > 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))) Indeed, it=E2=80=99s better this way. >> + (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))) Agreed, I hadn=E2=80=99t noticed that one. > 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 :-)) I think I would turn to the source file when I want to nitpick on description formatting. ;-) > 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." Your patch looks better indeed. Please push, thank you! Ludo=E2=80=99.