From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oI+RB4LiWGP2NwAAbAwnHQ (envelope-from ) for ; Wed, 26 Oct 2022 09:32:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SGbDBoLiWGMvZwAAG6o9tA (envelope-from ) for ; Wed, 26 Oct 2022 09:32:18 +0200 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 A90452D915 for ; Wed, 26 Oct 2022 09:32:17 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onaqF-0001Ux-9x; Wed, 26 Oct 2022 03:28:47 -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 1onaqC-0001NX-Fn for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 03:28:44 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onaqA-0002IN-Hj for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 03:28:44 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D52F5240105 for ; Wed, 26 Oct 2022 09:28:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666769319; bh=lT7lKqeIt2Dl2+EcvXxbD4oJAmIxT4+ZHTHjQ6IVoPI=; h=From:To:Cc:Subject:Date:From; b=sGC1V8A+95RfqMW575KY2akGdlXPn8YwpSwMzZVVqm6dTNQdzF3mnUSgp6eVLM2qo r1V9bF5DJJithGvoNS5DRo4x0oCiaJHWcBi8EZNcVvRLZr0w10J2qnlYz/qbttz8sf QQlvjy2M1+qbdjM9rVoYvWXhj8hfHWD8wjXnVxQZ+/R8MK4f2dIRG/0rGuzDRG41YN y0/kJkH2SJuoF6ClIgVnAVrGGKoXhr7EBFivSkFmiDCmMbUAbCqiasJsjclNAfjY3z htWxoCR977/G0Ed1lC3Gagkj8uDMKiuHW8WajQN2N8cc/pfDWoQ2ObCcT+6M6U/2VA 3D/Z196uguonw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4My0m62jkZz9rxD; Wed, 26 Oct 2022 09:28:38 +0200 (CEST) From: Ihor Radchenko To: Richard Walker Cc: emacs-orgmode Subject: Re: org-datetree-insert-line and org-blank-before-new-entry In-Reply-To: References: Date: Wed, 26 Oct 2022 07:29:21 +0000 Message-ID: <87o7tzoxf2.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de 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, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666769537; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ehoSMOAh4nLrfGLhBJo4aDpi2/aF//hQ34O9mKGA3zc=; b=Y66k+xUJhidakS+DFANr7hn+K4XdwCA+YQQaEwowJnF+vA7EYIMFIp3kaX4TuRxjdb1arJ ekikl4zMascqFsxnrMDzgCMuttL4Z24amg8wdT4ilB7bBjacJqWpB01MCMSIz93+MXeMZ/ WXnRvZMZOPSZvHKXyBKPyFUnYL0uvR1qqmc3K5V1mXQfeUvotVG9tNMmpB/DSOvx534df+ n9cFX3Scmn+Yp0daibcKDXCSGq94qdqBLnbuct3cBm43pvwpjACody7859cRzJjhMHxWjM m9vZPMrvk9FAK9uqEcd70MvtZFwsOL5xKK0eUcdXuYs/josh0gy+bTG9ZOuyCg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666769537; a=rsa-sha256; cv=none; b=isuwb+dNwBZ4skOsABtWxfDy5T7uCMSp2kOEQG2lFyegppqAPNieZK3a+bc0I3VzFNhEae ruk62uWx2D46goNQFC69mLrOZFrUGafu7W9UQ/pegpLCTLbGEqKn3vtIjs2V1R3FvXLnhj Ndsi7K9JRREb3HyLAC44XY+IUAFVNhWISCjpg12pTqLsCWLSnDQ8iuMlCiaqN6cS9OyShQ eBXLSexPADZT/IZx9lyQQuIyyFeTApuNNKpJazU4q3ML1QuIywZAelX1rsP8GT4Byt1pDw 4PC8FN025KBAConATP4Rq0U3mj/BxPki8YFJKAUP7q54g8324Y2MLcnhqCwhIQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=sGC1V8A+; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Spam-Score: -1.91 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=sGC1V8A+; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Queue-Id: A90452D915 X-Spam-Score: -1.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: 5QhHh5zzBykz Richard Walker writes: > A follow-up to the changes made to org-datetree-insert-line > in September 2020. > > The definition now begins: > > (defun org-datetree-insert-line (year &optional month day text) > (delete-region (save-excursion (skip-chars-backward " \t\n") (point)) (point)) > (when (assq 'heading org-blank-before-new-entry) > (insert "\n")) > ... > > ... > (setf org-blank-before-new-entry '((heading . nil) (plain-list-item . nil))) > > Such a setting seems to be consistent with the help text of > org-blank-before-new-entry, and what org--blank-before-heading-p > expects to find. But, having made this setting, > (when (assq 'heading org-blank-before-new-entry) > (insert "\n")) > still does the insertion, since (assq 'heading org-blank-before-new-entry) > is non-nil. > > Change (assq 'heading org-blank-before-new-entry) > to (org--blank-before-heading-p) here? You are indeed right. Fixed on main now. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6bbd08f5aa81bd0b6b2b2f448a858516f388702a -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at