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 ms0.migadu.com with LMTPS id KHj6DwbLLmF5zQAAgWs5BA (envelope-from ) for ; Wed, 01 Sep 2021 02:36:22 +0200 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 ENuaCwbLLmEWXQAA1q6Kng (envelope-from ) for ; Wed, 01 Sep 2021 00:36:22 +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 6343952BB for ; Wed, 1 Sep 2021 02:36:21 +0200 (CEST) Received: from localhost ([::1]:33014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLEEk-0007gP-F9 for larch@yhetil.org; Tue, 31 Aug 2021 20:36:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLEE1-0007gH-G4 for emacs-orgmode@gnu.org; Tue, 31 Aug 2021 20:35:33 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:42685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLEDz-0003OS-Tr for emacs-orgmode@gnu.org; Tue, 31 Aug 2021 20:35:33 -0400 Received: by mail-ed1-x52a.google.com with SMTP id z19so1178187edi.9 for ; Tue, 31 Aug 2021 17:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7NAQUaMvw9Ul6cAoL+R/8B3mZb0UMihjvtcahg82QMU=; b=YeRePDtiVh6TPuWPGlvaSw0V1a8H9gDD18ql2vGqjG5QO/IzM/xzU9yiLNvgEDh4UC nY5CtpYNNOGxo+zTLeRzmM7VetxP8RCFznlHt0n1p93LJuU3bhb9AdTDHYk30QhS5pQO DluCqwh8Oy1mjH2Ql+O9h6LBlbNv2AcHZGRqJTOLGf68+k7O5qazgdptn56sqCijAAnl /RRdBMPCFNoVv8tTVf8aOc58NUKY74REJQSyVIzhiiJmDykLqGEQSknxccGykX4K/x+B ltZEkRuW1JPUXvovkuJ8KhvAF5a5tSVFw3jEax2pazGUkZUoJzmtI7bEjo6aTIW0e5da K48Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7NAQUaMvw9Ul6cAoL+R/8B3mZb0UMihjvtcahg82QMU=; b=BAN2Wb5q3j9CtZanarC1HwDi2bQ0Jd5mu3bsR2Zvp3iSd1qq8hUP2VQy2V1ijjT6UP 8OxZ+CT+AgshyRdYpoSsZE7vTyc0EBbt7kkCO4PDMk8H95rk8Fbg/nxkEjoS5scdJKTg t+3punAe3iLHNIPsLIS4nObklfRXqeeFoVVpUL+ZzD9h/TgXzbO6Yzc/oAfh07dIUZcD fkV9Yq7VzRc0EzrC9p01lwA7sG1CAmw6+JMojWHNnRNJ3e7P+dtuvRlEz+Lca9je/xa7 zgenHdWnXpnAKVPMJKxt54MdGHcqDKB5imjTPy+tXGKv90sU3XkKxOh+M/XdFqKs1FEX y/xQ== X-Gm-Message-State: AOAM530uQfcz597MNd9W34bKPungVdeAuquj9wcbi/dibL2l4JXVXPtQ l6WQcejRB4+mKg+OWQKRB0lYYh/7badzL9YAUyMrvfYEn8sqpw== X-Google-Smtp-Source: ABdhPJykgj4/Z7UuZbUwV4u906BMKpckveIy8S+ihHOi4m7v+ThGVCU6/hhkXUs2DP8tzHLbMhEce56OmphUfPU+oVE= X-Received: by 2002:aa7:db82:: with SMTP id u2mr33318116edt.299.1630456528809; Tue, 31 Aug 2021 17:35:28 -0700 (PDT) MIME-Version: 1.0 From: Richard Walker Date: Wed, 1 Sep 2021 10:35:17 +1000 Message-ID: Subject: org-datetree-insert-line and org-blank-before-new-entry To: emacs-orgmode Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=walkerrichardj@gmail.com; helo=mail-ed1-x52a.google.com 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630456581; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=7NAQUaMvw9Ul6cAoL+R/8B3mZb0UMihjvtcahg82QMU=; b=J0jfwYo0CLn1Qg5iUVI6RLEWgVkCxlXiNBVh0XIJ2vPgYXFF4Ydu2tFIFKUrGJFrjdlIMe BMY/G11HdldgPj0NnvqvbH8juL/axvk2AS06KqdMnnBNclmCx1LVarsgwZvfQyGaagi+R3 I2Eq8ituAMGt/dydEUVidmLpe0UXBuo9MrMuQ5dELUQz7HtsMdU/39tRRmt3X/r4rKVwPJ XsxRS0IW8wzVTqtNW+DQ22ZvxNdXe+DQEBHj6WpxObmn5jbvtzjwOUxrGviI51JxweHMn4 VZOO0Hj7yiWuu1gomkmfghynWkLCYpGr42oftMww+JIZsqrDW51YuUITvjojcA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630456581; a=rsa-sha256; cv=none; b=LE+We7GDlFhztBw/NZZDFzFgzmiLOqSu/+W+MH+7SyDjeX36E+84XEAy5XhFM57BOav8rN 9PRnLBOOfj1+Nd9QeOAJSpNse2ncbgGl6LskLhQoqgOQkWSIG3JdUQSFo/heQ+kUwpXrBJ W+3HEZHRHUaO/PYHqN5H/ubSBdvp4myrr5CRMD870cw0uDUBh+JIP4bM450J8yRYIUSQzy S+CKaX4i1/SJ8WWwnDX7Cl+AC14UXoRUiI7/T2caLLm+qzojaTNRIPucrh6L9wM7yGOXyZ rdzq+FfJFNwzUYL/Q2sbi+CyQ/A+G1LXrit9vlVtXWQooZHOXJRlYwqufv+zOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YeRePDti; 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-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YeRePDti; 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-Migadu-Queue-Id: 6343952BB X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: R3Lmv3/gDeeK 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")) ... I'm getting blank lines inserted before new entries, and I found a couple of sources of advice for setting org-blank-before-new-entry ( https://emacs.stackexchange.com/questions/51117/org-mode-control-whether-m-ret-inserts-a-newline-or-not-for-plain-lists and https://stackoverflow.com/questions/28351465/emacs-orgmode-do-not-insert-line-between-headers ) that say to do this: (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?