From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id IBnVGX6CgmfdngAAe85BDQ:P1 (envelope-from ) for ; Sat, 11 Jan 2025 14:38:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id IBnVGX6CgmfdngAAe85BDQ (envelope-from ) for ; Sat, 11 Jan 2025 15:38:54 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cTUQPQBM; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736606334; 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=4TMpBfSxJ6PRRSCQMso13sMuFgTpe6EgauI7kM65rwI=; b=cEy3QkKuslXnEoN/nLT9cJ8B44DYP/Mq+Y4+SNOQ9i3LjSuP2t8n4aB1+4drVjpi7bvdv0 Vi58LKdGhcRDlRDpkGpR0nvwRyTPIkNhH+oaIL7Yjs4GEb4Eg1vmrPTvAbCJJe3X9937y9 e8Q2bGRE49fXpCEom46knFRAl9GhV7rmkYDaEtgg7p7KgjiiDLz6lAll/uZgmfysczrcO8 O5b3QXIyPbkD5dUyKR21fGCGvqwGPlADMNLLN7UO457aF4d9isVMNYBe8jpx3x8nG1PE+B mk1BWPNfCT+bahFK/nmV7HJggtFwio4is2OVpg+F2qrqLFN4GTbgddZ51o0q+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cTUQPQBM; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736606334; a=rsa-sha256; cv=none; b=QF4VF5zeJwWH+Yk6YzpCAB+Cx8Y4tIsVsh7d1nISykkZYaxPzAOn70S1jGEv04z0zqH48T uwAzGSrCxH0Cnd6KQdyWjHQSpAEb8IzStg4f2cUCCMw62g6YwB4vJrs4mC1ZAV6W+IDeQe nmE5o/a1IgD0lYF/5EiZFK2x/S9G+HHfkebbf/X7KDcRnnwmlNATvJaEuwK622LW5fCdqa fysIOdY7T87O5Yrs8VnAlZucvbJItq74FQ3cHBbl/p/lUE6cPZBgmpMkzpcCzOUVq3u1ZS l2kPuDuvLCJgvT7LtsrRdum0AiNyZttCuQ67Cq37OVNtdlkWGyEU/7nRIBokbA== 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 EAD1BA33FA for ; Sat, 11 Jan 2025 15:38:53 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tWccX-0004Xa-Gk; Sat, 11 Jan 2025 09:37:49 -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 1tWccU-0004XE-TN for emacs-orgmode@gnu.org; Sat, 11 Jan 2025 09:37:47 -0500 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 1tWccS-0005dw-P2 for emacs-orgmode@gnu.org; Sat, 11 Jan 2025 09:37:46 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 77C86240101 for ; Sat, 11 Jan 2025 15:37:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1736606260; bh=9SsGtvWfzWwKI268MeaeFaMTfJ0+0BXJD7aQt6qxi54=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=cTUQPQBMKzXufhmRiCuNGP5gopzIZqhE5IyeUqQn1ks+CM7HKqPamdQy2fKafu+FT ymAp0CcXJlKBD10LIoJ9radIizjnDiAHLFxuRwnSgnaNjIT8XYurlJIMH5bVttJY8i muY4XDMBtlH8E/S0vX8tRWiYJi4kVW5AAhHApffTYzxxhDvlkw/v3lJf34ArrY6UNk twi17pITgc4U1Cg9unDOHAiPs2Uy2QfGbyRaNew9SQBHU47rxq5pRiTvVPPC+rc3Nu n2W0ZO0PD5gt6LGFrT8OxC5o4XhYqZPzdPgexo6Fu8mk9g0k3fz2luE9NwMAabDb8D LjMO4WRLoJjBg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YVh2C5cBFz9rxK; Sat, 11 Jan 2025 15:37:39 +0100 (CET) From: Ihor Radchenko To: Michael Heerdegen Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-agenda-later sometimes creates a void display [9.7.11 (release_9.7.11 @ /usr/local/share/emacs/31.0.50/lisp/org/)] In-Reply-To: <87ttadqati.fsf@web.de> References: <874j2e14sz.fsf@web.de> <87v7utprqe.fsf@localhost> <87y0zpqg44.fsf@web.de> <87ttadnmcv.fsf@localhost> <87ttadqati.fsf@web.de> Date: Sat, 11 Jan 2025 14:39:59 +0000 Message-ID: <8734hp1kjk.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: , 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-Spam-Score: -8.03 X-Spam-Score: -8.03 X-Migadu-Queue-Id: EAD1BA33FA X-Migadu-Scanner: mx10.migadu.com X-TUID: lCumBuHoISHr --=-=-= Content-Type: text/plain Michael Heerdegen writes: >> Please, do try to follow >> https://orgmode.org/manual/Feedback.html#Feedback and provide detailed >> steps showing how to reproduce the problem you are seeing without your >> personal config. > > This will be a lot of work. I really hope we can avoid it. One way or another I need a reproducer to test whether any given fix makes sense. Now, I created one. 1. emacs -Q 2. Open the attached org file 3. M-x org-agenda < a RET 4. Move to the week of items 5. Move point to "Sunday" 6. f 7. Observe buffer being scrolled all the way up > What I am seeing is what one sees for any window showing a sufficiently > large buffer after evaluating something like > > (setf (window-start) (+ 10 (point-max))) Thanks! That did help to create a reproducer. Please try the attached patch. Let me know if it fixes things on your side. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-agenda-later-Avoid-scrolling-the-window-past-poi.patch >From c3bc1954b7b0427b2ab9f7563c960841c1410a55 Mon Sep 17 00:00:00 2001 Message-ID: From: Ihor Radchenko Date: Sat, 11 Jan 2025 15:33:31 +0100 Subject: [PATCH] org-agenda-later: Avoid scrolling the window past point * lisp/org-agenda.el (org-agenda-later): When previous agenda buffer is larger and its scroll position is beyond point position in the new agenda buffer, do not try to restore scroll state. (Doing otherwise, scrolls past the point, leading to unpredictable results - depending on `scroll-conservatively'. Reported-by: Michael Heerdegen Link: https://orgmode.org/list/87ttadqati.fsf@web.de --- lisp/org-agenda.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 884b9de782..2bab159795 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8789,7 +8789,8 @@ (defun org-agenda-later (arg) (list (car args) sd span))) (org-agenda-redo) (org-agenda-find-same-or-today-or-agenda cnt)) - (set-window-start nil wstart))) + (unless (< (point) wstart) ; do no scroll past the point + (set-window-start nil wstart)))) (defun org-agenda-earlier (arg) "Go backward in time by the current span in the agenda buffer. -- 2.47.1 --=-=-= Content-Type: application/vnd.lotus-organizer; charset=utf-8 Content-Disposition: attachment; filename=bug.org Content-Transfer-Encoding: base64 KiBUT0RPIFRoaXMKU0NIRURVTEVEOiA8MjAyNS0wMS0wOCBXZWQ+CiogVE9ETyBUaGlzClNDSEVE VUxFRDogPDIwMjUtMDEtMDggV2VkPgoqIFRPRE8gVGhpcwpTQ0hFRFVMRUQ6IDwyMDI1LTAxLTA4 IFdlZD4KKiBUT0RPIFRoaXMKU0NIRURVTEVEOiA8MjAyNS0wMS0wOCBXZWQ+CiogVE9ETyBUaGlz ClNDSEVEVUxFRDogPDIwMjUtMDEtMDggV2VkPgoqIFRPRE8gVGhpcwpTQ0h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wMS0wOCBXZWQ+CiogVE9ETyBUaGlzClNDSEVEVUxFRDogPDIw MjUtMDEtMDggV2VkPgoqIFRPRE8gVGhpcwpTQ0hFRFVMRUQ6IDwyMDI1LTAxLTA4IFdlZD4KKiBU T0RPIFRoaXMKU0NIRURVTEVEOiA8MjAyNS0wMS0wOCBXZWQ+CiogVE9ETyBUaGlzClNDSEVEVUxF RDogPDIwMjUtMDEtMDggV2VkPgoqIFRPRE8gVGhpcwpTQ0hFRFVMRUQ6IDwyMDI1LTAxLTA4IFdl ZD4KKiBUT0RPIFRoaXMKU0NIRURVTEVEOiA8MjAyNS0wMS0wOCBXZWQ+CiogVE9ETyBUaGlzClND SEVEVUxFRDogPDIwMjUtMDEtMDggV2VkPgoqIFRPRE8gVGhpcwpTQ0hFRFVMRUQ6IDwyMDI1LTAx LTA4IFdlZD4KKiBUT0RPIFRoaXMKU0NIRURVTEVEOiA8MjAyNS0wMS0wOCBXZWQ+CiogVE9ETyBU aGlzClNDSEVEVUxFRDogPDIwMjUtMDEtMDggV2VkPgoqIFRPRE8gVGhhdApTQ0hFRFVMRUQ6IDwy MDI1LTAxLTEzIE1vbj4K --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--