From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: org-paste-subtree and org-refile broken Date: Sat, 13 Aug 2011 09:03:40 -0500 Message-ID: <87ty9lpfwj.fsf@fastmail.fm> References: <87pqkac7hy.fsf@fastmail.fm> <87pqk93h9c.wl%dmaus@ictsoc.de> <877h6h4g2y.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsEoS-00009p-Ug for emacs-orgmode@gnu.org; Sat, 13 Aug 2011 10:03:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QsEoR-0008Es-Ge for emacs-orgmode@gnu.org; Sat, 13 Aug 2011 10:03:44 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:48926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsEoR-0008Eg-E5 for emacs-orgmode@gnu.org; Sat, 13 Aug 2011 10:03:43 -0400 In-Reply-To: <877h6h4g2y.wl%dmaus@ictsoc.de> (David Maus's message of "Sat, 13 Aug 2011 15:05:25 +0200") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Maus Cc: Sebastien Vauban , Org Mode David Maus writes: > At Sat, 13 Aug 2011 09:25:19 +0200, > David Maus wrote: >> >> Hi Matt, >> Hi Sebastien, >> >> I pushed a temporary workaround to master that should fix the problem >> with refile and capture. Both depend on a buggy behavior of >> org-paste-subtree, i.e. pasting a subtree *above* the target headline >> when called with point at the beginning of the target headline. > > If you have already pulled, please pull again. Had confused something, > fixed now. Thanks for fixing this! Refiling is working well now. Could you explain what you mean by a "buggy behavior of org-paste-subtree." AFAIK, org-paste-subtree has always pasted the subtree above the current tree if the point is at the beginning of the headline. Is there something in the documentation that suggests that this should not be the case? I believe this behavior is consistent with org-insert-heading-respect-content, which inserts a new heading above the current heading if called at the beginning of a headline. For instance, in the following example... --8<---------------cut here---------------start------------->8--- * One Text in one * Two Text in two ** Subpoint two Text in subpoint two. * Three Text in three * Four Text in four --8<---------------cut here---------------end--------------->8--- If I kill headline four, move the point to the beginning of headline three, and yank (i.e., call org-paste-subtree), I get the following, which seems to me correct: --8<---------------cut here---------------start------------->8--- * One Text in one * Two Text in two ** Subpoint two Text in subpoint two. * Four Text in four * Three Text in three --8<---------------cut here---------------end--------------->8--- Similarly, if I place the cursor on three and call org-insert-heading-respect-content (M-RET), the new headline is inserted above the headline: --8<---------------cut here---------------start------------->8--- * One Text in one * Two Text in two ** Subpoint two Text in subpoint two. * * Three Text in three * Four Text in four --8<---------------cut here---------------end--------------->8--- Best, Matt