From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rodrigo Amestica Subject: Re: capture template property :kill-buffer does not let me refile Date: Sun, 27 Oct 2013 12:39:15 -0400 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaTN1-0005IS-ON for emacs-orgmode@gnu.org; Sun, 27 Oct 2013 12:39:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaTN0-0003bL-Jn for emacs-orgmode@gnu.org; Sun, 27 Oct 2013 12:39:19 -0400 Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]:63550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaTN0-0003aZ-Fv for emacs-orgmode@gnu.org; Sun, 27 Oct 2013 12:39:18 -0400 Received: by mail-qc0-f170.google.com with SMTP id n9so3331402qcw.15 for ; Sun, 27 Oct 2013 09:39:17 -0700 (PDT) Received: from trauko.gmail.com ([2601:8:3000:1e0:2810:8ec:cd97:9d2b]) by mx.google.com with ESMTPSA id x10sm43389850qas.5.2013.10.27.09.39.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 27 Oct 2013 09:39:16 -0700 (PDT) In-Reply-To: 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 please, no body else having the same issue? I tried to understand in org-refile and org-capture-refile how is that refile and closing the buffer intermix, but I'm not that lisp proficient :-( Then I tried providing some code for org-capture-after-finalize-hook, and org-after-refile-insert-hook My idea was to save and close the buffer associated to the file I'm capturing to from one of those hooks. However, it seems that both hooks are invoked before the new captured text has been inserted into the buffer. For example, if in the hook I add code to only select and close the associated buffer then after the capture process has finished then the buffer appears as modified requiring an explicit save. Any hints? Many thanks, Rodrigo emacs 24.3.1 org 8.2.1 At Fri, 25 Oct 2013 18:54:33 -0400, Rodrigo Amestica wrote: > > Hello, > > for some days I have been capturing one of my templates using C-c C-w > (org-capture-refile). This option let's me conveniently select under which exact > header (within the target file) to insert the new entry. > > Leaving the target file buffer alive after inserting a new item is inconvenient > in my case. So I added ':kill-buffer t' to the template configuration. But doing > so resulted in that now C-c C-w does not offer me to select anything, the entry > is simple inserted at the beginning of the file and the buffer is killed. > > My template is shown below. Is it actually possible to combine > org-capture-refile with :kill-buffer? > > Thanks, > Rodrigo > > ("t" > "Template" > entry > (file "~/my/file.org") > "* \n :PROPERTIES:\n :Some: \n :Properties: \n :END:" > :prepend t :kill-buffer t)