emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Dale Sedivec <dale@codefu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: org-paste-subtree may delete headline at point [9.1.14 (release_9.1.14-961-g5abfde)]
Date: Thu, 04 Oct 2018 22:53:57 +0200	[thread overview]
Message-ID: <87tvm1ph5m.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAEj9N4JR8LB+PC_NeaXYAxap6imLUG2nu5piGyjeuLfqk0zU-w@mail.gmail.com> (Dale Sedivec's message of "Thu, 4 Oct 2018 12:05:06 -0500")

Hello,

Dale Sedivec <dale@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	other threads:[~2018-10-04 20:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 17:05 Bug: org-paste-subtree may delete headline at point [9.1.14 (release_9.1.14-961-g5abfde)] Dale Sedivec
2018-10-04 20:53 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tvm1ph5m.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=dale@codefu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).