org-kill-is-subtree-p: Handle clipboard

* lisp/org.el (org-kill-is-subtree-p): Allow `current-kill' to return
clipboard (even when `kill-ring' is empty).  Do not throw error when
clipboard is also empty.
This commit is contained in:
Ihor Radchenko 2022-11-01 09:28:48 +08:00
parent 57abbd4b92
commit 33cbb11d5a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -7124,7 +7124,7 @@ headline level is not the largest headline level in the tree.
So this will actually accept several entries of equal levels as well,
which is OK for `org-paste-subtree'.
If optional TXT is given, check this string instead of the current kill."
(let* ((kill (or txt (and kill-ring (current-kill 0)) ""))
(let* ((kill (or txt (ignore-errors (current-kill 0))))
(re (org-get-limited-outline-regexp))
(^re (concat "^" re))
(start-level (and kill