unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
@ 2016-02-07 18:04 myglc2
  2016-02-07 18:58 ` Andreas Enge
  2016-02-08  8:34 ` Alex Kost
  0 siblings, 2 replies; 19+ messages in thread
From: myglc2 @ 2016-02-07 18:04 UTC (permalink / raw)
  To: 22587


Alex Kost <alezost@gmail.com> writes:
[...]
> The purpose of "M-x guix-edit" Emacs command (and "guix edit" shell
> command) is just to show you the source code of the package.  This
> source is usually placed in the store, and you shouldn't edit it.  If
> you are going to contribute to guix, (info "(guix) Building from Git")
> is the right way.

From guix INFO:

6.2 Invoking ‘guix edit’
[...]
launches the program specified in the ‘VISUAL’ or in the ‘EDITOR’
environment variable to edit the recipe of GCC 4.8.4 and that of Vim."

TYPO:

"edit" (last line above) should be replaced with "view", "inspect", or
"examine".

RENAME:

Calling these functions 'guix edit' and 'M-x guix-edit' implies that the
user will be able to modify the recipe, but this is not actually the
case. The functions should be given a more informative and accurate
name, such as: 'guix view', 'guix inspect', or 'guix examine'.

MODE CHANGE:

In emacs, read-only .scm files should be opened in view-mode.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-02-07 18:04 bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change myglc2
@ 2016-02-07 18:58 ` Andreas Enge
  2016-02-07 19:22   ` myglc2
  2016-02-08  8:34 ` Alex Kost
  1 sibling, 1 reply; 19+ messages in thread
From: Andreas Enge @ 2016-02-07 18:58 UTC (permalink / raw)
  To: myglc2; +Cc: 22587

On Sun, Feb 07, 2016 at 01:04:40PM -0500, myglc2 wrote:
> TYPO:
> "edit" (last line above) should be replaced with "view", "inspect", or
> "examine".
> RENAME:
> Calling these functions 'guix edit' and 'M-x guix-edit' implies that the
> user will be able to modify the recipe, but this is not actually the
> case.

This depends on the user's rights. In a global installation, root is allowed
to modify. In a git checkout, one would need to do "./pre-inst-env guix edit"
like with all other guix commands.

Andreas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-02-07 18:58 ` Andreas Enge
@ 2016-02-07 19:22   ` myglc2
  2016-02-07 19:34     ` Andreas Enge
  0 siblings, 1 reply; 19+ messages in thread
From: myglc2 @ 2016-02-07 19:22 UTC (permalink / raw)
  To: 22587

Andreas Enge <andreas@enge.fr> writes:

> On Sun, Feb 07, 2016 at 01:04:40PM -0500, myglc2 wrote:
>> TYPO:
>> "edit" (last line above) should be replaced with "view", "inspect", or
>> "examine".
>> RENAME:
>> Calling these functions 'guix edit' and 'M-x guix-edit' implies that the
>> user will be able to modify the recipe, but this is not actually the
>> case.
>
> This depends on the user's rights. In a global installation, root is allowed
> to modify. In a git checkout, one would need to do "./pre-inst-env guix edit"
> like with all other guix commands.
>
> Andreas

Of course, running as root, 'guix edit' opens the recipe read-only and
from there, root can do whatever he/she likes.

But, AIUI, this goes against the guix concept of an immutable store.

To describe and name this function to imply that one could/should edit
recipes in the store based on the "corner case" of root having the
ultimable ability to do so seems counter to how you would want to
encourage even a root user to proceed.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-02-07 19:22   ` myglc2
@ 2016-02-07 19:34     ` Andreas Enge
  2016-02-07 20:26       ` myglc2
  0 siblings, 1 reply; 19+ messages in thread
From: Andreas Enge @ 2016-02-07 19:34 UTC (permalink / raw)
  To: myglc2; +Cc: 22587

On Sun, Feb 07, 2016 at 02:22:36PM -0500, myglc2 wrote:
> But, AIUI, this goes against the guix concept of an immutable store.
> To describe and name this function to imply that one could/should edit
> recipes in the store based on the "corner case" of root having the
> ultimable ability to do so seems counter to how you would want to
> encourage even a root user to proceed.

Recipes are not in the store. For instance, after doing a "make install",
they are in $PREFIX/share/guile/site/2.0/.

Or maybe they are in the store after a "guix pull"?

I am only using the "make install" version for a system-wide installation,
and a git checkout for making more recent recipes available to one user.

Andreas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-02-07 19:34     ` Andreas Enge
@ 2016-02-07 20:26       ` myglc2
  0 siblings, 0 replies; 19+ messages in thread
From: myglc2 @ 2016-02-07 20:26 UTC (permalink / raw)
  To: Andreas Enge; +Cc: 22587

Andreas Enge <andreas@enge.fr> writes:

> On Sun, Feb 07, 2016 at 02:22:36PM -0500, myglc2 wrote:
>> But, AIUI, this goes against the guix concept of an immutable store.
>> To describe and name this function to imply that one could/should edit
>> recipes in the store based on the "corner case" of root having the
>> ultimable ability to do so seems counter to how you would want to
>> encourage even a root user to proceed.
>
> Recipes are not in the store. For instance, after doing a "make install",
> they are in $PREFIX/share/guile/site/2.0/.
>
> Or maybe they are in the store after a "guix pull"?
>
> I am only using the "make install" version for a system-wide installation,
> and a git checkout for making more recent recipes available to one user.
>
> Andreas

On guixSD they are found under /root/.config/guix/latest which points,
for example, into the store like this:

latest -> /gnu/store/96s6sh92xyw0rljp3w1zxc8h3s4vb5zf-guix-latest

So it seems to me that editing these files will essenctially "corrupt" a
guix system.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-02-07 18:04 bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change myglc2
  2016-02-07 18:58 ` Andreas Enge
@ 2016-02-08  8:34 ` Alex Kost
  2016-02-08 15:30   ` Ludovic Courtès
  2016-02-08 18:29   ` myglc2
  1 sibling, 2 replies; 19+ messages in thread
From: Alex Kost @ 2016-02-08  8:34 UTC (permalink / raw)
  To: myglc2; +Cc: 22587

myglc2 (2016-02-07 21:04 +0300) wrote:

> From guix INFO:
>
> 6.2 Invoking ‘guix edit’
> [...]
> launches the program specified in the ‘VISUAL’ or in the ‘EDITOR’
> environment variable to edit the recipe of GCC 4.8.4 and that of Vim."
>
> TYPO:
>
> "edit" (last line above) should be replaced with "view", "inspect", or
> "examine".

Just to mention - I like "edit" name :-)

> RENAME:
>
> Calling these functions 'guix edit' and 'M-x guix-edit' implies that the
> user will be able to modify the recipe, but this is not actually the
> case. The functions should be given a more informative and accurate
> name, such as: 'guix view', 'guix inspect', or 'guix examine'.

Along with the package recipes that come with Guix, a user can also have
his/her own packages (specified using GUIX_PACKAGE_PATH env var), and
"guix edit my-super-package" opens a user's file with this package.  It
is highly likely that this file is editable, so "guix edit" is a perfect
name in this case I think.  IMO it's a user responsibility to understand
what files can be edited and what cannot.

But I agree that this may be confusing, so maybe we should clarify the
manual to explain in (info "(guix) Invoking guix edit") that store files
must not be edited.

> MODE CHANGE:
>
> In emacs, read-only .scm files should be opened in view-mode.

I don't agree.  For example, when you open "/etc/hosts" (or whatever)
file in Emacs, you get a message:

  Note: file is write protected

which indicates that it is opened read-only, but view-mode is not used
by default.  You can enable it manually if you wish.  The same thing
happens with package files.

-- 
Alex

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-02-08  8:34 ` Alex Kost
@ 2016-02-08 15:30   ` Ludovic Courtès
  2016-02-08 18:29   ` myglc2
  1 sibling, 0 replies; 19+ messages in thread
From: Ludovic Courtès @ 2016-02-08 15:30 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22587, myglc2

Alex Kost <alezost@gmail.com> skribis:

> myglc2 (2016-02-07 21:04 +0300) wrote:

[...]

>> Calling these functions 'guix edit' and 'M-x guix-edit' implies that the
>> user will be able to modify the recipe, but this is not actually the
>> case. The functions should be given a more informative and accurate
>> name, such as: 'guix view', 'guix inspect', or 'guix examine'.
>
> Along with the package recipes that come with Guix, a user can also have
> his/her own packages (specified using GUIX_PACKAGE_PATH env var), and
> "guix edit my-super-package" opens a user's file with this package.  It
> is highly likely that this file is editable, so "guix edit" is a perfect
> name in this case I think.  IMO it's a user responsibility to understand
> what files can be edited and what cannot.

I sympathize with the frustration of myglc2, but I agree with you Alex.

> But I agree that this may be confusing, so maybe we should clarify the
> manual to explain in (info "(guix) Invoking guix edit") that store files
> must not be edited.

Yes.  Can one of you propose a way to phrase it?

I also had in mind that ‘someday’ we could have:

  guix edit --clone foo

which would automatically open, say,
~/.config/guix/personal/packages.scm with a template like:

  (define-module (personal packages)
    #:use-module (guix packages)
    #:use-module (gnu packages foo))

  (define-public my-foo
    (package
      (inherit foo)
      (name "foo-personal")))

It’s a bit of work, but it’d be nice.

Ludo’.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-02-08  8:34 ` Alex Kost
  2016-02-08 15:30   ` Ludovic Courtès
@ 2016-02-08 18:29   ` myglc2
  2016-04-18  8:37     ` Alex Kost
  1 sibling, 1 reply; 19+ messages in thread
From: myglc2 @ 2016-02-08 18:29 UTC (permalink / raw)
  To: 22587

Alex Kost <alezost@gmail.com> writes:

> myglc2 (2016-02-07 21:04 +0300) wrote:
>
>> From guix INFO:
>>
>> 6.2 Invoking ‘guix edit’
>> [...]
>> launches the program specified in the ‘VISUAL’ or in the ‘EDITOR’
>> environment variable to edit the recipe of GCC 4.8.4 and that of Vim."
>>
>> TYPO:
>>
>> "edit" (last line above) should be replaced with "view", "inspect", or
>> "examine".
>
> Just to mention - I like "edit" name :-)
>
>> RENAME:
>>
>> Calling these functions 'guix edit' and 'M-x guix-edit' implies that the
>> user will be able to modify the recipe, but this is not actually the
>> case. The functions should be given a more informative and accurate
>> name, such as: 'guix view', 'guix inspect', or 'guix examine'.
>
> Along with the package recipes that come with Guix, a user can also have
> his/her own packages (specified using GUIX_PACKAGE_PATH env var), and
> "guix edit my-super-package" opens a user's file with this package.  It
> is highly likely that this file is editable, so "guix edit" is a perfect
> name in this case I think.  IMO it's a user responsibility to understand
> what files can be edited and what cannot.
>

Sorry this is so long, but I think this is a useability issue that is
worth discussing more.

I understand your point-of-view, but I think it is much more
packager-centric than you should plan on your ultimate user base being.

If we think about the mix of guix users when it is more widely
successful, as I strongly believe it will be, a majority (80-90%) will
be "simply" managing and configuring their computer and/or user
account. They will NOT make packages.

If this is the case, the majority of people clicking on "guix edit" will
not understand "what files can be edited and what cannot." The very idea
that a recipe on their computer can make something they need will be a
radical leap. For these people, taking the fist look at a guix recipe
will be a step deeper into guix.

Such a user's first interaction might run along the lines of mine ...

- Hmm, I want to see an actual recipe.

- Oh wow, it says I can edit a recipe right here!

- Hmm, maybe I shouldn't because I don't want to break something.

- But they wouldn't call it "guix edit" if it wasn't OK to change stuff,
  right?

- OK, I'll give it a shot. I'll look at something I am familiar with ...

- 'guix edit screen'

- WOW look at that. Finds the recipe, opens an editor, COOL! 

- Hmm, I'mm make a little change, & see what happens.

    call-interactively: Buffer is read-only: #<buffer screen.scm> [18 times]

- OK, it is actually not that obvious or easy to get out of emacs at
  this point even for emacs users (try it). Now, pretend you know
  nothing about emacs. What would you be thinking and experiencing? A
  non-emacs user might be thinking -- "Why is it beeping! Did I do
  something wrong!  Is guix broken! ARGH! Let me out of this thing!"  --
  So I expect we have lost the emacs non-user right here, but me, I
  continued along ...

- Oh yeah, its read-only. No problem, I'll do ‘C-x C-q’

- Now, change save it ...

    Saving file /gnu/store/24mbii9wjlyzfzsqwfmcvz6vz2fv5n6g-guix-0.9.0.c3f29bc/share/guile/site/2.0/gnu/packages/screen.scm...
    Cannot write backup file; backing up in ~/.emacs.d/%backup%~
    Error: (file-error "Setting ACL" "read-only file system"
    "/gnu/store/24mbii9wjlyzfzsqwfmcvz6vz2fv5n6g-guix-0.9.0.c3f29bc/share/guile/site/2.
    Auto-saving...
    Auto-saving screen.scm: Opening output file: read-only file system,
    /gnu/store/24mbii9wjlyzfzsqwfmcvz6vz2fv5n6g-guix-0.9.0.c3f29bc/share/guile/site/2.0/gnu/packages/#screen.scm#
    Quit
    Auto-saving...
    Auto-saving screen.scm: Opening output file: read-only file system,
    /gnu/store/24mbii9wjlyzfzsqwfmcvz6vz2fv5n6g-guix-0.9.0.c3f29bc/share/guile/site/2.0/gnu/packages/#screen.scm#
    Quit

- ARGH! I have no idea where else I should save this. Let me out of here
  'C-g C-g C-g C-g C-g'!!

- WHEW, that was unpleasant!

- I must not be getting some big concept, I have to study the doc more.

So, I guess I am just saying...

Why point a new user taking their first look at a guix recipe down this
alley?

Can't we find a more user-friendly way to show them their first real
recipe?

> But I agree that this may be confusing, so maybe we should clarify the
> manual to explain in (info "(guix) Invoking guix edit") that store files
> must not be edited.
>
>> MODE CHANGE:
>>
>> In emacs, read-only .scm files should be opened in view-mode.
>
> I don't agree.  For example, when you open "/etc/hosts" (or whatever)
> file in Emacs, you get a message:
>
>   Note: file is write protected
>
> which indicates that it is opened read-only, but view-mode is not used
> by default.  You can enable it manually if you wish.  The same thing
> happens with package files.

Yes, of course, Emacs is a chainsaw. That is what we love about it.

But I believe that, for the majority of your future guix users, you
should think in terms of providing some protective gear and training
wheels.

Then you can use 'C-u' or something similar to empower the experienced
user.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-02-08 18:29   ` myglc2
@ 2016-04-18  8:37     ` Alex Kost
  2016-04-18 17:41       ` Ludovic Courtès
  2016-04-18 21:10       ` myglc2
  0 siblings, 2 replies; 19+ messages in thread
From: Alex Kost @ 2016-04-18  8:37 UTC (permalink / raw)
  To: myglc2; +Cc: 22587

myglc2 (2016-02-08 21:29 +0300) wrote:

> Alex Kost <alezost@gmail.com> writes:
>
>> myglc2 (2016-02-07 21:04 +0300) wrote:
>>
>>> From guix INFO:
>>>
>>> 6.2 Invoking ‘guix edit’
>>> [...]
>>> launches the program specified in the ‘VISUAL’ or in the ‘EDITOR’
>>> environment variable to edit the recipe of GCC 4.8.4 and that of Vim."
>>>
>>> TYPO:
>>>
>>> "edit" (last line above) should be replaced with "view", "inspect", or
>>> "examine".
>>
>> Just to mention - I like "edit" name :-)

I changed my mind, I don't like it anymore :-(

>>> RENAME:
>>>
>>> Calling these functions 'guix edit' and 'M-x guix-edit' implies that the
>>> user will be able to modify the recipe, but this is not actually the
>>> case. The functions should be given a more informative and accurate
>>> name, such as: 'guix view', 'guix inspect', or 'guix examine'.
>>
>> Along with the package recipes that come with Guix, a user can also have
>> his/her own packages (specified using GUIX_PACKAGE_PATH env var), and
>> "guix edit my-super-package" opens a user's file with this package.  It
>> is highly likely that this file is editable, so "guix edit" is a perfect
>> name in this case I think.  IMO it's a user responsibility to understand
>> what files can be edited and what cannot.
>
> Sorry this is so long, but I think this is a useability issue that is
> worth discussing more.
>
> I understand your point-of-view, but I think it is much more
> packager-centric than you should plan on your ultimate user base being.
>
> If we think about the mix of guix users when it is more widely
> successful, as I strongly believe it will be, a majority (80-90%) will
> be "simply" managing and configuring their computer and/or user
> account. They will NOT make packages.
>
> If this is the case, the majority of people clicking on "guix edit" will
> not understand "what files can be edited and what cannot." The very idea
> that a recipe on their computer can make something they need will be a
> radical leap. For these people, taking the fist look at a guix recipe
> will be a step deeper into guix.
>
> Such a user's first interaction might run along the lines of mine ...
>
> - Hmm, I want to see an actual recipe.
>
> - Oh wow, it says I can edit a recipe right here!
>
> - Hmm, maybe I shouldn't because I don't want to break something.
>
> - But they wouldn't call it "guix edit" if it wasn't OK to change stuff,
>   right?
>
> - OK, I'll give it a shot. I'll look at something I am familiar with ...
>
> - 'guix edit screen'
>
> - WOW look at that. Finds the recipe, opens an editor, COOL!
[...]

Now I agree with this.  There was another person¹ who was confused by
"edit" name, and I think there will be more.  OTOH if it will be renamed
to anything else, I'm afraid some people will still think they can just
modify the package definition in place.  But "guix edit" is…, well, not
the best name we can have.

Moreover, I think there are inconsistencies in guix commands.  For
example, we have "guix system build" to build a system, but "guix build"
to build a package.  IMO "guix package build" would be a better choice.

In general, I think it would be good to move package commands inside
"guix package" (which is probably a different direction to Andy's
suggestion²), e.g, to make "guix package lint", "guix package size",
etc.

So, returning to "guix edit".  I think any of: "view", "recipe",
"definition" are better.  I would prefer "guix package definition", not
just "guix definition", as in future there may appear a way to "edit"
other things.  For example, I've sent a patchset³ to go to license
definitions in Emacs.  So analogously we could have "guix license
definition" (along with "guix license list" and similar).

I realize that making subcommands for "guix package" and removing "guix
graph", "guix lint" and other is radical, but I think it is the right
way to organize package commands.

¹ https://gnunet.org/bot/log/guix/2016-03-07#T948796
² http://lists.gnu.org/archive/html/guix-devel/2015-08/msg00044.html
³ http://lists.gnu.org/archive/html/guix-devel/2016-04/msg00721.html

-- 
Alex

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-04-18  8:37     ` Alex Kost
@ 2016-04-18 17:41       ` Ludovic Courtès
  2016-04-19  8:18         ` Alex Kost
  2016-04-18 21:10       ` myglc2
  1 sibling, 1 reply; 19+ messages in thread
From: Ludovic Courtès @ 2016-04-18 17:41 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22587, myglc2

It seems to me that this bug has no clear purpose, or too broad a
purpose, or something.

Could you retitle it, or close it, or fix it, whichever is appropriate?
:-)

Ludo’.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-04-18  8:37     ` Alex Kost
  2016-04-18 17:41       ` Ludovic Courtès
@ 2016-04-18 21:10       ` myglc2
  1 sibling, 0 replies; 19+ messages in thread
From: myglc2 @ 2016-04-18 21:10 UTC (permalink / raw)
  To: 22587

Alex Kost <alezost@gmail.com> writes:

> myglc2 (2016-02-08 21:29 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> writes:
>>
>>> myglc2 (2016-02-07 21:04 +0300) wrote:
>>>
>>>> From guix INFO:
>>>>
>>>> 6.2 Invoking ‘guix edit’
>>>> [...]
>>>> launches the program specified in the ‘VISUAL’ or in the ‘EDITOR’
>>>> environment variable to edit the recipe of GCC 4.8.4 and that of Vim."
>>>>
>>>> TYPO:
>>>>
>>>> "edit" (last line above) should be replaced with "view", "inspect", or
>>>> "examine".
>>>
>>> Just to mention - I like "edit" name :-)
>
> I changed my mind, I don't like it anymore :-(

Good to hear.

>>>> RENAME:
>>>>
>>>> Calling these functions 'guix edit' and 'M-x guix-edit' implies that the
>>>> user will be able to modify the recipe, but this is not actually the
>>>> case. The functions should be given a more informative and accurate
>>>> name, such as: 'guix view', 'guix inspect', or 'guix examine'.
>>>
>>> Along with the package recipes that come with Guix, a user can also have
>>> his/her own packages (specified using GUIX_PACKAGE_PATH env var), and
>>> "guix edit my-super-package" opens a user's file with this package.  It
>>> is highly likely that this file is editable, so "guix edit" is a perfect
>>> name in this case I think.  IMO it's a user responsibility to understand
>>> what files can be edited and what cannot.
>>
>> Sorry this is so long, but I think this is a useability issue that is
>> worth discussing more.
>>
>> I understand your point-of-view, but I think it is much more
>> packager-centric than you should plan on your ultimate user base being.
>>
>> If we think about the mix of guix users when it is more widely
>> successful, as I strongly believe it will be, a majority (80-90%) will
>> be "simply" managing and configuring their computer and/or user
>> account. They will NOT make packages.
>>
>> If this is the case, the majority of people clicking on "guix edit" will
>> not understand "what files can be edited and what cannot." The very idea
>> that a recipe on their computer can make something they need will be a
>> radical leap. For these people, taking the fist look at a guix recipe
>> will be a step deeper into guix.
>>
>> Such a user's first interaction might run along the lines of mine ...
>>
>> - Hmm, I want to see an actual recipe.
>>
>> - Oh wow, it says I can edit a recipe right here!
>>
>> - Hmm, maybe I shouldn't because I don't want to break something.
>>
>> - But they wouldn't call it "guix edit" if it wasn't OK to change stuff,
>>   right?
>>
>> - OK, I'll give it a shot. I'll look at something I am familiar with ...
>>
>> - 'guix edit screen'
>>
>> - WOW look at that. Finds the recipe, opens an editor, COOL!
> [...]
>
> Now I agree with this.  There was another person¹ who was confused by
> "edit" name, and I think there will be more.  OTOH if it will be renamed
> to anything else, I'm afraid some people will still think they can just
> modify the package definition in place.  But "guix edit" is…, well, not
> the best name we can have.
>
> Moreover, I think there are inconsistencies in guix commands.  For
> example, we have "guix system build" to build a system, but "guix build"
> to build a package.  IMO "guix package build" would be a better choice.
>
> In general, I think it would be good to move package commands inside
> "guix package" (which is probably a different direction to Andy's
> suggestion²), e.g, to make "guix package lint", "guix package size",
> etc.

For overall Guix usability, the overloading of a single guix command for
everything is not so good. When you eventually create a man page, it
will be intimidating for someone just trying to do per-user package
management, which the majority of, and least sophisticated users, will
be trying to do.

On the other hand there are several "classes" of commands and this is
reflected by the guix CLI being described in several logically different
parts of the doc, but not, as you point out, by being differentiated in
the CLI.

A possibly better approach would be to explicitly split the guix
command-verse into command classes to better match the structure of the
doc. For example, per-user ('guix ...'), global-system ('guix-sys ...'),
and developer ('guix-dev ...'), or something similar.

Since the most frequently used commands will be per-user package
management, I think you should replace 'guix package' with 'guix' and
promote the non-package commands to be hyphenated (ALA, guix-daemon).

This would, in turn, give rise to emacs functions something like:

OLD                                    NEW
-------------------------------------------------------------------
user:
guix-edit                              guix-view-definition
guix-installed-packages                guix-installed-packages
guix-installed-user-packages           NA
admin:
guix-installed-system-packages         guix-sys-installed-packages
developer:
guix-hydra-build-list-latest-builds 	guix-dev-hydra-build-list-latest-builds
guix-edit                              guix-dev-edit-definition

While this would be not-so-nice for a power user, it would make it
easier for a less experienced user to find a relevant command in the sea
of 'M-x commands' in the *Completions* buffer.  This kind of naming may
not be typical for emacs, but I think it is probably justified
considering the range of functionality currently provided by Guix.

> So, returning to "guix edit".  I think any of: "view", "recipe",
> "definition" are better.  I would prefer "guix package definition",
> not just "guix definition", as in future there may appear a way to
> "edit" other things.  For example, I've sent a patchset³ to go to
> license definitions in Emacs.  So analogously we could have "guix
> license definition" (along with "guix license list" and similar).

The best choice is probably the term that is most consistent with the
doc and (hopefully some-day-existent) glossary.  Based on present usage
"definition" has stronger support (and BTW, "recipe" needs to be
replaced with definition in a few places).

I actually think "recipe" is more intuitive and better connotes the idea
of a formula for making a package. But if you use recipe you should also
change "definition" to "recipe" where appropriate in the doc.

The other thing to consider is emacs support for editing manifests,
which are weakly documented and supported now, but would surely be nice
to have. So maybe ultimately something like:

user:
guix view definition <package>
or
guix view recipe <package>

guix edit manifest <manifest>

developer:
guix-dev edit definition <package>
or
guix-dev edit recipe <package>

> I realize that making subcommands for "guix package" and removing "guix
> graph", "guix lint" and other is radical, but I think it is the right
> way to organize package commands.
>
> ¹ https://gnunet.org/bot/log/guix/2016-03-07#T948796
> ² http://lists.gnu.org/archive/html/guix-devel/2015-08/msg00044.html
> ³ http://lists.gnu.org/archive/html/guix-devel/2016-04/msg00721.html

Maybe radical changes are needed. Much easier to do now than later ;-)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-04-18 17:41       ` Ludovic Courtès
@ 2016-04-19  8:18         ` Alex Kost
  2016-04-19 10:50           ` Ludovic Courtès
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Kost @ 2016-04-19  8:18 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 22587

Ludovic Courtès (2016-04-18 20:41 +0300) wrote:

> It seems to me that this bug has no clear purpose, or too broad a
> purpose, or something.
>
> Could you retitle it, or close it, or fix it, whichever is appropriate?
> :-)

Was it for me?  I think the main purpose of this report was to tell us
that "edit" name is confusing.  So I would retitle it to "Rename 'guix
edit' as it is confusing".  But I don't know how; can it be done by
sending some control message?

-- 
Alex

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-04-19  8:18         ` Alex Kost
@ 2016-04-19 10:50           ` Ludovic Courtès
  2016-04-20  7:20             ` Alex Kost
  0 siblings, 1 reply; 19+ messages in thread
From: Ludovic Courtès @ 2016-04-19 10:50 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22587

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2016-04-18 20:41 +0300) wrote:
>
>> It seems to me that this bug has no clear purpose, or too broad a
>> purpose, or something.
>>
>> Could you retitle it, or close it, or fix it, whichever is appropriate?
>> :-)
>
> Was it for me?

‘To whom it may concern’.  :-)

> I think the main purpose of this report was to tell us that "edit"
> name is confusing.  So I would retitle it to "Rename 'guix edit' as it
> is confusing".  But I don't know how; can it be done by sending some
> control message?

Yes, using the ‘retitle’ command, described somewhere at
<http://debbugs.gnu.org/Developer.html>.

However, I think (1) the title should describe the bug, not the
solution, and (2) ‘guix edit’ does what it says IMO, even if it can
occasionally stumble upon read-only files.

Ludo’.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-04-19 10:50           ` Ludovic Courtès
@ 2016-04-20  7:20             ` Alex Kost
  2016-04-20 15:31               ` Ludovic Courtès
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Kost @ 2016-04-20  7:20 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 22587

Ludovic Courtès (2016-04-19 13:50 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2016-04-18 20:41 +0300) wrote:
>>
>>> It seems to me that this bug has no clear purpose, or too broad a
>>> purpose, or something.
>>>
>>> Could you retitle it, or close it, or fix it, whichever is appropriate?
>>> :-)
>>
>> Was it for me?
>
> ‘To whom it may concern’.  :-)
>
>> I think the main purpose of this report was to tell us that "edit"
>> name is confusing.  So I would retitle it to "Rename 'guix edit' as it
>> is confusing".  But I don't know how; can it be done by sending some
>> control message?
>
> Yes, using the ‘retitle’ command, described somewhere at
> <http://debbugs.gnu.org/Developer.html>.

Sorry, I don't see any mention of 'retitle' there, also I don't find
retitle control message while using emacs-debbugs package.

> However, I think (1) the title should describe the bug, not the
> solution, and (2) ‘guix edit’ does what it says IMO, even if it can
> occasionally stumble upon read-only files.

OK, well I don't know what to do with it then.  What about the following
title: «"guix edit" name may be confusing»?

-- 
Alex

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-04-20  7:20             ` Alex Kost
@ 2016-04-20 15:31               ` Ludovic Courtès
  2016-04-21 10:40                 ` Alex Kost
  0 siblings, 1 reply; 19+ messages in thread
From: Ludovic Courtès @ 2016-04-20 15:31 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22587

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2016-04-19 13:50 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> Ludovic Courtès (2016-04-18 20:41 +0300) wrote:
>>>
>>>> It seems to me that this bug has no clear purpose, or too broad a
>>>> purpose, or something.
>>>>
>>>> Could you retitle it, or close it, or fix it, whichever is appropriate?
>>>> :-)
>>>
>>> Was it for me?
>>
>> ‘To whom it may concern’.  :-)
>>
>>> I think the main purpose of this report was to tell us that "edit"
>>> name is confusing.  So I would retitle it to "Rename 'guix edit' as it
>>> is confusing".  But I don't know how; can it be done by sending some
>>> control message?
>>
>> Yes, using the ‘retitle’ command, described somewhere at
>> <http://debbugs.gnu.org/Developer.html>.
>
> Sorry, I don't see any mention of 'retitle' there, also I don't find
> retitle control message while using emacs-debbugs package.

Sorry, it’s at <http://debbugs.gnu.org/server-control.html>.

>> However, I think (1) the title should describe the bug, not the
>> solution, and (2) ‘guix edit’ does what it says IMO, even if it can
>> occasionally stumble upon read-only files.
>
> OK, well I don't know what to do with it then.  What about the following
> title: «"guix edit" name may be confusing»?

Perfect! :-)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-04-20 15:31               ` Ludovic Courtès
@ 2016-04-21 10:40                 ` Alex Kost
  2016-06-02 19:40                   ` Ludovic Courtès
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Kost @ 2016-04-21 10:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 22587

Ludovic Courtès (2016-04-20 18:31 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2016-04-19 13:50 +0300) wrote:
>>
>>> Yes, using the ‘retitle’ command, described somewhere at
>>> <http://debbugs.gnu.org/Developer.html>.
>>
>> Sorry, I don't see any mention of 'retitle' there, also I don't find
>> retitle control message while using emacs-debbugs package.
>
> Sorry, it’s at <http://debbugs.gnu.org/server-control.html>.

Thanks!  And sorry for bothering, I should have found it myself.  I
didn't realize that debbugs is such a featureful bug-tracker.

>>> However, I think (1) the title should describe the bug, not the
>>> solution, and (2) ‘guix edit’ does what it says IMO, even if it can
>>> occasionally stumble upon read-only files.
>>
>> OK, well I don't know what to do with it then.  What about the following
>> title: «"guix edit" name may be confusing»?
>
> Perfect! :-)

Done.

-- 
Alex

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-04-21 10:40                 ` Alex Kost
@ 2016-06-02 19:40                   ` Ludovic Courtès
  2016-06-03 19:04                     ` Alex Kost
  0 siblings, 1 reply; 19+ messages in thread
From: Ludovic Courtès @ 2016-06-02 19:40 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22587

Hi!

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2016-04-20 18:31 +0300) wrote:

[...]

>>>> However, I think (1) the title should describe the bug, not the
>>>> solution, and (2) ‘guix edit’ does what it says IMO, even if it can
>>>> occasionally stumble upon read-only files.
>>>
>>> OK, well I don't know what to do with it then.  What about the following
>>> title: «"guix edit" name may be confusing»?
>>
>> Perfect! :-)
>
> Done.

I’m rather inclined to close this bug as ‘wontfix’.  Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-06-02 19:40                   ` Ludovic Courtès
@ 2016-06-03 19:04                     ` Alex Kost
  2016-06-04 11:21                       ` Ludovic Courtès
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Kost @ 2016-06-03 19:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 22587

Ludovic Courtès (2016-06-02 22:40 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2016-04-20 18:31 +0300) wrote:
>
> [...]
>
>>>>> However, I think (1) the title should describe the bug, not the
>>>>> solution, and (2) ‘guix edit’ does what it says IMO, even if it can
>>>>> occasionally stumble upon read-only files.
>>>>
>>>> OK, well I don't know what to do with it then.  What about the following
>>>> title: «"guix edit" name may be confusing»?
>>>
>>> Perfect! :-)
>>
>> Done.
>
> I’m rather inclined to close this bug as ‘wontfix’.  Thoughts?

I would prefer it to be solved by renaming "guix edit" to "guix package
definition", but I think it will not be welcomed by most users and
authors, so 'wontfix' is fine by me.

-- 
Alex

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change
  2016-06-03 19:04                     ` Alex Kost
@ 2016-06-04 11:21                       ` Ludovic Courtès
  0 siblings, 0 replies; 19+ messages in thread
From: Ludovic Courtès @ 2016-06-04 11:21 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22587

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2016-06-02 22:40 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> Ludovic Courtès (2016-04-20 18:31 +0300) wrote:
>>
>> [...]
>>
>>>>>> However, I think (1) the title should describe the bug, not the
>>>>>> solution, and (2) ‘guix edit’ does what it says IMO, even if it can
>>>>>> occasionally stumble upon read-only files.
>>>>>
>>>>> OK, well I don't know what to do with it then.  What about the following
>>>>> title: «"guix edit" name may be confusing»?
>>>>
>>>> Perfect! :-)
>>>
>>> Done.
>>
>> I’m rather inclined to close this bug as ‘wontfix’.  Thoughts?
>
> I would prefer it to be solved by renaming "guix edit" to "guix package
> definition", but I think it will not be welcomed by most users and
> authors, so 'wontfix' is fine by me.

I’m of course unsure what “most” users would think, but I find ‘guix
package definition’ too wordy and probably too hard to find for a
newcomer.

OK, marking it as wontfix, and we can always revisit the issue later if
people disagree!

Ludo’.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-06-04 11:22 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-07 18:04 bug#22587: ‘guix edit’ & ‘M-x guix-edit' typo, rename, & mode change myglc2
2016-02-07 18:58 ` Andreas Enge
2016-02-07 19:22   ` myglc2
2016-02-07 19:34     ` Andreas Enge
2016-02-07 20:26       ` myglc2
2016-02-08  8:34 ` Alex Kost
2016-02-08 15:30   ` Ludovic Courtès
2016-02-08 18:29   ` myglc2
2016-04-18  8:37     ` Alex Kost
2016-04-18 17:41       ` Ludovic Courtès
2016-04-19  8:18         ` Alex Kost
2016-04-19 10:50           ` Ludovic Courtès
2016-04-20  7:20             ` Alex Kost
2016-04-20 15:31               ` Ludovic Courtès
2016-04-21 10:40                 ` Alex Kost
2016-06-02 19:40                   ` Ludovic Courtès
2016-06-03 19:04                     ` Alex Kost
2016-06-04 11:21                       ` Ludovic Courtès
2016-04-18 21:10       ` myglc2

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).