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 OIcsMjhLcV+sfAAA0tVLHw (envelope-from ) for ; Mon, 28 Sep 2020 02:32:24 +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 IDoTLjhLcV9eMQAA1q6Kng (envelope-from ) for ; Mon, 28 Sep 2020 02:32:24 +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 2B0119402B2 for ; Mon, 28 Sep 2020 02:32:24 +0000 (UTC) Received: from localhost ([::1]:54964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMixi-0004GA-VW for larch@yhetil.org; Sun, 27 Sep 2020 22:32:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMiwi-0004Fn-RM for emacs-orgmode@gnu.org; Sun, 27 Sep 2020 22:31:20 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:39377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMiwg-0002xo-Tr for emacs-orgmode@gnu.org; Sun, 27 Sep 2020 22:31:20 -0400 Received: by mail-pf1-x429.google.com with SMTP id n14so7962779pff.6 for ; Sun, 27 Sep 2020 19:31:18 -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=AkuwICm80OZwfJr3D54uWBT9ztQYOtsxvcuirsqM7dQ=; b=d9AUFZVlMy+kziBSJK3yc6ZTD0Idz8BXu+40DFa95KQBSfWkvbrrRJsAs4xfFulA6m LtxomNu4vsUCKZnwcjRpX5llvThYINtgR735CdG3mTUp7oa1oW0cHVHnIZ6257jjwI3M 9YxEa+u0uC9WysYlITXuyGMYLapY493k4ddthWJs1PZOnI4Ri8a70W3WuMv+kQshq7p6 79yDcrJaP+1BTM/DMbYM2ylO38gUTtGX+blgRIryzrkHIDJ2qH9SSLlIa/WVM+GNIsZX gqT1tAH+BaiRnZQDrp+HdjYF32T+JFi8CGXyGBA5KcbdBJdThmTpktEGLRlIkhKG+L8V ee5A== 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=AkuwICm80OZwfJr3D54uWBT9ztQYOtsxvcuirsqM7dQ=; b=lsRyZh3H9K4D5KD/GVByVe9WsfvlAztGu0mBGNgTp3NWjl+m6CKltgMwoc/e3Uq319 rZdtRQ+ubP3/nL3vK9jvlCu8B1BJocIyh1hm6QU5Ilp/fR3x3sWi1JWCynUudRm8Gh+b /zNhmSE+/GwVz02K59ekF7K/8VjgOerqV6UhP3HplZP/6AE/KNFP9phFmd9XUU8RxOX8 iLm64oYB7gDjS0pjuFaesvQubWoeih5oQtWrR3TNyL5mSO2FyWmvPMAnoAYbphKWhSBi 4QIkliuHszJJd9Npp5pv1kBJMSJAwH9tlHAg9hpzBdsgK8UUgFHPhjZvLJD64muAMKe1 Bo2A== X-Gm-Message-State: AOAM531qkzcQJ9iSc2ROx1qayHVJ4UEOYUhL3q9+fPKJmDt8aLYe0Epf gzNsu6sc4YigRqboFPkFy5T07+XHfitQ4AZGXjg= X-Google-Smtp-Source: ABdhPJwf3Yf/lf08PhY6Y/1Nqb7qrEgeH0clXexB7AKmy0R4V2w6Fo4b0rPz+k9CXkLRUTDeuL9KbK0RS0ewrTFh79s= X-Received: by 2002:a17:902:aa0a:b029:d0:89f4:6224 with SMTP id be10-20020a170902aa0ab02900d089f46224mr9640490plb.12.1601260277408; Sun, 27 Sep 2020 19:31:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:8371:0:0:0:0 with HTTP; Sun, 27 Sep 2020 19:31:16 -0700 (PDT) In-Reply-To: References: <878scvbsfi.fsf@aquinas> <87wo0f4i75.fsf@nicolasgoaziou.fr> From: Samuel Wales Date: Sun, 27 Sep 2020 19:31:16 -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::429; envelope-from=samologist@gmail.com; helo=mail-pf1-x429.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=d9AUFZVl; 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: ho3wzHeFr5yA well, fwiw, i am still getting empty lines for capture buffers with a final newline and empty capture buffers. idk if htat helps by iutself. recent maint [new org version] emacs 25. On 9/27/20, Samuel Wales wrote: > ... 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 > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html