Ask questionsUnable to completing-read CMake preset the second time
projectile-configure-project, when run second time in a project, has some way (a prefix arg?) to select a (different) CMake preset again.
Configure command: cmake . --preset <previously-selected-preset> prompt in minibuffer without completion for presets.
s-p C, select one of the presets
s-p Cagain, wishing to select the other preset
With a workaround for https://github.com/bbatsov/projectile/issues/1673 applied:
(defun dotfiles--projectile--cmake-all-command-presets (command-type) "Get CMake user and system COMMAND-TYPE presets." (projectile-flatten (mapcar (lambda (filename) (projectile--cmake-command-presets filename command-type)) '("CMakeUserPresets.json" "CMakePresets.json")))) (advice-add #'projectile--cmake-all-command-presets :override #'dotfiles--projectile--cmake-all-command-presets)
Answer questions jehelset
i think this is simply how the project-type-agnostic
projectile-configure-command works (https://github.com/bbatsov/projectile/blob/master/projectile.el#L4337). it will prefer to use the cached command. to get the behaviour you want, one would have to be able to disable caching of configuration commands. not sure if this is possible currently. it would be useful.