Ludovic Courtès (2014-10-05 00:23 +0400) wrote: > Alex Kost skribis:> [...] >> - (Not related to this patch, but still …) Currently with “roll-back”, >> we can only switch to the previous generation. What about adding a >> possibility to switch to any generation? So that we could use >> something like this: >> >> guix package --switch-generation=7 >> >> Also such functionality can be added to Emacs UI: for example pressing >> "C" on a generation in *Guix Generation List* will make this >> generation the current one. >> >> So ‘roll-back’ procedure may become a special case of the >> ‘switch-generation’ one. WDYT? > > I think it’s a good idea! (I think it was suggested in earlier > discussions, but never implemented.) Andreas Enge (2014-10-05 18:44 +0400) wrote: [...] > Actually, sometimes I would like to switch to the next generation ("-roll- > forward", in a sense): I install something, go back with "--roll-back", > and might like to go just one forward again. > > So how about the following: > --switch-generation=1 > goes to generation 1; > --switch-generation=-1 > goes 1 generation back; > --switch-generation=+1 > goes one generation forward. Thanks for the great idea! ———————————————————————————————————————————————————————————————— A patch is attached. Some comments: - ‘shitted-generation’ is not a very good name, I think. Ideas? - ‘previous-generation-number’ may use ‘shifted-generation’ now: