Function: embark-export
embark-export is an autoloaded, interactive and byte-compiled function
defined in embark.el.
Signature
(embark-export)
Documentation
Create a type-specific buffer to manage current candidates.
The variable embark-exporters-alist controls how to make the
buffer for each type of completion.
In Embark Export buffers revert-buffer is remapped to
embark-rerun-collect-or-export, which has slightly unusual
behavior if the buffer was obtained by running embark-export
from within a minibuffer completion session. In that case
reverting just restarts the completion session, that is, the
command that opened the minibuffer is run again and the
minibuffer contents restored. You can then interact normally
with the command, perhaps editing the minibuffer contents, and,
if you wish, you can rerun embark-export to get an updated
buffer.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
;;;###autoload
(defun embark-export ()
"Create a type-specific buffer to manage current candidates.
The variable `embark-exporters-alist' controls how to make the
buffer for each type of completion.
In Embark Export buffers `revert-buffer' is remapped to
`embark-rerun-collect-or-export', which has slightly unusual
behavior if the buffer was obtained by running `embark-export'
from within a minibuffer completion session. In that case
reverting just restarts the completion session, that is, the
command that opened the minibuffer is run again and the
minibuffer contents restored. You can then interact normally
with the command, perhaps editing the minibuffer contents, and,
if you wish, you can rerun `embark-export' to get an updated
buffer."
(interactive)
(let* ((transformed (embark--maybe-transform-candidates))
(candidates (or (plist-get transformed :candidates)
(user-error "No candidates for export")))
(type (plist-get transformed :type)))
(let ((exporter (or (alist-get type embark-exporters-alist)
(alist-get t embark-exporters-alist))))
(if (eq exporter 'embark-collect)
(embark-collect)
(let* ((after embark-after-export-hook)
(cmd embark--command)
(name (embark--descriptive-buffer-name 'export))
(rerun (embark--rerun-function #'embark-export))
(buffer (save-excursion
(funcall exporter candidates)
(rename-buffer name t)
(current-buffer))))
(embark--quit-and-run
(lambda ()
(pop-to-buffer buffer)
(setq embark--rerun-function rerun)
(use-local-map
(make-composed-keymap
'(keymap
(remap keymap
(revert-buffer . embark-rerun-collect-or-export)))
(current-local-map)))
(let ((embark-after-export-hook after)
(embark--command cmd))
(run-hooks 'embark-after-export-hook)))))))))