From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id jmfPGBtscF8IPwAA0tVLHw (envelope-from ) for ; Sun, 27 Sep 2020 10:40:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +MFUFBtscF8XdwAAbx9fmQ (envelope-from ) for ; Sun, 27 Sep 2020 10:40:27 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1B786940223 for ; Sun, 27 Sep 2020 10:40:27 +0000 (UTC) Received: from localhost ([::1]:52818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMU6T-0006iT-Ob for larch@yhetil.org; Sun, 27 Sep 2020 06:40:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMU5l-0006iL-F3 for emacs-orgmode@gnu.org; Sun, 27 Sep 2020 06:39:41 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:56215) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMU5j-0004Lc-Ms for emacs-orgmode@gnu.org; Sun, 27 Sep 2020 06:39:41 -0400 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay11.mail.gandi.net (Postfix) with ESMTPSA id B3615100002; Sun, 27 Sep 2020 10:39:35 +0000 (UTC) From: Nicolas Goaziou To: Samuel Wales Subject: Re: newline or no newline at end of capture: expected behavior References: <878scvbsfi.fsf@aquinas> Mail-Followup-To: Samuel Wales , Richard Lawrence , emacs-orgmode@gnu.org Date: Sun, 27 Sep 2020 12:39:26 +0200 In-Reply-To: (Samuel Wales's message of "Sun, 27 Sep 2020 00:42:00 -0700") Message-ID: <87wo0f4i75.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.178.231; envelope-from=mail@nicolasgoaziou.fr; helo=relay11.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/27 06:39:36 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, Richard Lawrence Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: d7VsYrz//OYR Hello, Samuel Wales writes: > thank you. when i can, i will try explicitly setting all three to 0 > to see if that prevents the unwanted newlines, in the buffer with > newline on last line, and empty buffer, cases. > > the docstring says empty-lines defaults to 0, which is what i want. > it does not say what the default for after and before are. > > it /sounds/ like capture is supposed to produce the desired number > [and position] of empty lines regardless of whether the buffer is > empty or there is or is not a trailing newline on the final line of > hte buffer. is this more or less correct? I didn't read the whole thread, but a final newline is mandatory in all capture templates, independently on the number of desired blank lines. If such final newline is not provided, the capture mechanism will add one. The only exception is about empty capture templates, which are left as-is, i.e. a "final newline" is not added in that case. I don't know if that answers your question, but HTH. Regards, -- Nicolas Goaziou