emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Conditionally delete windows in agenda quit
@ 2009-02-28  0:21 Peter Jones
  2009-03-01 16:18 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Jones @ 2009-02-28  0:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

Before this patch, org-agenda-quit would delete the agenda window if
the frame had more than one window.  This patch changes that behavior
slightly so that if org-agenda-window-setup is 'current-window, the
agenda window won't be deleted.

Patch also available from:

 git://pmade.com/org-mode
 branch: pjones-agenda-quit


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: agenda.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]

From 94a5f5f9487a2ccdd4d38d1b989720a89d1d10b6 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@pmade.com>
Date: Fri, 27 Feb 2009 17:17:12 -0700
Subject: [PATCH] Conditionally delete windows in agenda quit

Before this patch, org-agenda-quit would delete the agenda window if
the frame had more than one window.  This patch changes that behavior
slightly so that if org-agenda-window-setup is 'current-window, the
agenda window won't be deleted.
---
 lisp/org-agenda.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 3fb7baf..dbfa5f6 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4455,7 +4455,9 @@ If ERROR is non-nil, throw an error, otherwise just return nil."
   (if org-agenda-columns-active
       (org-columns-quit)
     (let ((buf (current-buffer)))
-      (if (not (one-window-p)) (delete-window))
+      (and (not (eq org-agenda-window-setup 'current-window)) 
+           (not (one-window-p))
+           (delete-window))
       (kill-buffer buf)
       (org-agenda-reset-markers)
       (org-columns-remove-overlays)
-- 
1.6.0


[-- Attachment #3: Type: text/plain, Size: 65 bytes --]


-- 
Peter Jones, http://pmade.com
pmade inc.  Louisville, CO US

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Conditionally delete windows in agenda quit
  2009-02-28  0:21 [PATCH] Conditionally delete windows in agenda quit Peter Jones
@ 2009-03-01 16:18 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-03-01 16:18 UTC (permalink / raw)
  To: Peter Jones; +Cc: emacs-orgmode

I am accepting this patch, thanks.

- Carsten

On Feb 28, 2009, at 1:21 AM, Peter Jones wrote:

> Before this patch, org-agenda-quit would delete the agenda window if
> the frame had more than one window.  This patch changes that behavior
> slightly so that if org-agenda-window-setup is 'current-window, the
> agenda window won't be deleted.
>
> Patch also available from:
>
> git://pmade.com/org-mode
> branch: pjones-agenda-quit
>
> From 94a5f5f9487a2ccdd4d38d1b989720a89d1d10b6 Mon Sep 17 00:00:00 2001
> From: Peter Jones <pjones@pmade.com>
> Date: Fri, 27 Feb 2009 17:17:12 -0700
> Subject: [PATCH] Conditionally delete windows in agenda quit
>
> Before this patch, org-agenda-quit would delete the agenda window if
> the frame had more than one window.  This patch changes that behavior
> slightly so that if org-agenda-window-setup is 'current-window, the
> agenda window won't be deleted.
> ---
> lisp/org-agenda.el |    4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 3fb7baf..dbfa5f6 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -4455,7 +4455,9 @@ If ERROR is non-nil, throw an error, otherwise  
> just return nil."
>   (if org-agenda-columns-active
>       (org-columns-quit)
>     (let ((buf (current-buffer)))
> -      (if (not (one-window-p)) (delete-window))
> +      (and (not (eq org-agenda-window-setup 'current-window))
> +           (not (one-window-p))
> +           (delete-window))
>       (kill-buffer buf)
>       (org-agenda-reset-markers)
>       (org-columns-remove-overlays)
> -- 
> 1.6.0
>
>
> -- 
> Peter Jones, http://pmade.com
> pmade inc.  Louisville, CO US
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-01 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-28  0:21 [PATCH] Conditionally delete windows in agenda quit Peter Jones
2009-03-01 16:18 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).