New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to select packages for update #15077
Add option to select packages for update #15077
Conversation
This commit changes the yes-or-no-p to a read-answer with three options y, s and n (for yes, some and no. This of course could be a, s, c for 'all', 'some/select' and 'cancel', but I decided to keep yes no as users are already familiar with the y and n). Finally the user can select packages by answer for each package in the list a yes-or-no-p (pressing y or n, if you upgrade regularly the list usually is not too long. It is anyway better than having only the options all or none). The `nonc` construction is just a non cl alternative to cl-remove-if (I've added the comment with the explanation).
selection based on y/n questions will be very verbose. It's possible to write the packages to a new buffer, for example, # 'd': delete a package from update list
# 'u': undo
# 'C-c C-c': confirm and update
# 'C-c C-k': abort
foo
bar
baz Assign an empty keymap to the buffer with only the above-mentioned key bindings, arrow keys/hjkl keys for navigation, and SPC-* prefix commands. Anything remained in the buffer is updated. What do you think? |
Yeah, I thought about that, but it does not have enough priority for me to spend my time implementing it for the following reasons:
Of course, if users prefer other ways of doing things, then they are welcome to contribute. As for sure, I do agree that your proposed solution is nicer. My solution is just a quick 'better than nothing'... |
Awesome! Thank you very much @dalanicolai. As UX feedback, at first I thought that I've tried to figure out how to pop up a Helm list with updated packages to be used as package chooser, but as of now it's still outside my abilities 😞. But it's more an attempt to add my 2c than a necessity. As it is now it works beautifully for me. So, my only worry is if this is newbie-proof enough, since |
@pataquets Thanks for the feedback! Well in the end I guess (Spac)emacs users have to get familiar with I do think that @lebensterben his solution will be as intuitive because the buffer will/should also contain an explanation, but, although it is not too much work, it is still too many minutes (for me) for the relative little gain. Creating a solution for Helm, should be quite easy I guess (I think you can just use |
This comment has been minimized.
This comment has been minimized.
If you believe
|
@pataquets Did you solve this issue? I don't know the exact workings of how Spacemacs/Quelpa manages packages. I don't really expect this 'fix' for selecting updates should influence the behavior, but I am not sure. Maybe next time, you can try using |
Nice! I did not know this feature. Just wondering if this is 'compatible' with Spacemacs its rollback feature. But anyway a nice menu... |
Just from my past experience, it's not compatible. @pataquets, there is also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
@dalanicolai For the record, my problem turned out to be something in my configuration getting in the way. The feature works nicely, thank you! (Sorry for getting back so late. I had an injury back then that kept me AFK). |
Due to a question by @pataquets just now on gitter, I have added an option to select packages for installation.
I've tested it, and it seems to work perfectly fine, incl. the rollback(s). I prefer the
read-answer
solution, but of coursewe could make it a
completing-read
also.The diff looks a little strange b.t.w., because it shows many 'removed/red' hunks, that I did not remove at all (so those parts appear in 'green' further below).
BELOW IS THE COMMIT MESSAGE
This commit changes the yes-or-no-p to a read-answer with three options y, s and
n (for yes, some and no. This of course could be a, s, c for 'all',
'some/select' and 'cancel', but I decided to keep yes no as users are already
familiar with the y and n).
Finally the user can select packages by answer for each package in the list a
yes-or-no-p (pressing y or n, if you upgrade regularly the list usually is not
too long. It is anyway better than having only the options all or none).
The
nonc
construction is just a non cl alternative to cl-remove-if (I've addedthe comment with the explanation).