From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Patches for agenda exiting commands Date: Sat, 03 Jan 2015 12:25:59 +0100 Message-ID: <87sifs6r7c.fsf@nicolasgoaziou.fr> References: <87iogog4xu.fsf@kmlap.domain.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7MpK-0004FS-3p for emacs-orgmode@gnu.org; Sat, 03 Jan 2015 06:25:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7MpG-0007Gd-K0 for emacs-orgmode@gnu.org; Sat, 03 Jan 2015 06:25:01 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:36334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7MpG-0007GL-Ds for emacs-orgmode@gnu.org; Sat, 03 Jan 2015 06:24:58 -0500 In-Reply-To: <87iogog4xu.fsf@kmlap.domain.org> (Kyle Meyer's message of "Fri, 02 Jan 2015 18:04:29 -0500") 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: Kyle Meyer Cc: Org-mode Hello, Kyle Meyer writes: > I've attached a few patches related to the agenda exiting commands. Thank you. I applied patches 1, 2 and 3. > Subject: [PATCH 4/5] org-agenda: Track last indirect buffer > > * lisp/org-agenda.el (org-agenda-tree-to-indirect-buffer): Record last > indirect buffer for agenda. > * lisp/org-agenda.el (org-agenda-quit): Delete window for > org-agenda-last-indirect-buffer, not org-last-indirect-buffer. > > If an indirect buffer for an Org subtree was present as a window, > org-agenda-quit deleted this window regardless of whether it was created > from the agenda. Introduce a new variable, > org-agenda-last-indirect-buffer, that is specific for the agenda (and > perhaps a particular agenda buffer, if org-agenda-sticky is set). > > org-agenda-quit checked for indirect buffers while org-agenda-Quit did > not. There doesn't seem to be any reason for this difference in > behavior, so make org-agenda-Quit treat windows for indirect buffers the > same way as org-agenda-quit. Nitpick: in commit messages, prefer the present tense. > +(defvar org-agenda-last-indirect-buffer nil) Please provide a docstring for this new variable. > Subject: [PATCH 5/5] org-agenda: Fix issues with restoring windows > > * lisp/org-agenda.el (org-agenda-prepare-window): Update window > configuration even when agenda buffer exists in background. > * lisp/org-agenda.el (org-agenda-Quit): Use buffer value for > org-agenda-pre-window-conf to allow for local values used with sticky > agenda buffers. > * lisp/org-agenda.el (org-agenda-quit): Reset local, not global, value for > org-agenda-pre-window-conf. > > The pre-agenda window configuration was not being updated, resulting in > a window configuration other than the one prior to the most recent > agenda call being restored, in the following cases: > > - The user exited or buried the buffer without using q, Q, or x. > - org-agenda-sticky was non-nil and the user buried the buffer with q. > This was because the global, not buffer-local, value for > org-agenda-pre-window-conf was not being reset. > > Also, when org-agenda-sticky was non-nil, pressing Q (org-agenda-Quit) > restored the global, not the buffer-local, value for > org-agenda-pre-window-conf. > > Along with these changes, merge the duplicated functionality in > org-agenda-quit and org-agenda-Quit. Present tense, please. Also, the commit message lacks the creation of `org-agenda--quit'. Regards, -- Nicolas Goaziou