From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yNDGJ8I6/2MgagEAbAwnHQ (envelope-from ) for ; Wed, 01 Mar 2023 12:45:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YKbCJ8I6/2MXDAAA9RJhRA (envelope-from ) for ; Wed, 01 Mar 2023 12:45:06 +0100 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 7804D22175 for ; Wed, 1 Mar 2023 12:45:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXKsh-00084h-VR; Wed, 01 Mar 2023 06:44:24 -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 1pXKsf-00084G-NW for emacs-orgmode@gnu.org; Wed, 01 Mar 2023 06:44:21 -0500 Received: from mail-yb1-xb36.google.com ([2607:f8b0:4864:20::b36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXKse-0007aj-2n for emacs-orgmode@gnu.org; Wed, 01 Mar 2023 06:44:21 -0500 Received: by mail-yb1-xb36.google.com with SMTP id t39so7746ybi.3 for ; Wed, 01 Mar 2023 03:44:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; t=1677671057; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=oLc6phmdHJmMzeJwenIvs4hlzuJ6hviRUh4ptAEwZeU=; b=PmxvIXTCN6cZFZFkjtOCrFPj2FKuko8MO6/3eOM32vcyYZC3z9uuikC6NwqShi+AFs OW/qhc75khCrYu9udx+gLS4g/fCu/3M5IVqIB296FM3nSnMNjBszqpjJAd10QhzY5PH8 kgIU9xanooi8Kv4h6N4a/C5osTBBCgkFd4TwvRTy98uPKrr7eXID7KpRHNpsJSX5QtRb u5ckk6htgDr3AozvAeP8GPU3rUcRA6xfteokVY42rvFIuwQZLAtsMbzrIuJrqVEc8aUl 1t3gYg3AGdQXO51ND13VzArtQb/SI6Z6PVsZ+FmAXAlL3wq7UeVyGvXokwrWfh88Xxov /LyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677671057; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oLc6phmdHJmMzeJwenIvs4hlzuJ6hviRUh4ptAEwZeU=; b=0W31I6+dH95AWiSTJ/1kjT0v6uzUBoFxkf9UPB6LT82/dXZUVS9sA4O8Uf3Hog9VMu 0zmtLEoLkA5th0HTLJLGpYQhFUj/uTY38FR3F4pV0uuPDjCBfJgBBXweeBRpv84T1ggu v9zH7KU+iI+hAH5KU0OEto/POOpIzkXzgqol79DQrmPfPonCEtfQzH/kqyKKOfMIxhTh XOFyU1R7FbvlpePvNSC+cvRtliHLiqUWnlIU6P5S83R+WhwV1qPvBM3JOr5QJkcx6Cng EK6kpOWU7XYPJjxNdjM8fi+FuSeExw5JgTFBPJXjvcz0SRSDvil/zvLDNLlM6zvXQJWX TGxg== X-Gm-Message-State: AO0yUKUEMtok5oXq9MT+JkGqaKIf7NkgAmvVuERIhWjJKFkB3PTsHLaI L+HReJUCNYnaQFWxVvCWELIcYlBgjCrNYimFBGyvQA2BR70= X-Google-Smtp-Source: AK7set+9hFYj1b+l0HnvuSbWjaLgvfT4kEQzQg/hbZJzI/fx10Kc84LxQHRkr1JYiKsQVWaSspk3fdJpNJJpwSgh+qM= X-Received: by 2002:a5b:b10:0:b0:8ac:72e3:c743 with SMTP id z16-20020a5b0b10000000b008ac72e3c743mr2654744ybp.9.1677671057501; Wed, 01 Mar 2023 03:44:17 -0800 (PST) MIME-Version: 1.0 From: "Marvin J." Date: Wed, 1 Mar 2023 12:44:06 +0100 Message-ID: Subject: Allow org-agenda-switch-to to restore the previous window configuration To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000006eb00b05f5d53b1f" Received-SPF: pass client-ip=2607:f8b0:4864:20::b36; envelope-from=silbersplitter@googlemail.com; helo=mail-yb1-xb36.google.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677671106; a=rsa-sha256; cv=none; b=hPWSttMypk3iPKnod24GCu74dfSWFcYD//GhCkGDhF/BKDzz/ysYcOtVuIwZgaXMWj8A8f V5JbRDmXKu3ku/4QTGZbadp+c0nbB6WnzEYkKA5OFGlJ09BVq4FJBWES5VnbfIswD9963U KGzdoWroj9syrUiBTJfAb+UHEE3/nmWTh+/hkUQqcPT0U97KBn8at7DdTc0mTt7WeMqAwL pLGV0KXwrWwWVQlOpBJQK9v5rm3Q/PGiJB+SVZSLhLG6ZAzcQG+ok3RiRuF6Jx9pDrVU43 G46PaYtZf1PLDH53rvzhooJpWj7cI/I1744AP/Y8u9MOYbkYEWPG0KHH2XsiuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=googlemail.com header.s=20210112 header.b=PmxvIXTC; 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=quarantine) header.from=googlemail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677671106; 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=oLc6phmdHJmMzeJwenIvs4hlzuJ6hviRUh4ptAEwZeU=; b=doIqalCs56W8hp/Pgu5k4SjbZVeAxZzQ8wZsn8AlORTx5PI+G97pOyxgyJzdJZw3o42dWM J81AJHA4aoLrmgoemF08IDyqchqOl7Ft0G8zX26eofFRpJS62mfDQvbB7nuf3l/5FHPYl1 7xTIrO/btnRPkgqb+zPA2J2WMrB2FZbucXUKVSMd4dYjno1sHhINdu62pCjHsHMb5ZAuTk bEAZ/KlI2+dl2sAZN95qztAd41Q0G3BhWi8cn1xvBg6AoB/jz/ksfXZgqxUX6tLLXv6cXU twXF2Pi9/n++NBCQIW3zgcNGGtILzeLEYImu00izZ2BGi8Zv6zv2Eo22/vjnZg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.88 X-Spam-Score: -4.88 X-Migadu-Queue-Id: 7804D22175 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=googlemail.com header.s=20210112 header.b=PmxvIXTC; 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=quarantine) header.from=googlemail.com X-TUID: ZiBywxpX/+hs --0000000000006eb00b05f5d53b1f Content-Type: text/plain; charset="UTF-8" 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. An example scenario where this is useful: Suppose you have a sophisticated window configuration and call org agenda with org-agenda-window-setup set to only-window. Then you want that window configuration to be restored also when exiting the agenda view via org-agenda-switch-to. Otherwise, you would lose your precious window configuration. This behavior could be achieved by adding something like (when (and org-agenda-restore-windows-after-switch org-agenda-pre-window-conf) (set-window-configuration org-agenda-pre-window-conf)) before the call of pop-to-buffer-same-window within org-agenda-switch-to. --0000000000006eb00b05f5d53b1f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Org-agenda provides the possibility to automatically = restore the previous window configuration after closing the agenda buffer u= sing org-agenda-quit (bound to q). This is achieved by setting org-agenda-r= estore-windows-after-quit to t.

However, there is = also another way to "exit" the agenda, namely by calling org-agen= da-switch-to (bound to RET) on an appropriate item. However, this command c= urrently does not take the previous window configuration into account.
<= /div>
I thus propose adding a new variable named e.g. org-agenda-restore= -windows-after-switch that controls whether the command org-agenda-switch-t= o will restore the previous window configuration before switching to the Or= g mode file of the item at point.

An example scenario where this is = useful: Suppose you have a sophisticated window configuration and call org = agenda with org-agenda-window-setup set to only-window. Then you want that = window configuration to be restored also when exiting the agenda view via o= rg-agenda-switch-to. Otherwise, you would lose your precious window configu= ration.

This behavior could be achieved by adding something like
=
(when (and org-agenda-restore-windows-after-switch org-agenda-pre-windo= w-conf)
=C2=A0 (set-window-configuration org-agenda-pre-window-conf))
before the call of pop-to-buffer-same-window within org-agenda-switch-= to.
--0000000000006eb00b05f5d53b1f--