Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transient sub-prefixes do not return to parent #352

Open
ErikPrantare opened this issue Feb 5, 2025 · 1 comment
Open

Transient sub-prefixes do not return to parent #352

ErikPrantare opened this issue Feb 5, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ErikPrantare
Copy link

Setup code:

(transient-define-prefix my/parent ()
  [("p" "Call child" my/child :transient t)])

(transient-define-prefix my/child ()
  [("c" "Invoke suffix" my/suffix)])

(defun my/suffix ()
  (interactive)
  (message "Invoked from child"))

Running my/parent, I expect p c to return to my/parent.
Instead, It stays at my/child.

The expected behavior occurs on older transient versions. The
erroneous behavior occurs on a colleagues machine as well, and he uses
a newer version.

  • M-x magit-version RET
Magit 4.2.0, Transient 0.8.2, Forge 0.4.6, Git 2.48.1, Emacs 29.4, gnu/linux
@tarsius tarsius added the bug Something isn't working label Feb 6, 2025
@tarsius
Copy link
Member

tarsius commented Feb 6, 2025

Thanks for the report. I can confirm.

I also already know what's going on and when it happened. And how to fix by banging on it some more; but I haven't come up with a clean fix yet (I might actually be able to drop some misguided code).

Oh, and as a temporary workaround, you can use :transient return on the suffix in the subprefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants