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 ms8.migadu.com with LMTPS id eP5HMnPnu2UDBAEAqHPOHw:P1 (envelope-from ) for ; Thu, 01 Feb 2024 19:48:19 +0100 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 eP5HMnPnu2UDBAEAqHPOHw (envelope-from ) for ; Thu, 01 Feb 2024 19:48:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=f5qtvvtV; dmarc=pass (policy=none) header.from=gmail.com; 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=1706813299; 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=cBWyK+nwSBShBjMcTNuqnIBTbHaup7uIEa4MYX5nvow=; b=gb2wdX8FZrrXIDflKaNaI1B3x2Kyoxh+UWJCRkhA830eZMJG7MEQLNt+htbOzohlla/lRl RWqfNn1YYk5VrV8fubb9SX1tIBCpv8/nNtXO7vDyiH2e3Rhq2M62ZZOUvJ34xSPvY2nJhN d+0YigHCqxK+D7CZhRRhRguajrPXAslPq3Wgf+e6EUBlfjylf8vMws2Foa+Y0QM1yCh/Cg Lhczhw5zSL6yD/Jn5ztMfgL8aEKPkahU0uVkDr6rwrAibaYjH/9PiEp/3ICWGhqsWx9Yz0 M+DQzZk1zlHtZ4o4lHMpfe9chZNaUK0ob6g53t486UE1sOLEYduGD+1YaLGMGg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=f5qtvvtV; dmarc=pass (policy=none) header.from=gmail.com; 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=1706813299; a=rsa-sha256; cv=none; b=K5ovE7yclJgYbSn0Trowa/k6IsM3IYkuphA7RIYMdb46j6+iYW4mT8UdP2Hf9ysUS8luMC NH0DeimBJLGIzxOlFQ6OXUw/lLdO6J8PS5gewBWGw02Bvq/koucmU7YIOoct3UpvudL+Zo r9+SPabZSBJ21Fv1qQXnCyG4yc9d1B5Awu9HNg1f3G/ye68ZMiEZj+BqNekxsyqK2msm/H kO/9OI3JU7fZHISpTM854+Gs2XVw9fceWbvpkvk+v3Sjs9cTu8TXvxdXMuMaCpltOuOWi7 NAGR/O+86yBdyVZyv/EEoYiwYq3eiPwpTgKeosLJ/hkxLtL81JoOBH7iLb6D2w== 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 904AA18431 for ; Thu, 1 Feb 2024 19:48:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVc5c-00054a-On; Thu, 01 Feb 2024 13:47:08 -0500 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 1rVc5V-00051j-91 for emacs-orgmode@gnu.org; Thu, 01 Feb 2024 13:47:02 -0500 Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVc5T-0008Mg-6W for emacs-orgmode@gnu.org; Thu, 01 Feb 2024 13:47:00 -0500 Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-dc6e0fe3195so664419276.0 for ; Thu, 01 Feb 2024 10:46:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706813215; x=1707418015; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=cBWyK+nwSBShBjMcTNuqnIBTbHaup7uIEa4MYX5nvow=; b=f5qtvvtVmH2u1RasOfAat36/xb7SsobsubDUwGvijdhjoodkK31ctCiDA6rzH2w4BB xXvvy6dUgVcIUUsMYCkSJoe61g7wuwWVZADESxSeQF8dPmBXNvnjc+tUsag0Cs/hXaWI DDsSNXqI5kQzisdyyZuHNYV/jrcPMMIMQ6WW5W+j4gMNS0B41w6hUBmVmLPgXIdgMvAi mBABSCtxLMiw7yNwEUyV8sPTiPzCRvCuaZjepy6hSGLHCG/6IDbkA5y8gg0bMK6QACw+ S+qOU0JQ0HqSYsE4XjNzgsDvinfqkOh8b6zIu92LLfBoCClIM2zT7o248hQyt73iQK9h gsEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706813215; x=1707418015; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cBWyK+nwSBShBjMcTNuqnIBTbHaup7uIEa4MYX5nvow=; b=UP4w1OLcpewyT6PeU6ha8gtrtZRITKLZIHzI0jfIpHmQ/GoR+8m/B3V9CuhwexIaDB 9kW8hwqaJie78e1hz9ujzsu7dIPxTF6rjl7QAnfXZIOaAH1ARRDp9ObciClQUyEOzduH abNdeX3J+qOA9IxNZFg38DURBVPwaY5xYwKdb7NaqwlwzmnP4ph1iJMe0/pUYJnJZXHE M0UZkm6VYw+EiGEd+vxp/gzdyDB+J5KwWEw51P3WrfyiYFnWkpiiVKiIavpiSP+0ocNz ertnodl+59tVRsNif5FO/4EYuYvSxN9FxkOJJ6TTHzAuxDAM2NOHJa3CmrpFtmLZ254J iUbg== X-Gm-Message-State: AOJu0Yzwt5hVNMM7rgIbjfGiPzwDr/nTicUjthbNtgArUtzXmvRDcpcs Z7hpSEas0bzgs2FZtqxXBdkBBUQuNFQULJvUdUZYUu3NACmz/LBVbHAhvcEPtDZn4HyY9ZTQlv5 oB68Wq2FFXV7jF5XvVy5IM5hB12h6IFf6FPOSfw== X-Google-Smtp-Source: AGHT+IGFZhjbf7gOUYT4MNO78kM1sxY3ytQWPM+9HX9RHkvdp4FTWVxoR4fhJoIWbQRwmPAXUuaafCmJpRX4If4x63M= X-Received: by 2002:a25:db12:0:b0:dc6:bd4c:b119 with SMTP id g18-20020a25db12000000b00dc6bd4cb119mr5904382ybf.55.1706813215539; Thu, 01 Feb 2024 10:46:55 -0800 (PST) MIME-Version: 1.0 From: gusbrs Date: Thu, 1 Feb 2024 15:46:44 -0300 Message-ID: Subject: [BUG] org-insert-heading changed behavior with Emacs 29.2 [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/29.2/lisp/org/)] To: org-mode list Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::b32; envelope-from=gtvbrs@gmail.com; helo=mail-yb1-xb32.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, HK_RANDOM_ENVFROM=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.47 X-Spam-Score: -8.47 X-Migadu-Queue-Id: 904AA18431 X-Migadu-Scanner: mx12.migadu.com X-TUID: yseqSlJrTp15 Hi All, I recently upgraded to Emacs 29.2 (from 29.1) and observed that `org-insert-heading-respect-content' has changed behavior with regard to how it handles blank lines at the end of the entry at which the command was called. Consider the following document (with "|" representing point): #+begin_src org ,* Sec1 ,** |SubSec1 text ,** SubSec2 text #+end_src Calling `org-insert-heading-respect-content' ("C-RET") with Org version 9.6.6 (built-in Emacs 29.1) would result in: #+begin_src org ,* Sec1 ,** SubSec1 text ,** | ,** SubSec2 text #+end_src Now, with Org version 9.6.15 (built-in Emacs 29.2), it results in: #+begin_src org ,* Sec1 ,** SubSec1 text ,** | ,** SubSec2 text #+end_src Note the missing blank line between the inserted heading and SubSec2. That is an unfortunate change of behavior since those who like to keep some breathing space at the end of entries now have to deal with it manually after the heading is inserted. So the handy "C-RET" becomes something like "C-RET RET C-b SPC". Plus the cost of having to think about it, and that of occasionally forgetting it, consistency is just harder to maintain. As far as I can tell, the commit which introduced this change of behavior was https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=52bc95676. It was introduced to deal with a real issue which had been reported: to avoid the possibility of those blank lines being shown folded after insertion in some cases (link on the commit). However, as far as I understand, the issue the commit tried to fix was one of visibility of the buffer. The actual contents were expected, correct. But to fix the visibility issue, the behavior of `org-insert-heading' with regard to the actual contents was changed: to avoid the blank lines being shown folded the blank lines were actually removed. So I'd like to suggest / propose that previous behavior of `org-insert-heading' with respect to blank lines be somehow restored and that the problem of the blank lines being shown folded be treated as one of visibility / folding, not one of buffer contents. Best regards, gusbrs. Emacs : GNU Emacs 29.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-01-18 Package: Org mode version 9.6.15 (release_9.6.15 @ /usr/local/share/emacs/29.2/lisp/org/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-persist-directory "/tmp/org-persist-St7aom" org-fold-core-isearch-open-function 'org-fold--isearch-reveal org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-metaup-hook '(org-babel-load-in-session-maybe) )