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: Add a name/version/synopsis heading in package-info buffers Date: Thu, 30 Oct 2014 14:16:58 +0100 Message-ID: <87fve5u27p.fsf@gnu.org> References: <87d29akflu.fsf@gnu.org> <87y4ryle1l.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]:50555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkEQM-0005TU-AX for guix-devel@gnu.org; Fri, 31 Oct 2014 11:49:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xjpah-0006bD-6u for guix-devel@gnu.org; Thu, 30 Oct 2014 09:16:48 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:40888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjpag-0006b9-VU for guix-devel@gnu.org; Thu, 30 Oct 2014 09:16:39 -0400 In-Reply-To: <87y4ryle1l.fsf@gmail.com> (Alex Kost's message of "Thu, 30 Oct 2014 01:13:58 +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 Alex Kost skribis: > Ludovic Court=C3=A8s (2014-10-29 19:25 +0300) wrote: > >> Hello, >> >> What would think of a patch like this: > > [...] > >> (defun guix-info-insert-entry (entry entry-type &optional indent-level) >> "Insert ENTRY of ENTRY-TYPE into the current info buffer. >> If INDENT-LEVEL is non-nil, indent displayed information by this >> number of `guix-info-indent' spaces." >> (let ((region-beg (point))) >> + (guix-info-insert-heading entry) >> (mapc (lambda (param) >> - (guix-info-insert-param param entry entry-type)) >> + ;; The name, version, and synopsis are already displayed. >> + (unless (memq param '(name version synopsis)) >> + (guix-info-insert-param param entry entry-type))) >> (guix-info-get-displayed-params entry-type)) >> (when indent-level >> (indent-rigidly region-beg (point) > > =E2=80=98guix-info-insert-entry=E2=80=99 is used to insert any type of in= formation, not > only packages, so you can see artifacts (empty lines and "=E2=80=93") in = other > "views". Ah, OK. > I'm attaching the modified version of your patch. I added there several > variables that allow a user to specify functions for displaying info > (perhaps there will be several variants of displaying info in the > future). So if someone would like to return to the previous variant of > displaying a package, he could do it with: > > (setq guix-info-insert-package-function nil) Sounds good! > Thanks again, I really like your suggestion, I just prefer to keep > previous possibilities instead of replacing them with the new ones. Yes, why not. I=E2=80=99m a bit concerned about the cost of keeping several variants of different things, esp. because in practice almost only one variant would be tested. WDYT? > Are you going to make a commit or should I do it? (of course if you > don't have comments on my patch) Please go ahead! I=E2=80=99m thinking perhaps we should do something similar for the descrip= tion itself, like display it right below the synopsis. Thoughts? Thanks, Ludo=E2=80=99.