From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: [PATCH] org-agenda: Add only-window setup option Date: Fri, 30 Jan 2015 00:17:19 -0500 Message-ID: <87oapg3l0g.fsf@kmlap.domain.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH3tn-00035g-01 for emacs-orgmode@gnu.org; Fri, 30 Jan 2015 00:13:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YH3ti-0004qb-9a for emacs-orgmode@gnu.org; Fri, 30 Jan 2015 00:13:42 -0500 Received: from mail-qa0-f50.google.com ([209.85.216.50]:64982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH3ti-0004qX-5m for emacs-orgmode@gnu.org; Fri, 30 Jan 2015 00:13:38 -0500 Received: by mail-qa0-f50.google.com with SMTP id k15so18612730qaq.9 for ; Thu, 29 Jan 2015 21:13:37 -0800 (PST) Received: from localhost ([2601:6:5480:1e5:9e4e:36ff:fe3d:ae9c]) by mx.google.com with ESMTPSA id c3sm9106907qam.26.2015.01.29.21.13.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jan 2015 21:13:37 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode --=-=-= Content-Type: text/plain The variable org-agenda-window-setup provides several different options (current-window, other-window, reorganize-frame, other-frame). For a while now, I've been using a different setup that deletes all other windows. The attached patch adds this option to org-agenda-window-setup. Do others think this option is worth having? -- Kyle --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org-agenda-Add-only-window-setup-option.patch >From edc17cdf46183f99a920523e7d7f69c2c098a4f1 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 30 Jan 2015 00:04:54 -0500 Subject: [PATCH] org-agenda: Add only-window setup option * lisp/org-agenda.el (org-agenda-window-setup, org-agenda-prepare-window): Add option to show agenda as the only window in the current frame. --- etc/ORG-NEWS | 3 +++ lisp/org-agenda.el | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index b45e439..66c72ca 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -192,6 +192,9 @@ manual for details. *** Countdown timers can now be paused. ~org-timer-pause-time~ wil now pause and restart both relative and countdown timers. +*** New option ~only-window~ for ~org-agenda-window-setup~ +When ~org-agenda-window-setup~ is set to ~only-window~, the agenda is +displayed as the sole window of the current frame. ** Miscellaneous *** Strip all meta data from ITEM special property ITEM special property does not contain TODO, priority or tags anymore. diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index ad4018d..541513a 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1095,6 +1095,7 @@ (defcustom org-agenda-window-setup 'reorganize-frame current-window Show agenda in the current window, keeping all other windows. other-window Use `switch-to-buffer-other-window' to display agenda. +only-window Show agenda, deleting all other windows. 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. @@ -1105,6 +1106,7 @@ (defcustom org-agenda-window-setup 'reorganize-frame (const current-window) (const other-frame) (const other-window) + (const only-window) (const reorganize-frame))) (defcustom org-agenda-window-frame-fractions '(0.5 . 0.75) @@ -3621,6 +3623,9 @@ (defun org-agenda-prepare-window (abuf filter-alist) (org-switch-to-buffer-other-window abuf)) ((equal org-agenda-window-setup 'other-frame) (switch-to-buffer-other-frame abuf)) + ((eq org-agenda-window-setup 'only-window) + (delete-other-windows) + (org-pop-to-buffer-same-window abuf)) ((equal org-agenda-window-setup 'reorganize-frame) (delete-other-windows) (org-switch-to-buffer-other-window abuf))) -- 2.2.2 --=-=-=--