From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2CDyN9Czn2BGgAEAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 13:43:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oBKDM9Czn2DSbgAAbx9fmQ (envelope-from ) for ; Sat, 15 May 2021 11:43:12 +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 58D1A2357D for ; Sat, 15 May 2021 13:43:12 +0200 (CEST) Received: from localhost ([::1]:39444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhshL-0007Oz-89 for larch@yhetil.org; Sat, 15 May 2021 07:43:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhsev-0004VJ-E9 for emacs-orgmode@gnu.org; Sat, 15 May 2021 07:40:41 -0400 Received: from mout01.posteo.de ([185.67.36.65]:43813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhses-0007zm-OX for emacs-orgmode@gnu.org; Sat, 15 May 2021 07:40:41 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 68AB5240026 for ; Sat, 15 May 2021 13:40:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1621078836; bh=aF4Jqup8M00+IKZnMQV/DXJ0u5AZz/LZOA3nltrYayU=; h=From:To:Subject:Date:From; b=jVrfRXf8lAuiyeA47u9bT3ajBfBcKczOL0wy1fkA6OG5Z8Dpynx+Yp2MWkQt5Kvdr fp9HTh1x2sXzPkM5qVb11Qe5UdhJQkHh06/rBHZVKwsedXtKSXJmdOs9xjrJHhQM3d GzmU5k1jAMrG9WfJ5pd/Ns+arHB0hlX/Elji4ZaXPI/pyYsSC52CX2UwY3DXAeM/fm IQuWNurEeP0X8gv0HXRzHR18h33ZdgVegpq1QZ/Qd93ohiOofwn79ptyTdSvQoqgHA 9XeKGWn0aRdoX9XWQgVXN/Z4ArSqwBvj8fazqCyIzJTVTSvYO6YffxAqdgtS/gQpoz gjBaK+ktxPE8Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Fj3Nz6lccz6tmF for ; Sat, 15 May 2021 13:40:35 +0200 (CEST) From: Ingo Lohmar To: emacs-orgmode@gnu.org Subject: Bug: org-agenda-buffer-name wrongly persists [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/28.0.50/lisp/org/)] Date: Sat, 15 May 2021 11:40:35 +0000 Message-ID: <87r1i8cjik.fsf@kenko.localhost.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=ingo.lohmar@posteo.net; helo=mout01.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, 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=1621078992; 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=5f/Eut+HHa+RjY/peTG8JiW4R5tDHQe4z4w4XMhPYiU=; b=BTZSriLEbb2H40dT7ZYdDGEt8BSidxRl4u7sKK4xVPnAYEq1Dqe1wPuLyR+WUr32J4/Z7V hf2dbQzF9mucB3ukqxKhE2wz9jAVy8EomWvRTFPa72xg2gPm/aAOwctcscncj2TZf1EqEO v6Gz1lTyX7uh8QuplSDPwacEPsuWzp9yKyyvKSD9xQv4vR1tp6ShsnpiFQZXPHt3KObZ+d 4llKRVE5Q2F3Kfe5HI3LY+CxSK6Ra36a1vaLzslS0CSN2ukfcNOqLU7pcYATypkz8K4SqM 2W8ZC5QqwChlx7ZCq2XwjqOopoIfAydZPZg7c1cHtTFTLxAryZw2tVNQ+wgLXQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621078992; a=rsa-sha256; cv=none; b=OTPusWFYqTk609JYxoG4sCovlWPp5khrDF5etLGZUgZb32Oh7moC4x2jxr5vagUl9xHeG1 75qO0fenATpquEV7MrJk2ejvaV3SSAFK2A3pyJVZq+mV6OOsdBWrcfqGfNskBSWKYb8i/t mpIWjd4gt+m8a7AT7hzaumFUqq3gvosTTn+SZcYPDyxC2jcqXDBX3ztb4pHCjkTVohH408 bJhDPRlNTKeZkFKawf5FXsaNzfQ4C+WsCiUKQ9VWFVsbz6Mh8UJ/8dpcbJHLzvbkWgnV83 PerF80goCpzZ5KE5HQsBoe1VXwHr3RvTxtXZlM96p3+W4FWog6EHedzWnH+2aQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=jVrfRXf8; dmarc=pass (policy=none) header.from=posteo.net; 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.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=jVrfRXf8; dmarc=pass (policy=none) header.from=posteo.net; 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: 58D1A2357D X-Spam-Score: -3.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: RVTkgl2W7kEE Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ The global variable org-agenda-buffer-name, once set, wrongly (IMO) affects all future agenda buffer names for composite commands. Minimal complete example (in emacs -q): ================================================================================ Evaluate (setq org-agenda-custom-commands '(("z" "Std Agenda" ((tags "select" ((org-agenda-overriding-header "*select*ed"))) (agenda "" ((org-agenda-span 2))))))) (("z" "Std Agenda" ((tags "select" ...) (agenda "" ...)))) (org-agenda nil "z") and get a custom agenda with the default buffer name "*Org Agenda*" (OK). Create a buffer "test.org" and switch it to `org-mode', insert a timestamp (C-c .). Now follow the timestamp link (C-c C-o), and get an agenda with buffer name "*Org Agenda(a:2021-05-15)" (OK). Now re-do (org-agenda nil "z") which has the same buffer name including the date (BUG). ================================================================================ I do not pretend to understand how the global variable org-agenda-buffer-name is supposed to work (not even mentioning the -sticky- functionality here). What I understand is the following: The org-agenda dispatcher let-binds o-a-buffer-name to the global value. "Simple" agenda commands (like a todo list) called from the dispatcher set this let-bound o-a-buffer-name, so they use the correct default value. "Composite" custom commands called via the dispatcher do not set the let-bound value, so they use the original let-bound value (the global value at the start of org-agenda). `org-follow-timestamp-link' calls the `org-agenda-list' command directly (not via the dispatcher), hence sets the global (not a local let-bound) value of o-a-buffer-name. I have little constructive advice to offer regarding a solution. It seems to me that the global variable o-a-buffer-name is only harmful and I would try to get rid of it, but I guess it is necessary for sticky agendas (not using them). Emacs : GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-05-01 Package: Org mode version 9.4.4 (release_9.4.4 @ /usr/local/share/emacs/28.0.50/lisp/org/)