5

Many commands that are rarely used in magit are hidden by default. Magit uses the transient.el library for popups and the visibility of infix and suffix commands are controlled by transient-default-level.

For example: At the default level (4), magit-branch transient 1 hides orphan, worktree, and shelving suffix commands (levels 6,5,&7 respectively).

I want to invoke the "new orphan" command, but I don't want to persist the visibility of that command or other commands (even for the remainder of the current session).

How can I conveniently change the default transient level temporarily, so that I can invoke a hidden command once?

The two ways I know of are:

  1. Change the transient level for the command using C-xl (transient-set-level), invoke it, and then change it back.

  2. Change transient-default-level programmatically (ex: (setq transient-default-level 6)), invoke the command, and change transient-default-level back.

screenshot of magit-branch transient after calling transient-set-level

8

I [as the author of this package] did not consider this feature but it sounds potentially useful and doable but it doesn't exist yet. I've added this idea to my TODO list but for now you'll have to stick to your workarounds. I am not aware of any existing solution.

As of August 2021 this feature still does not exist.

18
  • 4
    I am the author of this package. There is absolutely no additional information I want to provide than this: (1) this feature does not exist (2) I do consider this a reasonable feature and (3) have taken note of the idea but (4) make no promise at all. I also do not at all appreciate your request to make this more "useful" and think there are much more useful uses for your and my time.
    – tarsius
    Aug 21 at 18:25
  • 2
    I would recommend you don't delete this. The answer may be very short but it is also complete and I am the authority on the matter. The answer may not be satisfying but it also states the facts in full. I think that this unsatisfying but complete answer is vastly more useful than no answer at all. Or an answer that has a few added paragraphs added to it for fluff and to more easily pass your critical eyes.
    – tarsius
    Aug 21 at 18:35
  • 2
    You note that I find this really quite annoying. I hope it isn't the final straw that pushes me away from this platform because then most magit questions would go unanswered. Job well done Drew.
    – tarsius
    Aug 21 at 18:36
  • 1
    @Dmitry: Yes. Q&A should stand on their own; comments can be deleted at any time. Nothing in the answer even made it clear that Tarsius is the author of the library. Finding this Q&A, a reader wouldn't have a clear answer that what was requested isn't possible (yet). The answer said only that the answerer never considered finding a solution but thought it was doable and might try to do it sometime. That's not an answer. Saying that it can't be done (currently) is at least an answer to the question of how to do it. There are lots of answers like that. I tried to help tarsius answer, himself...
    – Drew
    Aug 23 at 1:03
  • 1
    I realize that in other contexts I am doing what you are doing here and when I do, then I feel justified in doing so. So I should not be so critical of you here. We have used many words here and at least when I spoke not all of them were chosen carefully. IMO we can stop now. I am not hurt or anything and I hope you are not either. I was annoyed but that happens. I hope that one day I will learn to just shut up when someone annoys me on the internet. Unless one very carefully expresses why one is annoyed, the result always is that the other person also feels annoyed/misunderstood/hurt/...
    – tarsius
    Aug 23 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.