Hello,

Dale Sedivec <d...@codefu.org> writes:

> Hi, I think I may have found a bug in org-paste-subtree in master branch
> where it will delete the content of the headline at point before yanking.
> Steps to reproduce:
>
> 1. Start a fresh Emacs along the lines of:
>
> mkdir /tmp/fake-home
> cd /tmp/fake-home
> git clone https://code.orgmode.org/bzg/org-mode.git
> (cd org-mode && make autoloads)
> HOME=/tmp/fake-home emacs -L /tmp/fake-home/org-mode/lisp
>
> 2. Create a new org file with the following contents:
>
> * One
> * Two
> * Three
>
> 3. Move point to the "Two" headline, use C-c C-x C-w to kill it
>
> 4. Move point to *the end* of the "One" headline (first line)
>
> 5. Try to yank the "Two" headline: C-c C-x C-y (org-paste-special ->
> org-paste-subtree)
>
> Expected results (using ~~~~~~ as delimiters here):
>
> ~~~~~~
> * One
> * Two
> * Three
> ~~~~~~
>
> Observed results:
>
> ~~~~~~
>
> * Two
> * Three
> ~~~~~~
>
> Note that all content on the "* One" line where we invoked
> org-paste-subtree has been deleted.

Ouch. Thank you for spotting this and for the analysis. I applied
a patch in the line of what you suggested.

Regards,

-- 
Nicolas Goaziou

Reply via email to