Function: forge-discussion-set-answer

forge-discussion-set-answer is an interactive function defined in forge-topic.el.

Signature

(forge-discussion-set-answer VALUE)

Documentation

Mark the post at point as the answer to the current question.

When point is on the answer, then unmark it and mark no other.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-topic.el
(transient-define-suffix forge-discussion-set-answer (post)
  "Mark the post at point as the answer to the current question.
When point is on the answer, then unmark it and mark no other."
  :class 'forge--topic-set-slot-command :slot 'answer
  :inapt-if-not (lambda ()
                  (and-let* ((discussion (forge-current-discussion))
                             (category (oref discussion category)))
                    (forge-sql1 [:select answerable-p
                                 :from discussion-category
                                 :where (= id $s1)]
                                category)))
  :description (##forge--format-boolean 'answer "answered")
  :reader #'forge--select-discussion-answer)