Function: forge-remove-topic-locally
forge-remove-topic-locally is an autoloaded, interactive and
byte-compiled function defined in forge-commands.el.
Signature
(forge-remove-topic-locally TOPIC)
Documentation
Remove a topic from the local database only.
When the region marks multiple topics, then offer to remove them all.
The topic is not removed from the forge and, if it is later modified, then it will be added to the database again when fetching all topics.
This is useful for users who only fetch individual topics and want to remove the topics they are no longer interested in. This can also be used to remove topics locally, which have already been removed on the forge (the service). Forge (the package) cannot automatically detect when that happens, because given how the APIs work, this would be too expensive.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-commands.el
;;;###autoload
(defun forge-remove-topic-locally (topic)
"Remove a topic from the local database only.
When the region marks multiple topics, then offer to remove them all.
The topic is not removed from the forge and, if it is later modified,
then it will be added to the database again when fetching all topics.
This is useful for users who only fetch individual topics and want to
remove the topics they are no longer interested in. This can also be
used to remove topics locally, which have already been removed on the
forge (the service). Forge (the package) cannot automatically detect
when that happens, because given how the APIs work, this would be too
expensive."
(interactive
(list (if-let* ((topics (magit-region-values '(issue pullreq) t))
(_(magit-confirm 'remove-topics-locally nil
"Delete %d topics locally" nil
(mapcar #'forge--format-topic-line topics))))
topics
(forge-read-topic "Delete topic LOCALLY only"))))
(if (listp topic)
(progn (mapc #'closql-delete topic)
(forge-refresh-buffer))
(setq topic (forge-get-topic topic))
(closql-delete topic)
(if (and (derived-mode-p 'forge-topic-mode)
(equal (oref topic id)
(oref forge-buffer-topic id)))
(kill-buffer (current-buffer))
(forge-refresh-buffer))))