help-guix
[Top][All Lists]
Advanced

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

Re: Guix and Emacs Integration for Polyglot Development


From: Alex Kost
Subject: Re: Guix and Emacs Integration for Polyglot Development
Date: Sun, 28 Oct 2018 17:39:44 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

George Clemmer (2018-10-27 15:32 -0400) wrote:

> Alex Kost <address@hidden> writes:
>
>> George Clemmer (2018-10-26 16:56 -0400) wrote:
>>
>>> I have another question. Is there a shortcut to
>>> guix-installed-system-packages in the popup that I am missing?
>>
>> No, there is a direct shortcut.  Currently there are 2 "long" ways
>> to access system packages from "M-x guix":
>>
>> 1) setting current profile to the system one ("p" in "packages"
>> sub-popup) and openning installed packages (with "i" key), or
>>
>> 2) through *Guix Profiles* buffer (which can be accessed with "M-x guix
>> P a"): there you can move to the system profile and press "P".
>
> I also found ... 'M-x guix P s P' ... which I had missed and is all I
> want/need ;-)

Oh, cool, I forgot about it :-)

>> I'm afraid, I am not going to add a shortcut for system packages inside
>> "packages" sub-popup, as it and "profiles" sub-popup are designed to
>> work with the current profile, so if you want to open packages or
>> generations from some profile, you need to make it the current one at
>> first.
>>
>> But maybe it would be good to add a new sub-popup for system commands,
>> where a key for system packages will be placed, WDYT?
>
> I agree with your approach.  I think this is all REALLY GREAT STUFF. You
> can leave it just the way it is and I will be happy.
>
> FWIW, here are a few comments/ideas ...
>
> It would be handy if 'quit-window' in the final buffer reached via
> *guix-popup* took me take me back 'UP' the "tree" of sub-popups that
> lead there so I could chose another option.

Is "q" key what you are looking for?  It is a general "magit-popup"
thing and there is nothing I can do about it on Emacs-Guix side.

Note, however, that "q" works only for one level, I mean if you press
"q" one time, it will take you back to the previous popup, but if you
press it again, it will simply quit.  Yet again, this is how
"magit-popup" works.

> With regard to system/user profiles. First, to state what may not be
> obvious to a novice guix user ...
>
> - In addition to the "default user" profile, you may use multiple "user
>   project" profiles.
>
> - In practice, a novice uses the packages in the union of the system and
>   default "user" profile. A more advanced user may have 1 or more
>   "project" profiles as well.
>
> - The system profile is fundamentally "a different kind of
>   animal". There is only one and you need different guix "tools" to
>   modify it.
>
> In the present design, presenting the system profile as "just another
> profile" in *Guix Profiles* leads to slapping the user's hand if/when
> they try to change the system profile, E.g.,
>
>     user-error: Packages cannot be installed or removed to/from profile 
> ’/var/guix/profiles/system/profile’.
>     Use ’guix system reconfigure’ shell command to modify a system profile.
>
> If, as you suggest, you create the system sub-popup

I went ahead and added it (by commit bffd65a).  I think keeping system
commands in one place is good.

> you might consider
> removing the system profile from *Guix Profiles* since the user can get
> to the system profile package list via system generations + 'P'.

No, no, I will not hide system profile.  Yes, you can't install anything
to it with the usual means, but it is a profile after all, and you can
see what packages are installed there.  Besides, some day a user should
learn that the only way to update a system profile is "guix system …"
command.

BTW, in general, I think that hiding features is a bad thing… however,
there is one hidden feature in Emacs-Guix (although, it is hidden just
because it is also hidden in Guix itself ;-) )

> Of
> course, you may still choose to show the user the error message above,
> but it would no longer be an asymmetric behavior on one of a group of
> things presented as equals.
>
> It might be useful to allow the user to see system profile packages in
> the context a user/project profile. E.g., a key could toggle the system
> profile packages into and out of the *Guix Packages * list view.

Sorry, I didn't understand this phrase.  Do you mean there should be a
key in *Guix Packages* buffer to show system packages along with the
current user packages?  If so, I'm afraid it is not possible, as these
"Packages" buffers are designed to show packages only from a single
profile.

-- 
Alex



reply via email to

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