From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou 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 Message-ID: <87tvm1ph5m.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8AdN-0005ik-EV for emacs-orgmode@gnu.org; Thu, 04 Oct 2018 16:54:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8AdF-0002Xq-RH for emacs-orgmode@gnu.org; Thu, 04 Oct 2018 16:54:08 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:40163) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g8AdF-0002Sy-KK for emacs-orgmode@gnu.org; Thu, 04 Oct 2018 16:54:01 -0400 In-Reply-To: (Dale Sedivec's message of "Thu, 4 Oct 2018 12:05:06 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Dale Sedivec Cc: emacs-orgmode@gnu.org Hello, Dale Sedivec 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