transient icon indicating copy to clipboard operation
transient copied to clipboard

Controlling transient values using `dir-locals.el`

Open rafauke opened this issue 3 years ago • 3 comments

Hey hello,

I was trying to find an answer to that question, but it's still unclear to me how to use per-repository/local transient values. An example use case for me is:

I would like to use a different GPG signature in project A and project B.

My idea was to create local variables that point to transient values & history files, like this:

((nil . ((transient-history-file . "~/project_a/.transient-values.el")
         (transient-values-file . "~/project_a/.transient-values.el"))))

The values are updated correctly in .transient-values.el, but it looks like this file is not read every time the magit popup is brought up.

Please let me know if I'm messing something up, maybe I just don't get it :)

Cheers

rafauke avatar Dec 14 '21 13:12 rafauke

Unfortunately that's not supported yet but it's an important feature and sure to come eventually. I am currently wrapping things up, so I won't get to it immediately but will probably tackle this early next year.

Related #2610.

tarsius avatar Dec 14 '21 15:12 tarsius

OK, thank you for reaching out :) Do you happen to have any suggestion on how this can be handled differently? I mean, not necessarily using dir-locals.el?

rafauke avatar Dec 15 '21 10:12 rafauke

I know that transient is being used not only by magit and forge but also a few more applications (is that the right term?). When such a feature arrives, I'd found it very useful if I could only override a few applications specific transient values and use global for reminder of applications. I.e., I'd like to use history and values specific for a project only for python-pytest (one of applications that uses transient), but magit and forge I'd like to remain on global.

pkryger avatar Dec 15 '21 11:12 pkryger

Closing in favor of #189.

tarsius avatar Oct 15 '23 21:10 tarsius