emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 57abbd4b92 1/4: org.el: Fix first call of `org-past


From: ELPA Syncer
Subject: [elpa] externals/org 57abbd4b92 1/4: org.el: Fix first call of `org-paste-subtree'
Date: Mon, 31 Oct 2022 21:57:59 -0400 (EDT)

branch: externals/org
commit 57abbd4b928752f2770898b09bbac8126b9d0eb3
Author: Max Nikulin <manikulin@gmail.com>
Commit: Ihor Radchenko <yantar92@posteo.net>

    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.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index ea9db49fb6..6aa81b020a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]