From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CBbHHxcQSF8APQAA0tVLHw (envelope-from ) for ; Thu, 27 Aug 2020 19:57:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2B+1GxcQSF/lOwAA1q6Kng (envelope-from ) for ; Thu, 27 Aug 2020 19:57:11 +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 C7C89940631 for ; Thu, 27 Aug 2020 19:57:10 +0000 (UTC) Received: from localhost ([::1]:44740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBO1E-0001LT-JY for larch@yhetil.org; Thu, 27 Aug 2020 15:57:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBNqm-0002vF-1y for emacs-orgmode@gnu.org; Thu, 27 Aug 2020 15:46:20 -0400 Received: from mail-eopbgr150099.outbound.protection.outlook.com ([40.107.15.99]:39237 helo=EUR01-DB5-obe.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 ) id 1kBNqj-0003VX-0v for emacs-orgmode@gnu.org; Thu, 27 Aug 2020 15:46:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZE0Jegnoovb5m/6ziESSZUgD1Dl4sUywr58IFO+fj8La4tMW0polpwRuVrynUDVPCjp1B11T/xcu2nWO0O7WrApu0dc3OjYxZ3j/iT9+ygvZovknjVGjpaxSVVr/srZgfv8AqvTMeTI6y9tO21xFVp4nJ4+I/2sfIcYhk2Tnh5zFeB4pR/9qfXWwjwVRxnZYZhxUE1s9w6eKWxCNdm5SEcQW1z1bYofdukeLC6CeWeEZdjjQChREuecZPGvAm48ZuPhXA0xXMH1AG4WNK8TcOGhFYxxZEyimrJp6v+NW211s2v0IuHl0McocBlBzo3HSbMhX4bc5USVqOjV/fgXeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aYuzA2IkLsJO81nLrabzBgMRsS6StY4BXIv3cw9V5/o=; b=dPbX8Fcb/hJCW947T0zMgXeydQ/HIUZn8NHUQR/odNQras9NmsxRj6M78MAoa6DDSv46Qm3nhsfWG3oFPFk4s7bMYGkRLYLxMWOGNkVPnObQOWyCQx0bKaMV8Vw9QQC16lAnmuiC9QSNe7/RSbZk4MebW5Hcql2IxTcO56F2DIuWBUbRhWZrK2kGZDDzheOIgtB8Zzl/wBofepyXYUeJQ7ALDGYUGCbz6ipgeVpSDLibc/3g5a7q4htNJR3q3hTr3fOd1bBBmWaf3zMzGmXPhGd4klO5Iz1HEj+mZvnpIlUgdtzi46N4LfEO411LrCTROfV0vOyRpNGQiUWkcnnCeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ucl.ac.uk; dmarc=pass action=none header.from=ucl.ac.uk; dkim=pass header.d=ucl.ac.uk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=liveuclac.onmicrosoft.com; s=selector2-liveuclac-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aYuzA2IkLsJO81nLrabzBgMRsS6StY4BXIv3cw9V5/o=; b=vfEgy43CJ4LOwJB+indi9tIQuPDZaZHzPtg1mmJHwiMyUqZT3WuXVRSzS5ZB7LeM97N0mpB4YAa3RbtF4aInLvyfnydaVUu/EXeg6jPlNQKN/1aVBxKiImM7NPj1eUwLE8tcBkrA3EwcPtrBlHJuwA9kzKHyUpNnT+fD6ikcmI4= Received: from VI1PR0102MB3327.eurprd01.prod.exchangelabs.com (2603:10a6:803:10::26) by VI1PR01MB4221.eurprd01.prod.exchangelabs.com (2603:10a6:803:69::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.26; Thu, 27 Aug 2020 19:31:11 +0000 Received: from VI1PR0102MB3327.eurprd01.prod.exchangelabs.com ([fe80::5c59:e39d:c149:5e03]) by VI1PR0102MB3327.eurprd01.prod.exchangelabs.com ([fe80::5c59:e39d:c149:5e03%6]) with mapi id 15.20.3326.021; Thu, 27 Aug 2020 19:31:11 +0000 From: Eric S Fraga To: Kyle Meyer Subject: Re: new feature for consideration: other-tab for org-agenda-window-setup Organization: On the Interweb somewhere References: <87eentqsws.fsf@ucl.ac.uk> <87k0xlm48z.fsf@kyleam.com> <871rjsquwy.fsf@ucl.ac.uk> <878se0qs4o.fsf@kyleam.com> X-Url: http://www.ucl.ac.uk/~ucecesf/ Mail-Followup-To: Kyle Meyer , emacs-orgmode@gnu.org Date: Thu, 27 Aug 2020 20:31:07 +0100 In-Reply-To: <878se0qs4o.fsf@kyleam.com> (Kyle Meyer's message of "Thu, 27 Aug 2020 06:51:03 -0400") Message-ID: <87imd33mys.fsf@ucl.ac.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: multipart/mixed; boundary="=-=-=" X-ClientProxiedBy: LO2P265CA0306.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::30) To VI1PR0102MB3327.eurprd01.prod.exchangelabs.com (2603:10a6:803:10::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from t3610 (95.146.75.255) by LO2P265CA0306.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Thu, 27 Aug 2020 19:31:10 +0000 X-Url: http://www.ucl.ac.uk/~ucecesf/ X-Originating-IP: [95.146.75.255] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb1b6be3-edae-47a2-af8e-08d84abfc10c X-MS-TrafficTypeDiagnostic: VI1PR01MB4221: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oZdbFgXaT1dp8EKt/Q18pO2n4G5aMlIcKsa1Bdtc8830kZcQM0qwZpUv6zwen/f5O9eOTDV29vX11HJWxxjKvqt0Yb42UdPeYYttSwBv6rGa604rjy/4LIJry/aIfBplx7cB4WybQ90OJkebDZN7zP8iMFoObh4CNt551E9htCkl2cSGYIwCxVemQH4w+BBD0o+Y5oCBAbfZvZ79cC/rt+85c2j/FL4m47hnenlX5e/Hc30jDDS1m6SlSLcc2e3HsKZzSOgwJLXHcVq0pSVZ+R8dk0ga73rVCvmfqjZk7gaTqw9xo6HcEGjFeCf/jUcQEviGxKzbkmUHW5yRewTiqQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0102MB3327.eurprd01.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39860400002)(376002)(396003)(346002)(316002)(6916009)(478600001)(8936002)(786003)(2906002)(26005)(66556008)(4326008)(66616009)(5660300002)(66946007)(66476007)(86362001)(6486002)(186003)(36756003)(16526019)(235185007)(36916002)(6496006)(6666004)(2616005)(8676002)(956004)(83380400001)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: aLy/Vh1slD7G1nnA25A/N+bsuvh+QGk11ETNDzppVi8C4Q1KXGAU2W5K7SdjfA1/5tHC7dQMBZ85Ir90xxGC27TZBc+CAV1hMfrMgmwer+JEyhzpKQ9YRdchjzL1hUNoA766hm4pq3oXksQ4WUKZO3jdkMdXnft6C9BR+bzA78joWEnYMJN6UTp/AThBQp3lAE6d/5T4hsjDWf11ypHk20gawcEPb1ZraS+Lh2xezFP87gULxbHCnRnh92J2Rdgp/43kn0zHTF8UVsLdLUusptaWLOAd/ruXKZlVOnCigF1YmtPUOoARws+T3o7ik9pej5mQ2VUhQJ9fwhSYcddlhMd/969arbCxFQXU82kvJdVZPHwqH2qbd9EV8nl+fFzz1ahYjYwlJUGfCyem7+R9wIr7uEp2cBug4BOSzof6fSTaeaU1xWbGKWqOD8noqywVeLDwURvxjDxygdRRFX4ThC1JftGD0/fThWuMNQf1zrsSJLVgovIllanWYB2zbgFZ92UKEdPETG7N65woVsTP4xr29J5lNdSANRdtihJP+g1MiHgeDJZtFTF0XCZ2wjpZagVQ99ZVoAauTVopEb0ZRrFXibndRrq7dO89kMnBWpOIukbfKgzJGdFZ4EWMiRMd0BZzYDAtzbHzEabl4l7p7A== X-OriginatorOrg: ucl.ac.uk X-MS-Exchange-CrossTenant-Network-Message-Id: eb1b6be3-edae-47a2-af8e-08d84abfc10c X-MS-Exchange-CrossTenant-AuthSource: VI1PR0102MB3327.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2020 19:31:11.3586 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1faf88fe-a998-4c5b-93c9-210a11d9a5c2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i0qSOikjvDFuW7zZV7CnY4HpvHdNx1tHBQ0Up58xHyk8/uN7BFpORKRfC/ByL0lo9NsEl7igFo+mV0cgmVlsBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR01MB4221 Received-SPF: none client-ip=40.107.15.99; envelope-from=e.fraga@ucl.ac.uk; helo=EUR01-DB5-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 15:46:14 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FORGED_SPF_HELO=1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=no 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=liveuclac.onmicrosoft.com header.s=selector2-liveuclac-onmicrosoft-com header.b=vfEgy43C; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=ucl.ac.uk (policy=none); 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-Spam-Score: -2.11 X-TUID: q7sCaLslpAJ0 --=-=-= Content-Type: text/plain Dear all, Please see attached for a new version of my changes for adding 'other-tab as an option for org-agenda-window-setup. I think I've addressed all your comments, Kyle, but any more are welcome. It would be good if somebody who is using an older version of Emacs, i.e. pre 27.1, could test the error handling: set org-agenda-window-setup to 'other-tab and see if it fails properly. I only have v28.x on my systems! On v28.x, it seems to be working fine. thank you, eric -- : Eric S Fraga via Emacs 28.0.50, Org release_9.3.7-720-gbe5916 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-other-tab-option-for-org-agenda-window-setup.patch >From be5916aba7031cd2343d3e59a98a47496ced95f2 Mon Sep 17 00:00:00 2001 From: Eric S Fraga Date: Wed, 26 Aug 2020 17:17:42 +0100 Subject: [PATCH] Add other-tab option for org-agenda-window-setup * org-agenda.el (org-agenda-prepare-window, org-agenda--quit): Handle other-tab option for agenda view creation and exit. --- etc/ORG-NEWS | 6 ++++++ lisp/org-agenda.el | 27 +++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 8a3589ec2..6d8db0e18 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -291,6 +291,12 @@ possible via column view value edit or with ==. Counterpart of ~org-show-entry~. ** New options +*** New option for using tabs in ~org-agenda-window-setup~ + +Choosing ~other-tab~ for ~org-agenda-window-setup~ will open the +agenda view in a new tab. This will work with versions of Emacs since +27.1 when ~tab-bar-mode~ was introduced. + *** New option ~org-clock-auto-clockout-timer~ When this option is set to a number and the user configuration diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 8ebc882fc..fd30e6d81 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1100,14 +1100,21 @@ reorganize-frame Show only two windows on the current frame, the current window and the agenda. other-frame Use `switch-to-buffer-other-frame' to display agenda. Also, when exiting the agenda, kill that frame. +other-tab Use `switch-to-buffer-other-tab' to display the + agenda, making use of the `tab-bar-mode' introduced + in Emacs version 27.1. Also, kill that tab when + exiting the agenda view. + See also the variable `org-agenda-restore-windows-after-quit'." :group 'org-agenda-windows :type '(choice (const current-window) (const other-frame) + (const other-tab) (const other-window) (const only-window) - (const reorganize-frame))) + (const reorganize-frame)) + :package-version '(Org . "9.4")) (defcustom org-agenda-window-frame-fractions '(0.5 . 0.75) "The min and max height of the agenda window as a fraction of frame height. @@ -1118,11 +1125,11 @@ It only matters if `org-agenda-window-setup' is `reorganize-frame'." (defcustom org-agenda-restore-windows-after-quit nil "Non-nil means restore window configuration upon exiting agenda. -Before the window configuration is changed for displaying the agenda, -the current status is recorded. When the agenda is exited with -`q' or `x' and this option is set, the old state is restored. If -`org-agenda-window-setup' is `other-frame', the value of this -option will be ignored." +Before the window configuration is changed for displaying the +agenda, the current status is recorded. When the agenda is +exited with `q' or `x' and this option is set, the old state is +restored. If `org-agenda-window-setup' is `other-frame' or +`other-tab', the value of this option will be ignored." :group 'org-agenda-windows :type 'boolean) @@ -3769,6 +3776,10 @@ FILTER-ALIST is an alist of filters we need to apply when (org-switch-to-buffer-other-window abuf)) ((eq org-agenda-window-setup 'other-frame) (switch-to-buffer-other-frame abuf)) + ((eq org-agenda-window-setup 'other-tab) + (if (fboundp 'switch-to-buffer-other-tab) + (switch-to-buffer-other-tab abuf) + (user-error "Your version of Emacs does not have tab bar support."))) ((eq org-agenda-window-setup 'only-window) (delete-other-windows) (pop-to-buffer-same-window abuf)) @@ -7389,6 +7400,10 @@ agenda." (cond ((eq org-agenda-window-setup 'other-frame) (delete-frame)) + ((eq org-agenda-window-setup 'other-tab) + (if (fboundp 'tab-bar-close-tab) + (tab-bar-close-tab) + (user-error "Your version of Emacs does not have tab bar mode support."))) ((and org-agenda-restore-windows-after-quit wconf) ;; Maybe restore the pre-agenda window configuration. Reset -- 2.28.0 --=-=-=--