From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Li Subject: Re: Bug: org-paste-subtree displaces folded content [9.1.6 (9.1.6-48-gfe7619-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20180212/)] Date: Fri, 16 Feb 2018 03:18:22 +0000 Message-ID: References: <87a7wahsr1.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emWXp-0002yM-Tu for emacs-orgmode@gnu.org; Thu, 15 Feb 2018 22:18:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emWXl-0002Ug-VC for emacs-orgmode@gnu.org; Thu, 15 Feb 2018 22:18:41 -0500 Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]:33618) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emWXl-0002UW-Nb for emacs-orgmode@gnu.org; Thu, 15 Feb 2018 22:18:37 -0500 Received: by mail-qt0-x22e.google.com with SMTP id d8so2330639qtm.0 for ; Thu, 15 Feb 2018 19:18:37 -0800 (PST) Received: from mail-qt0-f180.google.com (mail-qt0-f180.google.com. [209.85.216.180]) by smtp.gmail.com with ESMTPSA id x10sm11109597qkl.83.2018.02.15.19.18.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 19:18:35 -0800 (PST) Received: by mail-qt0-f180.google.com with SMTP id d26so2288886qtk.10 for ; Thu, 15 Feb 2018 19:18:33 -0800 (PST) In-Reply-To: <87a7wahsr1.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Org Mode List On Thu, Feb 15, 2018 at 1:02 PM Nicolas Goaziou wrote: > Hello, > Allen Li writes: > > With the org file: > > > > * foo > > some content > > * bar > > some content 1 > > some content 2 > > > > 1. C-s foo RET > > 2. C-c C-x C-w > > 3. C-r some RET > > 4. C-c C-x C-y > > > > Final content is > > > > * bar > > some content 1 > > * foo > > some content > > some content 2 > I can reproduce it. > > The behavior is insidious when the contents are folded: > > > > * foo... > > * bar... > > > > turns into > > > > * bar... > > * foo... > IIUC, you cannot reproduce the example above when contents are folded, > since you do not have access to the headline contents. > > This can displace property and logbook drawers, timestamps, etc with very > > little visual indication. > > > > Is this behavior even desirable? To me, killing and yanking subtrees > > should keep the content with the headings and not "splice" subtrees into > > the middle of another heading's content > But you did yank the contents of the subtree into the middle of another > heading's content. So, what should do Org? Decide that you don't know > what you are doing and paste it at the end of the current section? What > if you really want to split the current section? I modified the example a bit and made the undesired behavior unclear. * foo :PROPERTIES: :ID: a :END: * bar :PROPERTIES: :ID: b :END: Folded, this looks like * foo... * bar... With point on the f in foo, press C-c C-x C-w. With point on the b in bar, press C-c C-x C-y. Results in * bar * foo... Unfolded, this looks like * bar * foo :PROPERTIES: :ID: a :END: :PROPERTIES: :ID: b :END: I would expect C-c C-x C-y to work like C-RET rather than M-RET, that is to always append after the heading and body rather than splitting it. > Is there any good solution to this problem? > Regards, > -- > Nicolas Goaziou