[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs interface for Guix

From: Alex Kost
Subject: Re: Emacs interface for Guix
Date: Tue, 22 Jul 2014 10:20:58 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Ludovic Courtès (2014-07-22 01:26 +0400) wrote:

> Alex Kost <address@hidden> skribis:
>> Ludovic Courtès (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 “guile-2.0.11”, that’s really the
>>> one that gets installed (maybe it already does, I haven’t checked.)
>> 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 ‘object-address’: (object-address some-package) returns a
> number that uniquely identifies ‘some-package’ for the duration 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 ‘object-address’, it will be a perfect
ID.  But I'm going to make a vhash of address/package pairs anyway, as I
need ‘get-package-by-id’ and ‘get-packages-by-ids’ functions and I guess
it is not possible to get an object by its address (?), so I think
“(vhash-assq <address> <packages-vhash>)” will be the best choice to get
a particular package.

Thanks, Alex.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]