From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 71XRC4tCcF9YJAAA0tVLHw (envelope-from ) for ; Sun, 27 Sep 2020 07:43:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cPYZB4tCcF+MfgAAB5/wlQ (envelope-from ) for ; Sun, 27 Sep 2020 07:43:07 +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 E3C6694051B for ; Sun, 27 Sep 2020 07:42:58 +0000 (UTC) Received: from localhost ([::1]:39760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMRKj-0006dA-DU for larch@yhetil.org; Sun, 27 Sep 2020 03:42:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMRJs-0006cu-Ek for emacs-orgmode@gnu.org; Sun, 27 Sep 2020 03:42:04 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:39585) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMRJq-0001tH-Np for emacs-orgmode@gnu.org; Sun, 27 Sep 2020 03:42:04 -0400 Received: by mail-pf1-x42e.google.com with SMTP id n14so6616683pff.6 for ; Sun, 27 Sep 2020 00:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tH5HiVLodV84e1ZtPiKQi04cT9Qylt2Lv89R2Gjzf94=; b=toqJ3Lz9HUn4YTZlCy2Ay9SvCkqw5wxFsVUyuSXvlS3E7bC5SlHmoMcb/FNhI4bXXP cliOnLoCMQu6Nu2MhpYL020ZoJBtZYiCjE8HcxgrosOtUEr+s4uuzVlyCCeZQhD5aFKw 25Z7386y7YT0eqsWJNq6aLhyo/cmpXoWQpKwFPwuR67Z4ha9QKrvCkxj+0vYYjerYEiC 8hva6kT2ZJBYlzVkhFcq1FUiUeGMVhjHCSIMX6KnVF5rIVaAcFD2/HkccqWpYr3dbac6 AWtm6mBcsJhdIthgFS/JVtvKjrKph95y0sFg1NKaVluLPB2wL9b/yRHOjRFmpALI3OqL XFzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tH5HiVLodV84e1ZtPiKQi04cT9Qylt2Lv89R2Gjzf94=; b=NrBr5nBhcUpBQ86SluiOgCt+bV/sgEMhKGum7yFY2fwff7pUKRjN2wX/2bN2hfsmab 0BlgU298D7IgXinqqQzvEfGx1/Gd57mUbtPkCvKgG254dBYvj5PBZ3o/F5vtJmEUeVZT jDU7ewlEkQRLxE2eJvY+GKLkOqknUFnvdn95EZgK/4DgSc9NomwJgwPABEg/iOtQ6BAg bkNYFp3USZDQ0fiHDiVSiOEOvfnqdzkXgVs8QW4au4fQft+cdh5qSW5siYcK+dsTFLSn bLWnlGAWqqmS/m9nWqhIl9lsgtxjWzeY1ZfVnicsQMSmgjJZjuxismMgyj1YrY2dvAfQ Ag3A== X-Gm-Message-State: AOAM5307zHSvdhdxFFKF9JdQ1aoyVRaNX1DOUo9WblD9pJ3xYAfU2h/E Cd8moIosAHKcbqhJF8n3mQcAumU3iw2M268ZnTU= X-Google-Smtp-Source: ABdhPJwDX6T7QJIWLXcAijLJrtFiVK7VSiF5vEGHoS2G8en6VzvTjEpfFBBVqe8auG6gRYYVCa0cq9ejwPR+Bj3739c= X-Received: by 2002:a05:6a00:d0:b029:150:959d:5139 with SMTP id e16-20020a056a0000d0b0290150959d5139mr6269052pfj.38.1601192521169; Sun, 27 Sep 2020 00:42:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:8371:0:0:0:0 with HTTP; Sun, 27 Sep 2020 00:42:00 -0700 (PDT) In-Reply-To: <878scvbsfi.fsf@aquinas> References: <878scvbsfi.fsf@aquinas> From: Samuel Wales Date: Sun, 27 Sep 2020 00:42:00 -0700 Message-ID: Subject: Re: newline or no newline at end of capture: expected behavior To: Richard Lawrence Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=samologist@gmail.com; helo=mail-pf1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=toqJ3Lz9; dmarc=pass (policy=none) header.from=gmail.com; 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.09 X-TUID: iWpVltu/OfCn hi richard, 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? On 9/27/20, Richard Lawrence wrote: > Hi Samuel, > >> On 9/23/20, Samuel Wales wrote: >>> i have the same question for headline-only capture >>> buffers. i.e. what is the expected result with and without trailing >>> newline. > > Just to clarify: are you aware of the :empty-lines, :empty-lines-before > and :empty-lines-after keys that you can set in org-capture-templates? > Are your questions about the default values of these keys? > > I just tried a simple setup in emacs -Q with Org 9.4, namely: > > (setq org-capture-templates > '(("s" "simple" entry (file+headline "~/org/notes.org" "Foo") > "* %?" :empty-lines 1))) > > and Org seems to correctly respect the value of these keys when they are > specified explicitly. That is, with :empty-lines 0, no newlines are > added; with :empty-lines 1, a blank line appears on each side of the > captured entry; with :empty-lines-after 1, a blank line appears after, > but not before, the new entry; and so on. > > Can you use these keys to get the behavior you are looking for? Or is > your question about something else? > > -- > Best, > Richard > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html