From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [PATCH RFC] subtree archive hook? Date: Mon, 13 Oct 2014 02:45:10 +0800 Message-ID: <87egud2kll.fsf@ericabrahamsen.net> References: <87vbnp2wix.fsf@ericabrahamsen.net> <87oathia7m.fsf@gmail.com> <87r3yd2rrp.fsf@ericabrahamsen.net> <877g05i2bf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdO4J-0000gC-O1 for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 14:40:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdO4C-0003Pi-1a for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 14:40:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:38279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdO4B-0003Pa-PN for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 14:40:27 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XdO4A-0006EP-4g for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 20:40:26 +0200 Received: from 114.248.11.237 ([114.248.11.237]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Oct 2014 20:40:26 +0200 Received: from eric by 114.248.11.237 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Oct 2014 20:40:26 +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: emacs-orgmode@gnu.org Aaron Ecay writes: > Hi Eric, > > 2014ko urriak 12an, Eric Abrahamsen-ek idatzi zuen: >>> >>> Can the above inlinetask thing also be moved into the hook? That >>> seems cleaner, and gives another demonstration of the usefulness of >>> the feature. >> >> Here's a patch that does it, though I'm a little more cautious about >> this since I only did a minimal test. >> >> Two things that worry me: 1) why is it called "remove-END-maybe" when it >> appears to remove the whole inlinetask, and 2) it its original habitat >> in org-attach, it came after the call to org-cut-subtree, meaning that >> it couldn't have operated on the subtree to be archived at all! Or am I >> misunderstanding something? > > No, you’re not misunderstanding – I was. Indeed, the inline task stuff > has to come after the call to org-cut-subtree, so it’s not a candidate > for inclusion in the new hook. > > (What happens is that org-cut-subtree removes the inline task headline and > any contents, leaving a bare *** END line. The latter is subsequently > cleaned up by the org-inlinetask-remove-END-maybe call.) Yup, I figured it out after another few minutes of staring at it. No harm done, I guess!