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?

Drew
  • 75,699
  • 9
  • 109
  • 225
mithrandi
  • 121
  • 6

1 Answers1

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.

mithrandi
  • 121
  • 6