Org-mode mailing list
 help / color / mirror / Atom feed
From: Muchenxuan Tong <demon386@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Bug fix: delete indirect buffer's window only when	it exists.
Date: Tue, 22 Jan 2013 07:42:26 +0000 (UTC)
Message-ID: <loom.20130122T083531-135@post.gmane.org> (raw)
In-Reply-To: <87a9s2l7r3.fsf@Rainer.invalid>

Achim Gratz <Stromeko <at> nexgo.de> writes:

> 
> Muchenxuan Tong writes:
> > Bug fix: delete indirect buffer's window only when it exists.
> > * org-agenda.el (org-agenda-quit): Delete indirect buffer's window
> > only when it exists.
> 
> Introduces a new bug: when-let is not defined in GNU Emacs.
> 
> Regards,
> Achim.

Thanks for pointing out. It's my fault, when-let is defined in slime.el 
and not the Emacs core library.

The following patch should be OK:
----
Bug fix: delete indirect buffer's window only when it exists.
* org-agenda.el (org-agenda-quit): Delete indirect buffer's window
only when it exists.

When indirect buffer's window doesn't exist, the original logic will
delete the current window.

TINYCHANGE

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index f48ff6f..8b9ae81 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6989,7 +6989,10 @@ When `org-agenda-sticky' is non-nil, only bury
the agenda."
   (interactive)
   (if (and (eq org-indirect-buffer-display 'other-window)
 	   org-last-indirect-buffer)
-      (delete-window (get-buffer-window org-last-indirect-buffer)))
+      (let ((org-last-indirect-window
+	     (get-buffer-window org-last-indirect-buffer)))
+	(if org-last-indirect-window
+	    (delete-window org-last-indirect-window))))
   (if org-agenda-columns-active
       (org-columns-quit)
     (if org-agenda-sticky

  reply	other threads:[~2013-01-22  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 17:21 Muchenxuan Tong
2013-01-21 18:18 ` Achim Gratz
2013-01-22  7:42   ` Muchenxuan Tong [this message]
2013-01-22 13:25     ` Bastien
2013-01-22 13:31       ` Muchenxuan Tong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://orgmode.org

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20130122T083531-135@post.gmane.org \
    --to=demon386@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git