From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0MG1MHBAJGRZhwAASxT56A (envelope-from ) for ; Wed, 29 Mar 2023 15:43:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uKmQMHBAJGSWZQAA9RJhRA (envelope-from ) for ; Wed, 29 Mar 2023 15:43:12 +0200 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 590E8BF92 for ; Wed, 29 Mar 2023 15:43:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phW4Z-0008F7-CX; Wed, 29 Mar 2023 09:42:43 -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 1phW4X-0008Eh-Lb for emacs-orgmode@gnu.org; Wed, 29 Mar 2023 09:42:41 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phW4V-0006G9-K5 for emacs-orgmode@gnu.org; Wed, 29 Mar 2023 09:42:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 77BAA2401F3 for ; Wed, 29 Mar 2023 15:42:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680097357; bh=9qUMZHIHAA+E+DLaDS5UiFCjwdFJWN5dfS1S+6vQCl0=; h=From:To:Cc:Subject:Date:From; b=OASshfo+f7jzYFFcgbPexMzu7sAnq+cLw7QlSVeWOezDqJfGO3fu53Bv7ylIQmM0O f54Yi5r0YBV0lGStC0l4d9uNeRfUJQn3VMxA3bDeAdLoi2t12O/bOYAAsy2pzeTZF+ SrNG4lS2BlUgdEC7Pkx7YeAJiOvdpGXXKkFtvIzEDS7tzJzL6g9tbfcT6SbEi0Lp4f vdn4oQ3KR8mmefI7wf3AeIDOcFYJO6GZhFUqqpsbaY4jJof3a4aJnm2BdI4nJaI4zb SOnfzuYZsuQ6rFhJBN+zqzJjMJ4q8kwYUwLgD3osTSNNAs3czekHlTXVL2jq+CViKx 5JnMwJWNaMn3g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PmnmX6nR9z6twm; Wed, 29 Mar 2023 15:42:36 +0200 (CEST) From: Ihor Radchenko To: "Marvin J." Cc: emacs-orgmode@gnu.org Subject: Re: Allow org-agenda-switch-to to restore the previous window configuration In-Reply-To: References: Date: Wed, 29 Mar 2023 13:44:41 +0000 Message-ID: <87lejfn03a.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@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_H2=-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-Flow: FLOW_IN X-Migadu-Country: US ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OASshfo+; 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=1680097392; 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=HYggbQ7U2AHyu6wX7uySZR5SmyYg5WohNcsZg+JQk3M=; b=W0ewZdLlHQY/2yeax7py0+eCipn4ReMl361N6QHUUuNjcCukLyDotVR4hmJXQ74r8obglx ojcUislAirRd9TFv5pxgb8bUbeSIj2T/4xcFusu5eU7v7DAk6vrHDSJ4WrR8OTWME8sSRz wRay9c9kaPNdGSDHrlCjr/K2QMD/aCPWUc/UGYP8+29uumyTg0dxtYOGfwXAsizvFOhcVO Ps4dvib1fifhZi4S7ziPakQf3HFoF16tJMsJ9u8KciWCijyHHKx1zQ1KQXwJs/IFg6mGxf tfEGp/yd3xEv0II+bE5e0G2g/X1vLRYn4vqDZwehzYC+CnQ12HvredMx4zIZAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680097392; a=rsa-sha256; cv=none; b=uskk9QGf9RZ/AA5u9ed7NYQZmI5df6EXXKC5hLCNfeq66N6XAyaC0xqZmsI75v+4ZNRc+x C36GqHjCE6BMXCMLJgM/ZWNNojkhtftuMLU6Sj1JEaAzIixNkRw8VzV8TJZxQ1kaWPFLee MS9lYpp8JW0wMoAlc7F3ZH4Z7OACs6QfdbOVVK2HHm7ydJDxIpQywkSxds6/PslX5C1ssi In7AVhiqaPncYiVJJeb8mhBb+pe2jlxin5Vu0YPaduDpzqApkspXb47Szy1IrpovlBduhr Qjb7BxhtzBpfRFAI07mThpyYgZwEltDhXk1nkAeQUu2xKHfX543VwggnE+O8+g== X-Migadu-Spam-Score: -4.74 X-Migadu-Scanner: scn1.migadu.com X-Migadu-Queue-Id: 590E8BF92 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OASshfo+; 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 X-Spam-Score: -4.74 X-TUID: vHSrf7vQtznf "Marvin J." writes: > Org-agenda provides the possibility to automatically restore the previous > window configuration after closing the agenda buffer using org-agenda-quit > (bound to q). This is achieved by setting > org-agenda-restore-windows-after-quit to t. > > However, there is also another way to "exit" the agenda, namely by calling > org-agenda-switch-to (bound to RET) on an appropriate item. However, this > command currently does not take the previous window configuration into > account. > I thus propose adding a new variable named e.g. > org-agenda-restore-windows-after-switch that controls whether the command > org-agenda-switch-to will restore the previous window configuration before > switching to the Org mode file of the item at point. Note that you can still achieve what you want using `org-agenda-after-show-hook'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at