mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-23 18:19:20 +00:00
org.el: Fix first call of `org-paste-subtree'
* lisp/org.el (org-paste-subtree): Do not check `kill-ring' before calling `current-kill' since the latter can pull content of clipboard. First call of `org-paste-subtree' failed if nothing had been yanked before since Emacs start but system clipboard had text with valid subtree originating from other application. The bug was where since the commit adding `org-paste-subtree'. If both `kill-ring' and system clipboard are empty then `current-kill' generates meaningful error.
This commit is contained in:
parent
6ef33b6dd6
commit
57abbd4b92
|
@ -7034,7 +7034,7 @@ the inserted text when done.
|
|||
|
||||
When REMOVE is non-nil, remove the subtree from the clipboard."
|
||||
(interactive "P")
|
||||
(setq tree (or tree (and kill-ring (current-kill 0))))
|
||||
(setq tree (or tree (current-kill 0)))
|
||||
(unless (org-kill-is-subtree-p tree)
|
||||
(user-error
|
||||
(substitute-command-keys
|
||||
|
|
Loading…
Reference in a new issue