mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-27 07:37:25 +00:00
Refile: Fix horrible bug
This bug would make refiling complain about the tree not being a tree unless the *previous* content of the tree was a tree. Pretty bad....
This commit is contained in:
parent
386e0dcef6
commit
0728025585
@ -1,3 +1,8 @@
|
||||
2009-08-05 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-paste-subtree): Test the kill ring entry if it is
|
||||
going to be used.
|
||||
|
||||
2009-08-04 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-table-map-tables): Make sure cursor is back at table
|
||||
|
@ -6184,12 +6184,13 @@ When FOR-YANK is set, this is called by `org-yank'. In this case, do not
|
||||
move back over whitespace before inserting, and move point to the end of
|
||||
the inserted text when done."
|
||||
(interactive "P")
|
||||
(setq tree (or tree (and kill-ring (current-kill 0))))
|
||||
(unless (org-kill-is-subtree-p tree)
|
||||
(error "%s"
|
||||
(substitute-command-keys
|
||||
"The kill is not a (set of) tree(s) - please use \\[yank] to yank anyway")))
|
||||
(let* ((visp (not (org-invisible-p)))
|
||||
(txt (or tree (and kill-ring (current-kill 0))))
|
||||
(txt tree)
|
||||
(^re (concat "^\\(" outline-regexp "\\)"))
|
||||
(re (concat "\\(" outline-regexp "\\)"))
|
||||
(^re_ (concat "\\(\\*+\\)[ \t]*"))
|
||||
|
Loading…
Reference in New Issue
Block a user