forked from mirrors/org-mode
org-exp.el (org-export-copy-to-kill-ring): Add a new choice 'if-interactive and use it as the default.
* org-exp.el (org-export-copy-to-kill-ring): Add a new choice 'if-interactive and use it as the default. (org-export-push-to-kill-ring): Use the new choice.
This commit is contained in:
parent
627d5733be
commit
8c04fb72cb
|
@ -88,10 +88,14 @@ is nil, the buffer remains buried also in these cases."
|
||||||
:group 'org-export-general
|
:group 'org-export-general
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(defcustom org-export-copy-to-kill-ring t
|
(defcustom org-export-copy-to-kill-ring 'if-interactive
|
||||||
"Non-nil means exported stuff will also be pushed onto the kill ring."
|
"Should we push exported content to the kill ring?"
|
||||||
:group 'org-export-general
|
:group 'org-export-general
|
||||||
:type 'boolean)
|
:version "24.3"
|
||||||
|
:type '(choice
|
||||||
|
(const :tag "Always" t)
|
||||||
|
(const :tag "When export is done interactively" if-interactive)
|
||||||
|
(const :tag "Never" nil)))
|
||||||
|
|
||||||
(defcustom org-export-kill-product-buffer-when-displayed nil
|
(defcustom org-export-kill-product-buffer-when-displayed nil
|
||||||
"Non-nil means kill the product buffer if it is displayed immediately.
|
"Non-nil means kill the product buffer if it is displayed immediately.
|
||||||
|
@ -3338,7 +3342,9 @@ If yes remove the column and the special lines."
|
||||||
(defun org-export-push-to-kill-ring (format)
|
(defun org-export-push-to-kill-ring (format)
|
||||||
"Push buffer content to kill ring.
|
"Push buffer content to kill ring.
|
||||||
The depends on the variable `org-export-copy-to-kill-ring'."
|
The depends on the variable `org-export-copy-to-kill-ring'."
|
||||||
(when org-export-copy-to-kill-ring
|
(when (or (and (eq org-export-copy-to-kill-ring 'if-interactive)
|
||||||
|
(not (or executing-kbd-macro noninteractive)))
|
||||||
|
(eq org-export-copy-to-kill-ring t))
|
||||||
(org-kill-new (buffer-string))
|
(org-kill-new (buffer-string))
|
||||||
(when (fboundp 'x-set-selection)
|
(when (fboundp 'x-set-selection)
|
||||||
(ignore-errors (x-set-selection 'PRIMARY (buffer-string)))
|
(ignore-errors (x-set-selection 'PRIMARY (buffer-string)))
|
||||||
|
|
Loading…
Reference in a new issue