emacs/var/elfeed/db/data/f5/f5e7910cf2fceeb947a517b8a564d2e32bb4c4ac
2022-01-03 12:49:32 -06:00

1 line
1.3 KiB
Plaintext

<!-- SC_OFF --><div class="md"><p>According to Transient documentation:</p> <p>&quot;The command can also be a closure or lambda expression, but that should only be used for dynamic transients whose suffixes are defined when the prefix command is invoked. See information about the :setup-children function&quot;</p> <p>So according to that I tried the following:</p> <pre><code>(defun set-children (children) &#39;((1 transient-suffix (:key &quot;o&quot; :command normal-func)) ;; OK (1 transient-suffix (:key &quot;k&quot; :description (lambda () &quot;All ok&quot;) :command (lambda (message &quot;hey&quot;)))))) (transient-define-prefix my-transient () [&quot;Description&quot; :setup-children set-children]) </code></pre> <p>I&#39;m getting <code>(wrong-type-argument (command symbol) (lambda nil &quot;hey&quot;))</code></p> <p>So it seems that it only accepts symbols</p> <p>Any ideas? thanks in advance</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/artema666"> /u/artema666 </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/rfxm47/transient_lambda_expression_for_suffix_command/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/emacs/comments/rfxm47/transient_lambda_expression_for_suffix_command/">[comments]</a></span>