From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id HzveGYX/cF/REwAA0tVLHw (envelope-from ) for ; Sun, 27 Sep 2020 21:09:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uLydFYX/cF81RAAA1q6Kng (envelope-from ) for ; Sun, 27 Sep 2020 21:09:25 +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 E5070940308 for ; Sun, 27 Sep 2020 21:09:24 +0000 (UTC) Received: from localhost ([::1]:36194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMdv9-0003zB-Lj for larch@yhetil.org; Sun, 27 Sep 2020 17:09:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMdum-0003z2-1w for emacs-orgmode@gnu.org; Sun, 27 Sep 2020 17:09:00 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:52613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMduk-0001Sa-9Y for emacs-orgmode@gnu.org; Sun, 27 Sep 2020 17:08:59 -0400 Received: by mail-pj1-x1042.google.com with SMTP id bw23so2448009pjb.2 for ; Sun, 27 Sep 2020 14:08:57 -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; bh=p6Yu8q/ZpIbwQa+vWndfSBi1Lq58mXHyjsAD6Cnmu+g=; b=MKhlv1z89I5KNdJqSxUE80JDDGVT7l0DzvCDc2IrcufgV2CyDbgY7S4gJ9OB02fEHS HW1jLi9cPkVXgTv+03sKNLuEnAVigX98mPN489bYnXsga9bORh1MAtlxWkDpRLKf5mbu n6YPpsPJh1a0txb3kkJPO/IP+hGlRk8CvnPzK6Bsk642NH0cRKZ/GsS5Ws9FrcpfyLHJ gmFegNiXM0mm/x7ANYtofKv6sPLOaw2rYYrBJ6kAr6sMB+s7skD+9BFmbp77XFCq8UyB HM8k8ECdNKCXmEaRrW+z3qPsBuRH5oT57TTpLtjMiebJmnj6J5Qud0XEAeSW3JRuPC0L 517A== 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; bh=p6Yu8q/ZpIbwQa+vWndfSBi1Lq58mXHyjsAD6Cnmu+g=; b=gsdl78MyeEYjmJs2KJfCTaLBHia8MylCGLq9FqPWTZZAyA76tZQvSt0zWX9Pl/I3T6 xstMDWEMDrEIx4+fvBBZJ3wRuLDxkG6z7cutT5p44t/AQWmbp5LoVn1xJr1TWR3iRdBa uJGC6UrLUcemdXwY7jg5rOwR/VZy/s8uVXpeN+TyramCgi+TjNzlRalmQmT/zK4St/Ee qkbkO3AgACIfs6RBdKoLqKIvekFlY0OqNWFyRl16wsmpqkpiQ8wBs+cIbTDcQDn459VI dHA5x5qDPk65J6wZ8kIqKDWokUz784M2a0P/DRNs0Bfz0loYaUPgNKOrQDZ/5FcfHdkn h4FA== X-Gm-Message-State: AOAM531ci4JJWm9EN7YllK1LuTh/AfGXzK9xxgjmPxOf8bdyl20BLs0z l4N12n94inFeWU0RojCL7JkJeKS7T2Jxo9u4XPg= X-Google-Smtp-Source: ABdhPJy5cKe51Y+qzeilE6SddjCYJ6fkWi0AxfpZfkF1XQ/PG+UNCWrobpTQjccFt/T1XOE0+xj02SKCYQPk8yyGGAI= X-Received: by 2002:a17:90a:5292:: with SMTP id w18mr6796507pjh.72.1601240936797; Sun, 27 Sep 2020 14:08:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:8371:0:0:0:0 with HTTP; Sun, 27 Sep 2020 14:08:56 -0700 (PDT) In-Reply-To: References: <878scvbsfi.fsf@aquinas> <87wo0f4i75.fsf@nicolasgoaziou.fr> From: Samuel Wales Date: Sun, 27 Sep 2020 14:08:56 -0700 Message-ID: Subject: Re: newline or no newline at end of capture: expected behavior To: Samuel Wales , Richard Lawrence , emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=samologist@gmail.com; helo=mail-pj1-x1042.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: , 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=MKhlv1z8; 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.71 X-TUID: 5ocODAGQYJzN ... but i want to know what is expected. it sopunds like org is intended to produce the desired result regardless. so i will messa aroud more with my settings. i am limited in comput3er use so it might take a while for me to produce anything liek an mwe. but i will check a few things. On 9/27/20, Samuel Wales wrote: > hi nicolas, > > thanks, that helps to know that org adds a newline. this prevents the > failure mode of corrupted headers. > > just to confirm, do you mean capture /templates/ [potentially > verifiable by org] vs. /finalized buffers/? > > it sounds like you mean templates, because otherwise org just does > whatever is necessary to create desired lines? > > the user can mess with the buffer, so might leave a trailing newline > or not. might copy from a file that ensures trailing newline, or one > that does not, etc. > > thus finalized buffers can contain anything. or nothing. > > at present, possibly due to my own errors, without the options > specified explicitly, i get blank lines below the header if i finalize > the buffer with a trailing newline, and blank lines below the target > header if i capture with an empty buffer. in maint. > > > On 9/27/20, Nicolas Goaziou wrote: >> 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 >> > > > -- > The Kafka Pandemic > > Please learn what misopathy is. > https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html