1

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 these suffixes without defining a whole pile of wrappers like (debchange-append); can I somehow give the suffix a value so that I can use the same (debchange-run) command for all of them?

1

I did this:

(defclass dd-suffix-switch (transient-suffix)
  ((argument :initarg :argument)))

(cl-defmethod transient-infix-value ((obj dd-suffix-switch))
  (oref obj argument))

which I can then use as:

("a" "Append" dd-dch :class dd-suffix-switch :argument "--append")

EDIT: Whoops, this doesn't work after all, I get all of my suffixes.

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.