Prevent extra window after +org/export-to-clipboard
org-export-to-buffer opens a preview window. This command doesn't need that, so we inhibit it. Closes #4911
This commit is contained in:
parent
e85041ae86
commit
a80f13f626
1 changed files with 5 additions and 3 deletions
|
@ -26,12 +26,14 @@
|
||||||
|
|
||||||
Prompts for what BACKEND to use. See `org-export-backends' for options."
|
Prompts for what BACKEND to use. See `org-export-backends' for options."
|
||||||
(interactive
|
(interactive
|
||||||
(list (intern (completing-read "Export to: " org-export-backends))))
|
(list (intern (completing-read "Export to: " (progn (require 'ox) org-export-backends)))))
|
||||||
(let ((buffer (org-export-to-buffer backend "*Formatted Copy*" nil nil t t)))
|
(require 'ox)
|
||||||
|
(let* ((org-export-show-temporary-export-buffer nil)
|
||||||
|
(buffer (org-export-to-buffer backend "*Formatted Copy*" nil nil t t)))
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(kill-new (buffer-string)))
|
(kill-new (buffer-string)))
|
||||||
(kill-buffer (current-buffer)))))
|
(kill-buffer buffer))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +org/export-to-clipboard-as-rich-text (beg end)
|
(defun +org/export-to-clipboard-as-rich-text (beg end)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue