From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Emacs interface for Guix Date: Tue, 22 Jul 2014 10:20:58 +0400 Message-ID: <87y4vlq5h1.fsf@gmail.com> References: <87zjg9rgih.fsf@gmail.com> <871ttlgzfl.fsf@gnu.org> <87vbqxqg3n.fsf@gmail.com> <87ha2fm3gk.fsf@gnu.org> <87r41hrdks.fsf@gmail.com> <8738dxe2jq.fsf@gnu.org> <87mwc4qzd5.fsf@gmail.com> <878uno9l7b.fsf@gnu.org> <87iomsq8fe.fsf@gmail.com> <874myb95j0.fsf@gnu.org> <87a983qken.fsf@gmail.com> <87k3764s1c.fsf@gnu.org> <8761iqr1my.fsf@gmail.com> <87zjg21k0d.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]:55691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9TRi-0000tb-Pt for guix-devel@gnu.org; Tue, 22 Jul 2014 02:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9TRZ-0000eK-OM for guix-devel@gnu.org; Tue, 22 Jul 2014 02:21:06 -0400 In-Reply-To: <87zjg21k0d.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 21 Jul 2014 23:26:10 +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 Ludovic Court=C3=A8s (2014-07-22 01:26 +0400) wrote: > Alex Kost skribis: > >> Ludovic Court=C3=A8s (2014-07-21 20:04 +0400) wrote: > > [...] > >>> I think guix.el should be able to distinguish packages internally, so >>> that when I choose, say, a specific =E2=80=9Cguile-2.0.11=E2=80=9D, tha= t=E2=80=99s really the >>> one that gets installed (maybe it already does, I haven=E2=80=99t check= ed.) >> >> No it doesn't and I don't see how it can be done. > > A trick that may work is to propagate Scheme-side eq?-ness to the elisp > side using =E2=80=98object-address=E2=80=99: (object-address some-package= ) returns a > number that uniquely identifies =E2=80=98some-package=E2=80=99 for the du= ration of the > Guile session. > > [...] > >> I didn't think much about it, but right now this is the only workaround >> I can imagine. What do you think? > > What do you think of the trick above? Ah, thanks, I didn't know about =E2=80=98object-address=E2=80=99, it will b= e a perfect ID. But I'm going to make a vhash of address/package pairs anyway, as I need =E2=80=98get-package-by-id=E2=80=99 and =E2=80=98get-packages-by-ids= =E2=80=99 functions and I guess it is not possible to get an object by its address (?), so I think =E2=80=9C(vhash-assq
)=E2=80=9D will be the best = choice to get a particular package. Thanks, Alex.