From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id wPTiJs4qzWbmDQAA62LTzQ:P1 (envelope-from ) for ; Tue, 27 Aug 2024 01:24:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wPTiJs4qzWbmDQAA62LTzQ (envelope-from ) for ; Tue, 27 Aug 2024 03:24:30 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=NuozUghy; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724721870; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9SwXRygRByst4A+l//lQpiNO9zrD3KM35hiAeEyIIno=; b=ZDtTmM9jiGJmuyhepgxNRkPr2AcRbWSXDU332WEEzDWIRvySOyN8yNSk9UDbkxUm8Db2cs yhUr3+7rZ4Uw8dsU40FU5DC501LrlNizOQZsAVDG0NJTnAVWU5IzVeDjba/XD+BHjTzBsN Aqtq+oTNEGSg60tucBcpD4Jwqw3ad+pBs66JxbMfUygfc1nuop5rPZ10ElQrlXCmsgS5e8 jkR1XEieo/sExaGhEJJq8BqA9TKxGU94gsxvtZYv+9+79XPpQzKoFZt57iDuFTwd2hP0J6 8gOK2SA2LC4TxqRhEymAqWZv9isCjFWZnGarefSzQPhgCWXr7pBT1AoCmixLZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724721870; a=rsa-sha256; cv=none; b=btKLkEjzCsMWxozz2Uman2PCw5639RJGajeasegvVxWVKnW2lkTsefzZ3Pgp9bMkvrIdem 7sxHvfREcVSnfV8D8gHi0qTa8pw9yBvNRxHMjMROQX1XJAIeDVLPzT0AFkUQW5j3N90A8f M7q6vSsMErVq9l6hasmur+lpHWhDVz9EAaAd6mRxbjxuEvHGXf74i1ZkTI+HMQZvbnX6ZV 7FP4zvSrjgCtEmk1qM2QSFcLhVOsr3orzvmmMSfMEXqjVugiycwEADJL74Aj52OBQZujYB 3+Iheb06EpSmFDnQ7YrCuOJmsNqTTApqstkBUdgCK5LYaUoJGetrj6fx48u87w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=NuozUghy; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" 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 6FFEB15926 for ; Tue, 27 Aug 2024 03:24:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sikvT-0000JV-MD; Mon, 26 Aug 2024 21:23:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sikvH-0000II-72 for emacs-orgmode@gnu.org; Mon, 26 Aug 2024 21:23:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sikvG-0006tJ-Uf for emacs-orgmode@gnu.org; Mon, 26 Aug 2024 21:23:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=9SwXRygRByst4A+l//lQpiNO9zrD3KM35hiAeEyIIno=; b=NuozUghyURW0aZ 76k+kiR06QGkZ1cRE96dv+H3xzWhcVG8euGBA2mX77FAZ3ZJ/3P4ORC/K95UPEPi1cshU2q5s8rn6 YXY7EqskdOWNXA0pBuh6i7BrlEwhIZHG13d+CTVBB6XvQmkLmhaxgfW3hM1NElU5ioNaFOmO0PKa4 Vvq7yhyEW+gra8hywZHmC0klhKGM7vNw7uiKqdupoFuDtfSrDQ1eMqOffec/uAhOc7p62IZrEHdCF cXGX5cWRE0no68K50+4Lbrn1cFs0nUxzPr3I+ejdeWecglF0WU/j9cDRWKwCDfSyxy0VSbUO0qRyH 1jy2BZpuil04ZXnhb1gg==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvledggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuff fkfgggtgfgsehtqhertddtreejnecuhfhrohhmpedflfhohhhnucghihgvghhlvgihfdcu oehjohhhnhifsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpefgvefhffefueeije ekfffhhfdtgeetveekvdeugeeghfeivdfhuddvkeeulefgkeenucffohhmrghinhephhgv rggulhhinhgvrdhorhhgpdhnvgifrghrthhishgrnhhsrdgtohhmnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhohhhnfidomhgvshhmthhp rghuthhhphgvrhhsohhnrghlihhthidqieekjeektdelgeegqddujeejheefkeduiedqjh hohhhnfieppehgnhhurdhorhhgsehnvgifrghrthhishgrnhhsrdgtohhmpdhnsggprhgt phhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvmhgrtghsqdhorh hgmhhouggvsehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail From: "John Wiegley" To: emacs-orgmode@gnu.org Subject: Archiving always adds a newline before entries Mail-Followup-To: emacs-orgmode@gnu.org Date: Mon, 26 Aug 2024 18:22:46 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 6FFEB15926 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -11.21 X-Spam-Score: -11.21 X-TUID: PjfB6qSqAzpc I like to avoid blank lines between Org-mode entries, but have found that w= hen archiving (and not use datetrees), that this is not supported by Org-mode out-of-the-box. Mainly it=E2=80=99s due to these lines: (if (and heading (not (and datetree-date (not datetree-subheading-p))= )) =E2=80=A6 ;; No specific heading, just go to end of file, or to the ;; beginning, depending on `org-archive-reversed-order'. (if org-archive-reversed-order =E2=80=A6 (goto-char (point-max)) ;; Subtree narrowing can let the buffer end on ;; a headline. `org-paste-subtree' then deletes it. ;; To prevent this, make sure visible part of buffer ;; always terminates on a new line, while limiting ;; number of blank lines in a date tree. ---> (unless (and datetree-date (bolp)) (insert "\n")))) ;; Paste (org-paste-subtree (org-get-valid-level level (and heading 1))) The line indicated above always appends a newline at the end of the buffer, so that the pasted tree appears after this newline. It would be nice if this followed the configuration of =E2=80=98org-blank-before-new-entry=E2=80=99,= for example. Meanwhile, I corrected the behavior with advice. Not ideal, since it affects all cases of pasting subtrees, but it works well enough: (advice-add 'org-paste-subtree :before #'(lambda (_) (delete-blank-lines)= )) -- John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2