Questions tagged [transient-library]
9 questions
6
votes
1 answer
How to change the default transient level temporarily? ("Show hidden magit commands")
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),…

ebpa
- 7,319
- 26
- 53
3
votes
1 answer
Acceptance test for a flow that uses the transient package?
I am trying to write a test around a flow that uses transient. Here is the sample code:
;; -*- lexical-binding: t; coding: utf-8 -*-
(require 'transient)
(require 'buttercup)
(require 'with-simulated-input)
(defun ogt-print-a () (interactive)…

Trevoke
- 2,375
- 21
- 34
2
votes
0 answers
how to teach magit to pass multiple push-options at once
GitLab has a few push options for which I'd like to create switches in magit-push's transient.
Causing -n to add -oci.skip is simple enough:
(transient-append-suffix 'magit-push "-n" '("-s" "skip CI" "-oci.skip"))
I would also like that -m adds…

adl
- 143
- 5
1
vote
1 answer
Is it possible to eval code as a transient group description?
I want to customize the title of a transient group based on the value of some variable, my--current-section. The following doesn't work
(transient-define-prefix my--prefix ()
"Sample docstring"
`[,(format "Manage (current section: %s)"…

Alessandro Bertulli
- 195
- 10
1
vote
1 answer
Can a transient suffix have a value like an infix?
I'm writing a transient for invoking debchange. It has a number of regular options like --multimaint which I am adding infixes for, and then a handful of mutually exclusive options like --append of which one must be specified. I would like to make…

mithrandi
- 121
- 6
0
votes
1 answer
Why is the last run in transient-define-prefix?
I use transient.el
Press key a but (insert "B") is executed
;; NG case
;; desc is same
;; press a -> B
(progn
(transient-define-prefix my-test1 ()
[("a" "desc" (lambda () (interactive) (insert "A")))
("b" "desc" (lambda () (interactive)…

megeton
- 27
- 4
0
votes
1 answer
How to persist a transient to make a command repeatable?
I am converting some of my Hydras to Transient. One of them includes a command with shrinks or enlarges one of my split windows, so I hit it repeatedly until I like my size. How to do this in Transient? The documentation makes it clear that it's…

Webdev Tory
- 319
- 1
- 10
0
votes
1 answer
Defining a simple transient with a default value
I'm trying to add a very simple transient thus:
(transient-define-prefix simple-transient ()
"A simple transient"
["Arguments"
("-a" "Address (default 127.0.0.1)" "--addresss=")
("-p" "Port (default 554)" "--port=")
…

Dave F
- 553
- 2
- 13
0
votes
0 answers
How can I define a new group on an existent transient?
I want to customize the forge-dispatch transient. Specifically I want to add new group, Remote, to the right side of Create. And add the new suffix there.
As far as I know, transient-{append,replace}-suffix all add a suffix in relation to an…

PuercoPop
- 396
- 2
- 11