emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] capture template property :kill-buffer does not let me refile


From: Rodrigo Amestica
Subject: Re: [O] capture template property :kill-buffer does not let me refile
Date: Sun, 27 Oct 2013 12:39:15 -0400
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.3 Mule/6.0 (HANACHIRUSATO)

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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]