magit / magit-popup

Define prefix-infix-suffix command combos

Home Page:https://magit.vc/manual/magit-popup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Porting `magit-popup` actions to `transient`

matthew-piziak opened this issue · comments

Hi @tarsius, my magit-popup actions have stopped working, presumably because transient is the way forward. I'm wondering how to correctly port them.

For example, I have this:

  (defun magit-diff-develop
    (interactive)
    (magit-diff "origin/develop..HEAD"))
  (magit-define-popup-action
    'magit-diff-popup
    ?v
    "Diff develop"
    'magit-diff-develop)

What's the correct way to move this to the new regime? The transient manual is good at describing how to define new transients, but I'm a little lost on how to augment existing magit transients, especially since the help text for magit-define-popup-action does not seem to have any deprecation info.

I'm probably just a bit lost. Can you point me in the right direction? Thanks!

The Magit wiki has some examples.

That's exactly what I needed, thank you! I'm still a bit confused about LOC. The help text says that it's a "command, key vector, or key description", which is all well and good, but what is it for?

Oh I'm just bad at paragraphs. That's how it does relative ordering. Thank you @kyleam! I'll close this out for now.