>> + (match:substring (regexp-exec (profile-rx profile) >> + (basename (readlink profile))) 1)) > Instead write: > (and=> (regexp-exec ...) > (cut match:substring <> 1)) > So that the thing returns #f when there are is no associated profile > number. OTOH, does that ever occur? I doubt so, but I also think that it would be better to keep 'and=>' to prevent possible problems. > It should be based on rename(2) to be atomic. See the ‘switchLink’ > function in Nix for how to do it. Could you elaborate? Should I call C from Guile? Nikita