From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Abrahams Subject: Bug: [patch] Fixes behavior of org-agenda-tree-to-indirect-buffer [7.8.02 (release_7.7.796.gc512)] Date: Fri, 17 Feb 2012 22:48:13 -1000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ryfxs-00045F-3X for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 03:48:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ryfxq-0003c2-H3 for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 03:48:20 -0500 Received: from mail-pw0-f41.google.com ([209.85.160.41]:62559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ryfxq-0003br-Cb for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 03:48:18 -0500 Received: by pbcwz17 with SMTP id wz17so4860832pbc.0 for ; Sat, 18 Feb 2012 00:48:16 -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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ This function was misbehaving in a number of ways. The enclosed patch represents the changes necessary to make it work properly, accumulated over several weeks of testing. Sorry if the description is a bit vague. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-behavior-of-org-agenda-tree-to-indirect-buffer.patch >From c5128d1666e5fbe29a2fdfd6ee51622f05c42e9b Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 17 Feb 2012 22:44:13 -1000 Subject: [PATCH] Fix behavior of org-agenda-tree-to-indirect-buffer --- lisp/org-agenda.el | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 780794e..0c32b48 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7202,16 +7202,19 @@ use the dedicated frame)." (if (and current-prefix-arg (listp current-prefix-arg)) (org-agenda-do-tree-to-indirect-buffer) (let ((agenda-window (selected-window)) - (indirect-window (get-buffer-window org-last-indirect-buffer))) + (indirect-window + (and org-last-indirect-buffer + (get-buffer-window org-last-indirect-buffer)))) (save-window-excursion (org-agenda-do-tree-to-indirect-buffer)) (unwind-protect - (progn - (unless indirect-window + (progn + (unless (and indirect-window (window-live-p indirect-window)) (setq indirect-window (split-window agenda-window))) (select-window indirect-window) (switch-to-buffer org-last-indirect-buffer :norecord) + (org-set-visibility-according-to-property) (fit-window-to-buffer indirect-window)) - (select-window agenda-window))))) + (select-window agenda-window))))) (defun org-agenda-do-tree-to-indirect-buffer () "Same as `org-agenda-tree-to-indirect-buffer' without saving window." -- 1.7.5.4 --=-=-= Content-Type: text/plain Emacs : GNU Emacs 24.0.92.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2011-12-22 on bob.porkrind.org Package: Org-mode version 7.8.02 (release_7.7.796.gc512) -- Dave Abrahams BoostPro Computing http://www.boostpro.com --=-=-=--