Received: (at submit) by debbugs.gnu.org; 1 Dec 2025 12:14:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 01 07:14:46 2025
Received: from localhost ([127.0.0.1]:47597 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vQ2nl-0002uL-HE
for submit <at> debbugs.gnu.org; Mon, 01 Dec 2025 07:14:46 -0500
Received: from lists.gnu.org ([2001:470:142::17]:35464)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <ignaciocasso@HIDDEN>)
id 1vQ2ng-0002u1-Sc
for submit <at> debbugs.gnu.org; Mon, 01 Dec 2025 07:14:43 -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 <ignaciocasso@HIDDEN>)
id 1vQ2nb-0000XZ-F4
for bug-gnu-emacs@HIDDEN; Mon, 01 Dec 2025 07:14:35 -0500
Received: from mail-norwayeastazolkn190120002.outbound.protection.outlook.com
([2a01:111:f403:d20f::2] helo=OLAP279CU001.outbound.protection.outlook.com)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <ignaciocasso@HIDDEN>)
id 1vQ2nX-0005zW-NR
for bug-gnu-emacs@HIDDEN; Mon, 01 Dec 2025 07:14:35 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=TqLXj6vzDFwjI3fjDcw5R1hJfK6kd6Md3vzBRxICJUBBfttQrZ38FY1+VAQVACupodHJP33fUUwDUnDnCTuwfOy3KZufMCt92CLk/S8C7remq6fcSZ7zz7WggDmTiTmK+MEJW0QunO90nKOFDWego4Cx9+CpPE7WiTO3AKDvpwcDXwEwoMN9QEekQPP/uARtzQbI4pb3TTiogNjRoF2SkasErp1zAHSXuD1gMIqBPf+frnmb3A+YC5xyHBOmXUwvT11pLJXVnuaUtoUEtO1r7mVtPbLnYTPEYIoAekmDJe7a6xFLlA5dLyzLFsT2tiRlteuh0N0WlMC0WdbACQv4ew==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=pd/6+eAPV5h6BoAMOU37FdWY8nE52p9KEqrTQrNm1Ew=;
b=zAW8bfxuaqVrOjBwpsnsYANzDfQ2dWRbUjdDPQgQdZ4Y32ulxqfrfA4/UXQtdxOTVppRpYXxnBzSRVc2GhhEtc3ebDYsIRVmW7QxNtulaM8dFE15T3hsDS68Cyl/q7S1K1qwKVrTxJgDUrI+zYvrEBX4t1bfqjscEl2EeLuK3eTg8aO7l4NPxmXQby7vdGT6M1Uv8TD33yBhdsfm4AydFfYOV4j3hE3Nbdb3OzSUic13nAItywCKLXV/5dn1WYqKPsX8OaQ+xJsi+XW/DWNiTnvTseync4f9Ng74isQ2gP2Zro5U6owL2XgALMbdClBK/Fz9lbPuSHx94BRjlBgFBQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=pd/6+eAPV5h6BoAMOU37FdWY8nE52p9KEqrTQrNm1Ew=;
b=cFz6OYz+BdYAYCKpWtpjWaWWVzSjCtma8sERmFr5bH5Go1KLWOJT4hQNpTwauq4RZtMhe+29KD/4dm9kr+p006NM2C9QiBaqv5VbT57kC8eoWI0+3AE4h3Bn2rpaYK0dW7Z5xccEH1/BJuVSBpkSIcraNIk/FOCH9M8Vdvm3a78aZVWuadkLB0xQR92mFrXeN8W/zqNF+iJve/n6wkontB6RX7qgzxUsHP9VfGB3EonWUeJW4TFh66+g7nSTyHQUhgeJ/5KKwZNzU+tZVeObi+zkDzps6ri1i/jVgIBgZ4sUXbX5M58jlx2EKun4esxfAOiGmcOqnQhTcSDYV8BVNw==
Received: from SV0P279MB0442.NORP279.PROD.OUTLOOK.COM (2603:10a6:f10:19::11)
by SVAP279MB0029.NORP279.PROD.OUTLOOK.COM (2603:10a6:f10:7::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9366.17; Mon, 1 Dec
2025 12:14:27 +0000
Received: from SV0P279MB0442.NORP279.PROD.OUTLOOK.COM
([fe80::e7dc:921d:1322:a269]) by SV0P279MB0442.NORP279.PROD.OUTLOOK.COM
([fe80::e7dc:921d:1322:a269%7]) with mapi id 15.20.9366.012; Mon, 1 Dec 2025
12:14:27 +0000
From: =?iso-8859-1?Q?Ignacio_Casso_San_Rom=E1n?= <ignaciocasso@HIDDEN>
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
Subject: 29.1; Unexpected buffer point movement on redisplay
Thread-Topic: 29.1; Unexpected buffer point movement on redisplay
Thread-Index: AQHcYrs/ZfHPjlDt8Uazhj06KM3jFg==
Date: Mon, 1 Dec 2025 12:14:27 +0000
Message-ID: <SV0P279MB0442DC9C8ABA3A6C08D8E85EC6DBA@HIDDEN>
Accept-Language: es-ES, en-US
Content-Language: es-ES
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: SV0P279MB0442:EE_|SVAP279MB0029:EE_
x-ms-office365-filtering-correlation-id: 28b69d20-7596-4321-4e69-08de30d32c51
x-ms-exchange-slblob-mailprops: Vs63Iqe4sQkBP5bXNS6lZgUHop5/RlQyYTR6De/d8GlY+z2STU0dBNfcI6UD3OVPGem+n3PnDxvbgPugEzbJ/1HvlZ04Cwfy13WguElj/xiaMGXO6gQXk8rPwx67fuGxl2n7CZG3w5r0P/pNP/9HDRWUsymAUfkGk3WLimqb/fBdf+Zr+qB6fVrXLMCUiM7YNL4WWiExil+S6ILIbO/tw4aTRZl3yoNDQa9EiBmW9L1s31r5EFW4KCXHJ+ZY9LYXSA7SylDwKMkps+crdQjgoRk47x4htaOWYMeK/L7crBRRw+7C6/xiHrNfroX6pRJ1WpKAGMheO5C/fAJ+RlqrKoQZGQdFXFmelri7J7EfutWMwd+insKvL1Z9cA147k59xxTZohujLTT67z5GqDxXoHQqUXPxNcdJIlYlevd0+w2mhgrWMT44ptzWA9M414431xkhr8/X6J3aaHQyjNobX5DuF82eLodevaNNWIoEo7PvsOhyA60YfCsee/L7oT/UsG48cG5uAeSAxA6pKozNFk9HGk6h4tjQhRXoDtHb2wOX42ENxiO/nSCafdbJMIsZgtFKIS6B/JrplctzWZdIl7fmhuPnKGaGt/lOE3SN/b7V6rOf5+FhmAPnXXSxGSfA6ncKsa/PtnzRTNhZoU9aTe3X75k5PJE0kcvdGlN1d1qN915sViVRQ6aK0e7Dv9ljIDp6alOMNyiYaxZKwjoVuZphvqeWahMIbcE4hzeoScE=
x-microsoft-antispam: BCL:0;
ARA:14566002|12121999013|8060799015|41001999006|461199028|15030799006|15080799012|8062599012|19110799012|31061999003|39105399006|56899033|40105399003|440099028|3412199025|102099032;
x-microsoft-antispam-message-info: =?iso-8859-1?Q?ODqxVuS0piButJfSdBtLFtAsK3WctZbwZRCRLKaFZwRWUgEZWKBrvL8+88?=
=?iso-8859-1?Q?JCVvi20m2Ri4J/tuRL3xHKaa/1Aa/zFeoMo/rkCpkxAAZrJxky/O4yHvb7?=
=?iso-8859-1?Q?Bdkba4qIPqK++aXFJFD0vLUYD4VkARyg/SGVKFrphP5jFlRgBTTtWKB12G?=
=?iso-8859-1?Q?S143TOFAaEIBik6qnsr4K6GoKgavU7iHKF3wdJk2kQnomIgtE0+hT2JQVU?=
=?iso-8859-1?Q?z85CYjbBeXzFRFc8Ghb0PIGnZxhoUkbz5WjRMa7wXpRKKboXCA6uWiyEf9?=
=?iso-8859-1?Q?Wf5vhfgHgHIAOVYsRcosxNvHgjs3Ui2xHpfx9HD7PhhaUJ2dnHnR0KP12H?=
=?iso-8859-1?Q?hCbsSOWTjCpk4DjArcTT3mMmvq/dh38W8PDRcRSkBy2hs6gtuIXB9b+F2v?=
=?iso-8859-1?Q?JzhQpSRioiMVrrEjUKKJ8b8IiGhHms3KP2/x7MMm6+hFEL+tfRJi3+mQPK?=
=?iso-8859-1?Q?eY2MbjMFDaW1DkvafD3tC2+pHJ+ipqDKtGajeQIvJgsk1Gq9AW5pXkhA5g?=
=?iso-8859-1?Q?+oQu7aLk30WvJ0CrEGVDBposuBGGTcfOhs5+WTDjl39IURnemXtXecWMdl?=
=?iso-8859-1?Q?tEwZdyg179+02XAcGUzAqh64izmpCkTbz/7c0KUFboAdqsFMi/o3WCmlx9?=
=?iso-8859-1?Q?8+rktebVuiYuH9i+KyVgrOzE6M7MBsVAP1AW8c/vk9rck6xG6j2ZpZZ9sM?=
=?iso-8859-1?Q?z15TRMUqW6RdyNkbSwuKvlYiWwzYL+NkFy4ZtZn4sBjvZAG35fHZBWYa1y?=
=?iso-8859-1?Q?ZlZJsKYWi4n46oL7QT3Nb9OpDVrKfhO+mlU/2lDhYWF8kmwQ1eVqo1PF7L?=
=?iso-8859-1?Q?kukn1pTvrCtl9IyubAY+doOjuGS9RAyr4Gc6IGONWG7gD8Ww5erP3GMIla?=
=?iso-8859-1?Q?Ba2q3DZcRLbsZof4P3fQQc5bYi0mq1BS8qEaeTRjQ8r1YLtoEUKeNBUKDQ?=
=?iso-8859-1?Q?2yrION7E01lFdMFQ4hOAoIFUSPGKmuv+IeyqffICnzu4k5SHf/gLqf1PCE?=
=?iso-8859-1?Q?OL3+bPCHqdCywxrSLbwZxCLfx4hihqgrNNH3Zk/wt6C785Mqnsnit9DNSA?=
=?iso-8859-1?Q?5Aqz1pboXFv3ev3WIjIQDmrudz26cPT4kY5U7e8c155k2092aAHVGF3V8M?=
=?iso-8859-1?Q?5EXyvd5vrq7icSxnPbpm0f8bhsmoVusFEX0xefUtSIvPkCag4ZJSCwCnGS?=
=?iso-8859-1?Q?IFzo5BcvJAhNhhSK4hkpeAq1JmvyEfBcAg9XkOENHArhL+Rw6Xqcn4+5yh?=
=?iso-8859-1?Q?6eJQBQu/AHBl+9uP+6MplotdmCcbcLWobOngJR0VLyJuIKpvYOns7nfzyf?=
=?iso-8859-1?Q?xd1cEL9P101n0AHYRcwjxAgrbQ=3D=3D?=
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?wJPCnYBC9tcN269TXj6KL2V0Gi7Pjv7ztzJZuuwsXc1KfYIHlheMIjWYB5?=
=?iso-8859-1?Q?f+8oGLfdQuE5ixfZDXtgf6Cm2G5yAq87cGmFwgkN+fzKNjY2U+SX3VvFbA?=
=?iso-8859-1?Q?7+YqIc7INe0ed9PA+3MWfFYa1Y0GVf7zCtF59GPNZD55AxxsrviezuIAao?=
=?iso-8859-1?Q?0lQFjW403lOvNvf1MFQLQz2R3qEqVSAnb6c7Bji1YR/RHR1DQLZwXyntDY?=
=?iso-8859-1?Q?3NhiMzwyz7vg5yQlCIRs3V7SGLFupCy9bH1dtrK0dmB5sCVhGmMWQ8fYgX?=
=?iso-8859-1?Q?6PRW6hWmWJk72wwJuP48TXdCzYkcgZlKC5bw+ESVYHzXwNU16/QTUoehu1?=
=?iso-8859-1?Q?pwwS93Kg3kS68VF8nSR/FcgkKMK4/pe3cPnr7zX3RrDtfX1cplVUfBVvcb?=
=?iso-8859-1?Q?uU+qfsY32/eRlrtxBCKhjqbFY4dud76fbH2V4e457fRD9IsKSOk3jw+G2g?=
=?iso-8859-1?Q?F4PRWHD41/unGI78mO1PdgogVIVQELdlkUwjp75crgfIjsQ+7TJAOOZw1z?=
=?iso-8859-1?Q?Bg9n8Sn/C0V5euIbrWVD0FusOJw743YhsAFPcBm7/vpVyHfqdiMsstJE1V?=
=?iso-8859-1?Q?+TSXkOcKZEaGJDfmSLyUB6ERbnNFMr3fCnYnYw0PuCtfD/OPLZrRFE11XT?=
=?iso-8859-1?Q?s5RhB5+0qg9UWemWonHCE6VN0iQyEs4Wc89Tf9Oh8iE6O8J5ACVpB9f09N?=
=?iso-8859-1?Q?22EQ4iIg0hlKvbBfjOcVb8FnzSrJK7XzEV/19+kKgRGaqaP+ksEB8EfH5Z?=
=?iso-8859-1?Q?oARXg++RzvnCz7rFef+fXWY8AwCyV1bRoIl48GDmRRw8NPuqJYFpU1eRzH?=
=?iso-8859-1?Q?PI/9xAsULCGniy5Y8jQdIW9iXqt2auUwVCukJFd8W1ubPROT+HSwcaIMxu?=
=?iso-8859-1?Q?YTfEWo+9NkuB9sCUEz46Co+xmeLWddNRoRDKKM3xRH6eYMo4/YMemvUF93?=
=?iso-8859-1?Q?zebdvbuoWNkCJnqmvM3KyV4QBcwLQX0k0+xYB0c2vmHLoz+S/lQTEF9m+3?=
=?iso-8859-1?Q?WqQdlzctUMKlVXJg/tvzutVQOf8WWR07zb9u9G9sgOWa0JS19nl9JWX94H?=
=?iso-8859-1?Q?bC0j/BPcdQHx5ttt92XJRL751+jIAyG/OqKKaQvZr/70/S31kbWW4Oh4PF?=
=?iso-8859-1?Q?MqLNox/TIVDOU8YuvH7KuJvoGcBYgmtzPnKiejvnMZzIY1kfbcgtKBeE89?=
=?iso-8859-1?Q?h+dy6zq2EHkIcOYFhapT94R2E2TGgv/wXq+7bgkgET6mWW2u9szgAdBJzN?=
=?iso-8859-1?Q?fdlF2uZEYkBVoKohrmw+gQjEfOLgQBoxw6ix+BYV8=3D?=
Content-Type: multipart/alternative;
boundary="_000_SV0P279MB0442DC9C8ABA3A6C08D8E85EC6DBASV0P279MB0442NORP_"
MIME-Version: 1.0
X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-9812d.templateTenant
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SV0P279MB0442.NORP279.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: 28b69d20-7596-4321-4e69-08de30d32c51
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2025 12:14:27.2923 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SVAP279MB0029
Received-SPF: pass client-ip=2a01:111:f403:d20f::2;
envelope-from=ignaciocasso@HIDDEN;
helo=OLAP279CU001.outbound.protection.outlook.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,
HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)
--_000_SV0P279MB0442DC9C8ABA3A6C08D8E85EC6DBASV0P279MB0442NORP_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all!
I wanted to write a command which could modify an Org entry from the
corresponding agenda item, and for that I tried to use
`(org-with-point-at (org-get-at-bol 'org-hd-marker) <my-code>)`, which
in theory executes some code with the buffer and point temporarily
changed to those corresponding to that Org entry. But I started
noticing that sometimes it did not work and it tried to edit instead
the entry that was originally at point in the Org buffer. After some
debugging I confirmed that this happened if and only if the original
Org buffer was in a non-selected window (e.g., if the agenda had been
invoked from that buffer).
After some debugging investigation I identified the issue, and have
minimum reproduction steps for it, with emacs -Q, and no longer
coupled with Org mode
1) Set this local hook in some buffer
```
(defun my-dummy-hook ()
(message "Hook called"))
(setq-local window-configuration-change-hook '(my-dummy-hook))
```
In my case this hook was being set by flycheck-mode, which is enabled
by default in most buffers with `global-flycheck-mode`
2) Run this in some non-empty buffer A with point somewhere in the
buffer that is not the beginning
```
(setq my-buffer (current-buffer))
(setq my-marker (point-marker))
(beginning-of-buffer)
```
3) Split the frame in two windows, leave buffer A in one, and
select the other, showing a different buffer B
4) Run in that other window
```
(with-current-buffer my-buffer
(goto-char my-marker)
(minibuffer-with-setup-hook
(lambda ()
(enlarge-window 5))
(read-string "Please select enter/return key"))
(message "Point: %s. Original marker: %s" (point) my-marker))
```
The first two lines are more or less equivalent to
`org-with-point-at`, and the others emulate a completing-read with one
of the modern packages which will most likely change the size of the
minibuffer. If you read the message output by that expression, you can
see that the point is 1, corresponding to `beginning-of-buffer`, and
not the one corresponding to the marker that was saved. This won't
happen if the target buffer is not visible, or if it's in the selected
window.
The problem is that as the documentation of
`window-configuration-change-hook` says, "Functions specified
buffer-locally are called for each window showing the corresponding
buffer if at least one window on that frame has been added, deleted or
changed its buffer or its total or body size since the last redisplay.
Each call is performed with the window showing the buffer temporarily
selected."
And when a window is selected, the buffer point is reset to the value
of that window point
So if this hook is set locally and the window size is modified (which
usually happens with most minibuffer completion packages, in which the
minibuffer area grows and steals screen from the other buffers, to
later give it back), the window is selected again temporarily, and
the buffer and window points are re-synced
For me this is a bug overall, even if each individual pice might make
sense on its own. I guess there is a reason for the hook to work that
way, so the bug is probably not there. Minibuffer completion changing
the size of other windows is also completely legit. Any buffer having
that hook set locally should be valid too. And a user should be able
to use `with-current-buffer` + `goto-char` + `completing-read` without
having to worry about something like this.
So what do you think, is this a bug, or a limitation? And where should
it be fixed if it's the former, or documented if it's the later? I can
think of three possible solutions IMO, none of which is ideal:
- Every function that tries to execute arbitrary code at some
particular buffer and point should take this possibility into
account and protect against it, i.e., this should be fixed in
org-mode for my case. A solution that works and doesn't have any
undesired side-effect as far as I know is to clone the buffer
instead with `clone-indirect-buffer`, and work in the clone
- Every minibuffer completion package or any other function that
modifies the size of other windows should take this into account and
restore the point if it has changed
- Emacs core itself redisplay logic should be revisited to take this
into account and try to detect this situation when running the hook
Please let me know what you think. I can submit patches or update the
documentation for whatever solution we decide (although if it involves
touching C code, it's probably better that someone else does)
Best regards!
P.D: There is something that I haven't still quite figured out because
sometimes the issue happens even if the window size hasn't been
apparently changed. For example, I tried to check whether using
`debug-on-entry` could cause the the same issue, as it creates and
deletes a window which might make the window change. It turns out the
debug window only steals screen from the selected window, so the
non-selected window doesn't change apparently, but still that's enough
to cause the issue too. Also, at some point I created a function to
reproduce the issue, which didn't touch the minibuffer and did
(redisplay t) instead. If the function was copied in the other window
and evaluated with C-x C-e (eval-last-sexp), the issue was not
reproduced, but if it was run through M-: (eval-expression), it was
reproduced. Anyway, changing the minibuffer size consistenly
reproduces the issue, so that's what I used to report the bug, but
leaving this information here in case it's useful for someone
-------------------------------------------------------
In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
cairo version 1.18.0) of 2025-10-14 built on
ignacio-ThinkPad-P14s-Gen-2i
Repository revision: a9b28224af0f73d1fe0f422e9b318c5b91af889b
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Ubuntu 24.04.3 LTS
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM
GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=3Dibus
locale-coding-system: utf-8-unix
--_000_SV0P279MB0442DC9C8ABA3A6C08D8E85EC6DBASV0P279MB0442NORP_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi all!</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
I wanted to write a command which could modify an Org entry from the</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
corresponding agenda item, and for that I tried to use</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
`(org-with-point-at (org-get-at-bol 'org-hd-marker) <my-code>)`, whic=
h</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
in theory executes some code with the buffer and point temporarily</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
changed to those corresponding to that Org entry. But I started</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
noticing that sometimes it did not work and it tried to edit instead</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
the entry that was originally at point in the Org buffer. After some</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
debugging I confirmed that this happened if and only if the original</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Org buffer was in a non-selected window (e.g., if the agenda had been</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
invoked from that buffer).</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
After some debugging investigation I identified the issue, and have</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
minimum reproduction steps for it, with emacs -Q, and no longer</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
coupled with Org mode</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
1) Set this local hook in some buffer</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
```</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(defun my-dummy-hook ()</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(message "Hook called"))</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(setq-local window-configuration-change-hook '(my-dummy-hook))</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
```</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
In my case this hook was being set by flycheck-mode, which is enabled</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
by default in most buffers with `global-flycheck-mode`</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
2) Run this in some non-empty buffer A with point somewhere in the</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
buffer that is not the beginning</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
```</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(setq my-buffer (current-buffer))</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(setq my-marker (point-marker))</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(beginning-of-buffer)</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
```</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
3) Split the frame in two windows, leave buffer A in one, and</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
select the other, showing a different buffer B</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
4) Run in that other window</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
```</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(with-current-buffer my-buffer</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(goto-char my-marker)</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(minibuffer-with-setup-hook</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(lambda ()</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(enlarge-window 5))</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(read-string "Please select enter/return key"))</di=
v>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(message "Point: %s. Original marker: %s" (point) my-marke=
r))</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
```</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
The first two lines are more or less equivalent to</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
`org-with-point-at`, and the others emulate a completing-read with one</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
of the modern packages which will most likely change the size of the</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
minibuffer. If you read the message output by that expression, you can</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
see that the point is 1, corresponding to `beginning-of-buffer`, and</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
not the one corresponding to the marker that was saved. This won't</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
happen if the target buffer is not visible, or if it's in the selected</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
window.</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
The problem is that as the documentation of</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
`window-configuration-change-hook` says, "Functions specified</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
buffer-locally are called for each window showing the corresponding</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
buffer if at least one window on that frame has been added, deleted or</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
changed its buffer or its total or body size since the last redisplay.</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Each call is performed with the window showing the buffer temporarily</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
selected."</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
And when a window is selected, the buffer point is reset to the value</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
of that window point</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
So if this hook is set locally and the window size is modified (which</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
usually happens with most minibuffer completion packages, in which the</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
minibuffer area grows and steals screen from the other buffers, to</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
later give it back), the window is selected again temporarily, and</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
the buffer and window points are re-synced</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
For me this is a bug overall, even if each individual pice might make</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
sense on its own. I guess there is a reason for the hook to work that</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
way, so the bug is probably not there. Minibuffer completion changing</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
the size of other windows is also completely legit. Any buffer having</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
that hook set locally should be valid too. And a user should be able</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
to use `with-current-buffer` + `goto-char` + `completing-read` without</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
having to worry about something like this.</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
So what do you think, is this a bug, or a limitation? And where should</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
it be fixed if it's the former, or documented if it's the later? I can</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
think of three possible solutions IMO, none of which is ideal:</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
- Every function that tries to execute arbitrary code at some</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
particular buffer and point should take this possibility into</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
account and protect against it, i.e., this should be fixed in</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
org-mode for my case. A solution that works and doesn't have any</di=
v>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
undesired side-effect as far as I know is to clone the buffer</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
instead with `clone-indirect-buffer`, and work in the clone</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
- Every minibuffer completion package or any other function that</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
modifies the size of other windows should take this into account and=
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
restore the point if it has changed</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
- Emacs core itself redisplay logic should be revisited to take this</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
into account and try to detect this situation when running the hook<=
/div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Please let me know what you think. I can submit patches or update the</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
documentation for whatever solution we decide (although if it involves</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
touching C code, it's probably better that someone else does)</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Best regards!</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
P.D: There is something that I haven't still quite figured out because</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
sometimes the issue happens even if the window size hasn't been</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
apparently changed. For example, I tried to check whether using</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
`debug-on-entry` could cause the the same issue, as it creates and</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
deletes a window which might make the window change. It turns out the</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
debug window only steals screen from the selected window, so the</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
non-selected window doesn't change apparently, but still that's enough</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
to cause the issue too. Also, at some point I created a function to</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
reproduce the issue, which didn't touch the minibuffer and did</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
(redisplay t) instead. If the function was copied in the other window</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
and evaluated with C-x C-e (eval-last-sexp), the issue was not</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
reproduced, but if it was run through M-: (eval-expression), it was</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
reproduced. Anyway, changing the minibuffer size consistenly</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
reproduces the issue, so that's what I used to report the bug, but</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
leaving this information here in case it's useful for someone</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
-------------------------------------------------------</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
cairo version 1.18.0) of 2025-10-14 built on</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
ignacio-ThinkPad-P14s-Gen-2i</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Repository revision: a9b28224af0f73d1fe0f422e9b318c5b91af889b</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Repository branch: HEAD</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011<=
/div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
System Description: Ubuntu 24.04.3 LTS</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Configured features:</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND</d=
iv>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM</div=
>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
GTK3 ZLIB</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Important settings:</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
value of $LANG: en_US.UTF-8</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
value of $XMODIFIERS: @im=3Dibus</div>
<div class=3D"elementToProof"><span style=3D"font-family: "Calibri&quo=
t;, "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0)=
;"> locale-coding-system: utf-8-unix</span><br>
</div>
</body>
</html>
--_000_SV0P279MB0442DC9C8ABA3A6C08D8E85EC6DBASV0P279MB0442NORP_--
Ignacio Casso San Román <ignaciocasso@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#79927; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.