From mboxrd@z Thu Jan 1 00:00:00 1970 From: Per Unneberg Subject: Re: refiling as child with function-filing-location Date: Mon, 27 Oct 2014 21:51:29 +0100 Message-ID: <87wq7lck32.fsf@scilifelab.se> References: <87mw8oblc3.fsf@scilifelab.se> <8761f6pw7o.fsf@ericabrahamsen.net> Reply-To: Per Unneberg Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XirGQ-00033u-HN for emacs-orgmode@gnu.org; Mon, 27 Oct 2014 16:51:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XirGK-0004jO-MU for emacs-orgmode@gnu.org; Mon, 27 Oct 2014 16:51:42 -0400 Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:36282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XirGK-0004iO-EG for emacs-orgmode@gnu.org; Mon, 27 Oct 2014 16:51:36 -0400 Received: by mail-la0-f52.google.com with SMTP id hz20so6691359lab.11 for ; Mon, 27 Oct 2014 13:51:34 -0700 (PDT) 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: Eric Abrahamsen Cc: emacs-orgmode@gnu.org Hi Eric, Eric Abrahamsen writes: > I'm messing about with some similar template-placement routines, so I > tried your recipe below, and it worked for me... Capture by default Odd, as I still can't get it to work. I tried it out with emacs -Q, just defining that org-capture template and running it on a simple example. > will create a child of the heading point is on, so I really don't see > why this wouldn't work. You've stepped through the function and > confirmed that the (goto-char (point-at-bol)) line leaves you at the > "Log" heading? Yes, it leaves point at the very beginnig of that heading. The template itself is always inserted at point, so it ends up as a sibling just before the Log heading. Actually, the only way I can get it to work is if Log has a child, and I add a (org-goto-first-child) after locating the Log heading. > > Is the tree structure folded or open at the time? You might try an > (org-reveal) after the (org-clock-goto); I'm still not really clear on > the interaction between visibility and heading insertion. Me neither, but unfortunately changing visibility doesn't help. > > Anyway, I can't reproduce the problem -- do try messing with > visibility... Ok, thanks anyway for your input, I'll figure it out some other way. Cheers, Per