transient icon indicating copy to clipboard operation
transient copied to clipboard

Support various types of local values

Open tarsius opened this issue 4 years ago • 2 comments

Such as:

  • [ ] https://github.com/magit/magit/issues/2610
  • [ ] projectile/project: https://github.com/Silex/docker.el/issues/180#issuecomment-1034083332
  • [ ] #179

tarsius avatar Feb 09 '22 19:02 tarsius

Hello,

FYI projectile uses .dir-locals.el, so something that works with it sounds logical.

Maybe I'm stupid but isn't this as simple as putting the content of transient-values into that file? So when it loads it sets transient-values and we are good to go?

The only drawback is that you can only transient-save one global set of values and if you want to modify this project values you have to edit .dir-lcoals.el manually.

Silex avatar Feb 11 '22 09:02 Silex

I was able to set the docker-compose directory with a .dir-locals file by:

  • Running the transient command and setting the flags as I wish them to be
  • C-x s to set (but not save) the values
  • C-g to exit the transient window
  • C-h v transient-values to extract the values set in the previous steps

My resultant .dir-locals looks like this:

((nil . ((transient-values
          . ((docker-compose "--project-directory ~/code/work/repo/"))))))

I hope that's helpful!

johnhamelink avatar Apr 26 '23 15:04 johnhamelink