From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Emacs interface for Guix Date: Fri, 22 Aug 2014 16:44:01 +0400 Message-ID: <8738copucu.fsf@gmail.com> References: <87k3719v7p.fsf@gmail.com> <87r419fa50.fsf@gnu.org> <87fvho9fqm.fsf@gmail.com> <87a97taixl.fsf@gmail.com> <87sil2rbly.fsf@gnu.org> <87tx5idn7f.fsf_-_@gmail.com> <87egwlkcy1.fsf@gnu.org> <87ppg5el2i.fsf@gmail.com> <87d2c5h4if.fsf@gnu.org> <87lhqsev1d.fsf@gmail.com> <877g2c74xh.fsf@gnu.org> <87ha1gds3w.fsf@gmail.com> <8761hsmxkl.fsf@gnu.org> <87zjf4d1mh.fsf@gmail.com> <87mwb0b3fq.fsf@gnu.org> <87ha17ctyv.fsf_-_@gmail.com> <87ppfs6gxk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKoCS-0007qk-1N for guix-devel@gnu.org; Fri, 22 Aug 2014 08:44:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKoCM-0005MZ-Dk for guix-devel@gnu.org; Fri, 22 Aug 2014 08:44:11 -0400 In-Reply-To: <87ppfs6gxk.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 22 Aug 2014 10:56:39 +0200") 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s (2014-08-22 12:56 +0400) wrote: > Alex Kost skribis: > >> Thanks, now (with the latest =E2=80=9Cguix pull=E2=80=9D), installing/up= grading/removing >> should work in "guix.el". If you (or someone else) wish to try it, you >> may use: >> >> (setq guix-dry-run t) >> >> (It has the same meaning as =E2=80=9C--dry-run=E2=80=9D option). > > I gave it a try, but AFAICS, when the REPL is started as =E2=80=9Cinterna= l=E2=80=9D, > guix-main.scm isn=E2=80=99t loaded, and thus =E2=80=9CInstall=E2=80=9D fa= ils: > > scheme@(guile-user)> (process-package-actions #:install '((58935712 "out"= )) #:upgrade '() #:remove '() #:use-substitutes? #t #:dry-run? #f) > ;;; :11:0: warning: possibly unbound variable `process-package-act= ions' > :11:0: In procedure #:= 11:0 ()>: > :11:0: In procedure module-lookup: Unbound variable: proces= s-package-actions > > Did I miss something? I don't understand why you get this, it works for me and I can't reproduce it with "emacs -Q". Does the following recipe works for you?: 1. emacs -Q 2. Evaluate the following code (for example, paste it into *scratch* buffer and "M-x eval-buffer"): --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=test.el Content-Transfer-Encoding: quoted-printable (add-to-list 'load-path "/path/to/geiser-dir") (add-to-list 'load-path "/path/to/guix.el-dir") (setq guix-dry-run t) (autoload 'guix-search-by-name "guix" nil t) (autoload 'guix-search-by-regexp "guix" nil t) (autoload 'guix-installed-packages "guix" nil t) (autoload 'guix-obsolete-packages "guix" nil t) (autoload 'guix-all-available-packages "guix" nil t) (autoload 'guix-newest-available-packages "guix" nil t) (autoload 'guix-generations "guix" nil t) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 3. M-x guix-all-available-packages 4. RET on any package that is not installed and press "Install" button in =E2=80=9C*Guix Package Info*=E2=80=9D buffer. For me =E2=80=9C*Guix = REPL*=E2=80=9D is shown and the following output is printed: --=-=-= Content-Type: text/plain Content-Disposition: inline scheme@(guile-user)> (process-package-actions #:install '((151687520 "out")) #:upgrade '() #:remove '() #:use-substitutes? #t #:dry-run? #t) The process begins ... The following package would be installed: a2ps-4.14 out /gnu/store/1akh02xh4z7i2idfnxbd28zzm87ghav1-a2ps-4.14 substitute-binary: ;;; note: source file /usr/share/guile/site/2.0/guix/config.scm substitute-binary: ;;; newer than compiled /usr/share/guile/site/2.0/guix/config.go The following derivation would be built: /gnu/store/868vmg9s02jf4pxm3nvfmk168qbx44ld-profile.drv The following files would be downloaded: /gnu/store/1akh02xh4z7i2idfnxbd28zzm87ghav1-a2ps-4.14 /gnu/store/43bg01fshdm6hnacb9b8mha681cll0nw-coreutils-8.22 /gnu/store/sv8ijfgc0d4ll8wzlxa6s2rkcvcjgrwx-perl-5.16.1 scheme@(guile-user)> --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I tried with emacs 24.3.1 and the latest Geiser (from ). > Besides, I like M-x guix-generations, pretty cool. :-) > >> Also I would like to add support for deleting generations (to >> "guix.el"), so I think it would be good to export =E2=80=98delete-genera= tion=E2=80=99 >> from "scripts/package.scm". WDYT? > > Yes, that makes sense, one could use it from the *Guix Generation List* > buffer. Yes, that's what I had in mind: mark generations with "d" and execute a deletion operation with "x". > Regarding package installation/removal/upgrade, I think it would be > great UI-wise to support transactions that perform multiple operations. > > I was initially thinking of something similar to what package.el does: > marks packages from installation/removal, and then hit =E2=80=98x=E2=80= =99 to execute > the transaction. So the current =E2=80=9CInstall=E2=80=9D and =E2=80=9CD= elete=E2=80=9D buttons could be > changed to just mark things for installation/removal. It is already available in a =E2=80=9C*Guix Package List*=E2=80=9D buffer: = you can mark packages with "d"/"i"/"^" ("u" is for unmarking) and execute an operation with "x". As for me, I prefer to keep buttons in a =E2=80=9C*Guix Package Info*=E2=80=9D buffer as they are now. It's just an alternative wa= y to install/delete a package: if you want to make a transaction of several actions =E2=80=93 use a "list" buffer, if you just want to install some pac= kage, you can do it by pressing a button in "info" buffer. -- Alex Kost --=-=-=--