From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] emacs: Add completions for '--type' option of 'refresh' popup. Date: Sat, 31 Oct 2015 23:29:20 +0300 Message-ID: <87611mlr33.fsf@gmail.com> References: <87h9layg9i.fsf@gmail.com> <871tcda0us.fsf@gnu.org> 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]:56562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZscmB-0005Bn-Th for guix-devel@gnu.org; Sat, 31 Oct 2015 16:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zscm6-00030U-SJ for guix-devel@gnu.org; Sat, 31 Oct 2015 16:29:23 -0400 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s (2015-10-29 23:14 +0300) wrote: > Alex Kost skribis: > >> This is for completions in "M-x guix r =3Dt". >> >> In 'emacs/guix-main.scm' I used: >> >> (map (@ (guix upstream) upstream-updater-name) >> (@ (guix scripts refresh) %updaters))) >> >> instead of adding these modules to the top-level (use-modules ...) to >> avoid loading them on start. > > That doesn=E2=80=99t avoid anything actually. Ouch :-( > You could use #:autoload, but only for =E2=80=98%updaters=E2=80=99 because > =E2=80=98upstream-updater-name=E2=80=99 is a macro so it needs to be avai= lable at > expansion time. I looked at (info "(guile) Using Guile Modules") and it has the following: An autoload is a good way to put off loading a big module until it=E2=80=99s really needed, for instance for faster startup= or if it will only be needed in certain circumstances. =E2=80=98@=E2=80=99 can do a similar thing (see Using Guile Modul= es), but in that case an =E2=80=98@=E2=80=99 form must be written every ti= me a binding from the module is used. To me it sounds like =E2=80=98@=E2=80=99 does the same thing as =E2=80=98#:= autoload=E2=80=99, no? Also #:autoload should be used inside (define-module ...), but =E2=80=98guix-main.scm=E2=80=99 does not define a module. >> From f2bd4c152ddd48a6c1cc13adfff0a616d1732bd3 Mon Sep 17 00:00:00 2001 >> From: Alex Kost >> Date: Wed, 28 Oct 2015 21:11:36 +0300 >> Subject: [PATCH] emacs: Add completions for '--type' option of 'refresh' >> popup. >> >> * guix/scripts/refresh.scm: Export '%updaters'. >> * emacs/guix-main.scm (refresh-updater-names): New procedure. >> * emacs/guix-base.el (guix-refresh-updater-names): New function. >> * emacs/guix-read.el (guix-read-refresh-updater-names, >> guix-read-refresh-updater-names-string): New functions. >> * emacs/guix-command.el (guix-command-improve-refresh-argument): Use >> 'guix-read-refresh-updater-names-string'. > > OK with guix-main.scm using appropriate #:autoload and #:use-module. Not sure if I understand it correctly after all, but I think I should either leave =E2=80=98@=E2=80=99 or add (guix upstream) and (guix scripts r= efresh) to (use-modules ...), right? --=20 Alex