From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: fr: capture to kill buffer if requested Date: Tue, 26 Oct 2010 17:50:26 +0200 Message-ID: <280654EE-6843-4C94-8311-15DB7B754724@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=60988 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAmAb-0007iZ-Hp for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 12:14:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PAmAZ-0005w3-Vy for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 12:14:41 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:39681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PAmAZ-0005vq-QV for emacs-orgmode@gnu.org; Tue, 26 Oct 2010 12:14:39 -0400 Received: by eydd26 with SMTP id d26so2265928eyd.0 for ; Tue, 26 Oct 2010 09:14:36 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org On Oct 23, 2010, at 4:37 AM, Samuel Wales wrote: > Here is an idea for a minor feature in capture. > > Sometimes you don't want the buffer to stay around, but you > want to capture to it. Perhaps the plist notation could > include the possibility of killing the buffer after > capturing to it? I didn't find a hook, but maybe this is > useful enough for the plist notation. Sure, please use the property :kill-buffer THe buffer will only be killed if it was created to do the capture. If a buffer was already visiting this file before capture was initiated, then it will not be removed. This has a nice property: If you capture A to file foo, and in the middle of doing so you decide to also capture (using the same template) B to foo, then the buffer visiting foo will remain after B capture, but it will be removed after A capture is finalized. Greetings - Carsten