emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Samuel Wales <samologist@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: fr: capture to kill buffer if requested
Date: Tue, 26 Oct 2010 17:50:26 +0200	[thread overview]
Message-ID: <280654EE-6843-4C94-8311-15DB7B754724@gmail.com> (raw)
In-Reply-To: <AANLkTinq0uRkWTWSbTRrAxb_Ec7scwCZew0Kapq4hMLh@mail.gmail.com>


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

  reply	other threads:[~2010-10-26 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-23  2:37 fr: capture to kill buffer if requested Samuel Wales
2010-10-26 15:50 ` Carsten Dominik [this message]
2010-10-26 19:53   ` Samuel Wales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=280654EE-6843-4C94-8311-15DB7B754724@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=samologist@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).