From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id uMChMK67RWYCxQAAqHPOHw:P1 (envelope-from ) for ; Thu, 16 May 2024 09:54:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uMChMK67RWYCxQAAqHPOHw (envelope-from ) for ; Thu, 16 May 2024 09:54:22 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kristofernelson.com header.s=MBO0001 header.b=gNqZln6Y; dmarc=none; 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-Seal: i=1; s=key1; d=yhetil.org; t=1715846062; a=rsa-sha256; cv=none; b=smTW6A3D5zXj66vuhAggq9iFlRB9Z7vd+Ez9/kn0OR/QyFa42Z4LahGtavYQjoGGn5TP3j qs9Q+uJ5X2bitg4SZ3HzrDlL22YuhoDkU3TMf7hUPpGx+OCxOXiuAGzReD4rHXydJLkofB czpMhwWHhC4nYQ6GEfeE0AmYtgjBu60wFeRFQONTd+kPROYvAMd3EYTmSiVqlhbMSgJkqk 6oS5c3At0bbzgNPHvd6fxbcZKZNCi5rkLTWFg3X5yEtQ9wedwoY3K24JhnHSOpj242jHwV J3viLQB7HtZ95b7CAw8o/2iJVzJnErRL3EtyheRmipBphBuc0jtUJXhi0ZgWUg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kristofernelson.com header.s=MBO0001 header.b=gNqZln6Y; dmarc=none; 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=1715846062; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tWuFRWOhbqdE5+glRkMVo+wtpJ+g9CY14f28IQnJXG4=; b=nfgsifqN/kDm/9aYp42roD0y4z74O8/lD/OGOCqkfGi4ZYNA7T4HYQWuGdR/nmVux8Buvu 0kb09Jc5vEkTj5XhKYF5az53BC6xcECD6ZiBYh6ccIcCVijWjj8JuJchMMiojjLhuPkEz/ eDLAp0UPf2s/9pzZCk6IZjgGQIH6tSj+IPG0+BhbhgGR7kXKMtEZwoUBR0ovTPUP8Cp5d3 +bieZYEfVXaWMP565s9wwzfzooJL2f0Vnmy2j3U74lEqZ/yJjDF0yQyLVE9FBZjvi+cvQW FAYFIk5Izm+98cuwwC8+88bdHx4LzSUjPDL6kM9qZMif4F45i+1TfkzKuw0CAA== 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 4EF6065064 for ; Thu, 16 May 2024 09:54:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7Vqi-0001Rd-1W; Thu, 16 May 2024 03:48:24 -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 1s7Vqf-0001RA-MY for emacs-orgmode@gnu.org; Thu, 16 May 2024 03:48:21 -0400 Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1s7Vqd-0003Ml-Tz for emacs-orgmode@gnu.org; Thu, 16 May 2024 03:48:21 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4Vg2JT1qySz9sQj; Thu, 16 May 2024 09:48:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kristofernelson.com; s=MBO0001; t=1715845689; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=tWuFRWOhbqdE5+glRkMVo+wtpJ+g9CY14f28IQnJXG4=; b=gNqZln6YtsM8Efno6L6BJ166dmHcDW5O6GmEJOF7Duj6TYGqEHO7Yf9hJlCzDVfU+Ai3pd 4Z2y6eKETdHqf4dIP52G8Wx9mrpr7qJWrJGdGFGQu/k6aB+TWIsfFlQh2WHu1ESKf1U8MK sHpVGI+IQLUHss0/doU78eqwrD9kvg8l0fKgTfTZ7qGgM77Ho6fHooNi925OY2W6Eh7few n4VkSsYvOwtpG1JO8fO8uWr76XXuk8wM1lehvwBTskRBjjItrUV2T8b+LGbZ9Tv6WNbKXE uONju45ejaejfv43FpDP/K6kgGNFIriCyRHGwMFRrF1X7ZzCWW3SaOit60razA== Message-ID: <084bf42e-00f6-48eb-a1ea-01a76cfc999c@KristoferNelson.com> Date: Thu, 16 May 2024 01:48:04 -0600 MIME-Version: 1.0 Subject: Re: LOGBOOK drawer now being created with blank line afterwards To: Rens Oliemans , "emacs-orgmode@gnu.org" References: <766237934.317726.1715720181047@office.mailbox.org> <87seyjsc58.fsf@rensoliemans.nl> Content-Language: en-CA From: Kris Nelson In-Reply-To: <87seyjsc58.fsf@rensoliemans.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:67c:2050:0:465::103; envelope-from=Kris@KristoferNelson.com; helo=mout-p-103.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_DNSWL_LOW=-0.7, 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 4EF6065064 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.17 X-Spam-Score: -7.17 X-TUID: f+u4XqnxFNFZ On 2024-05-15 02:38, Rens Oliemans wrote: > Thanks for reporting, it seems that this was changed in > f63ff074417315fcf93c2ca6cfe8f89fcc6d902f, "Fix subtle differences > between overlays and invisible text properties", bisected with Emacs > 29.3. Thanks, that definitely helps narrow it down! Seems to be a result of this specific patch in the org-log-beginning function: diff --git a/lisp/org.el b/lisp/org.el index 4c87011..953f2f3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10020,13 +10031,19 @@ narrowing."           (throw 'exit nil))))         ;; No drawer found.  Create one, if permitted.         (when create -         (unless (bolp) (insert "\n")) -         (let ((beg (point))) -           (insert ":" drawer ":\n:END:\n") -           (org-indent-region beg (point)) -           (org-flag-region (line-end-position -1) -                                (1- (point)) t 'outline)) -         (end-of-line -1))))) +             ;; Avoid situation when we insert drawer right before +             ;; first "*".  Otherwise, if the previous heading is +             ;; folded, we are inserting after visible newline at +             ;; the end of the fold, thus breaking the fold +             ;; continuity. +             (when (org-at-heading-p) (backward-char)) +             (org-fold-core-ignore-modifications +             (unless (bolp) (insert-and-inherit "\n")) +           (let ((beg (point))) +             (insert-and-inherit ":" drawer ":\n:END:\n") +             (org-indent-region beg (point)) +             (org-fold-region (line-end-position -1) (1- (point)) t (if (eq org-fold-core-style 'text-properties) 'drawer 'outline))))) +       (end-of-line -1))))        (t         (org-end-of-meta-data org-log-state-notes-insert-after-drawers)         (skip-chars-forward " \t\n") I switched the (when create) section back to the previous state and confirmed that when redoing my test scenario no blank line was left after the logbook. In the new code, I attempted just removing the final "\n" from (insert-and-inherit ":" drawer ":\n:END:\n") but that resulted in some weird behaviour when redoing my tests. I'll keep mucking with this to see where I get. To clarify, would this behaviour change be considered a bug? Or is this intentional as a part of that patch, and I just need to figure out how to change the behaviour for myself?