From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: aborting capture to new file leaves 1-byte file behind [8.2.7c] Date: Sun, 28 Sep 2014 00:11:46 +0200 Message-ID: <87lhp4r9wd.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XY0Cx-0003Fa-GF for emacs-orgmode@gnu.org; Sat, 27 Sep 2014 18:11:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XY0Cp-00089v-JN for emacs-orgmode@gnu.org; Sat, 27 Sep 2014 18:11:15 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:35073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XY0Cp-00089R-CZ for emacs-orgmode@gnu.org; Sat, 27 Sep 2014 18:11:07 -0400 In-Reply-To: (Ben Winslow's message of "Sun, 07 Sep 2014 01:59:07 -0400") 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: Ben Winslow Cc: emacs-orgmode@gnu.org Hello, Ben Winslow writes: > I'm using a capture template to create a new file (via read-file-name) > with some pre-filled #+STARTUP options. I'm using immediate-finish, > but while I was setting it up I noticed that captures to a new file > will leave behind a 1-byte file (containing a newline) if aborted with > org-capture-kill. > > To replicate, just add a new capture template pointing to > a non-existent file, start capturing to it, then abort. Thanks for you report. I can reproduce it, but I hardly consider it as a bug. Since your template is meant to populate the file, it is expected to be created at some point anyway. Note that it can contain more than a newline if you call, for example, `time-stamp' from `before-save-hook'. Regards, -- Nicolas Goaziou