helm-make icon indicating copy to clipboard operation
helm-make copied to clipboard

Feature request: helm-make-select-build-dir

Open randomphrase opened this issue 6 years ago • 4 comments

Multiple build directories are useful sometimes, particularly when you are testing your code with different compilers or build options. It would be great for helm-make to support efficiently switching from one build directory to another.

The way that I could see this working is that the existing helm-make-build-dir variable could be set to a list containing possible build directory names. When a buffer is loaded the equivalent buffer-local variable would be the first one selected from this list.

An interactive function would be provided to allow the user to switch to a different build directory, from the ones in the list. This would be selected using helm.

Please let me know if you think this is a worthwhile feature, and if so whether you agree on the implementation.

randomphrase avatar Sep 03 '18 12:09 randomphrase

Sounds like a good feature. The implementation should be straightforward, helm-make-build-dir can already be a list. It only remains to slightly adjust helm--make-makefile-exists to use completing-read. Please PR.

abo-abo avatar Sep 03 '18 14:09 abo-abo

Thanks, and will do. FYI have a lot of other projects to work on right now, but hopefully will get to it soon.

randomphrase avatar Sep 03 '18 17:09 randomphrase

Hi, I finally got around to this. I decided not to implement it in the way you suggested because I didn't want to select a build directory on every build. Also I didn't like my own idea of requiring possible build directories to be pre-configured with helm-make-build-dir. Instead I decided to do a completing-read against the directories in the project root for which helm--make-makefile-exists returns non-nil, and set the helm-make-build-dir variable accordingly.

randomphrase avatar May 01 '22 07:05 randomphrase

One outstanding issue here is the buffer-local nature of helm-make-build-dir. This probably should be set per project or something?

randomphrase avatar May 01 '22 07:05 randomphrase