From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Bug fix release 4.59 Date: Fri, 8 Dec 2006 17:21:20 +0100 Message-ID: <7cddc9287b42f5dcc347ec159b010b87@science.uva.nl> References: <9ce50c217f40006757bb465f672d8f74@science.uva.nl> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GsiTa-00062s-Ow for emacs-orgmode@gnu.org; Fri, 08 Dec 2006 11:21:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GsiTY-0005z9-7x for emacs-orgmode@gnu.org; Fri, 08 Dec 2006 11:21:30 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsiTY-0005yw-06 for emacs-orgmode@gnu.org; Fri, 08 Dec 2006 11:21:28 -0500 Received: from [146.50.4.51] (helo=imap.science.uva.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GsiTX-00073r-DP for emacs-orgmode@gnu.org; Fri, 08 Dec 2006 11:21:27 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eddward DeVilla Cc: emacs-orgmode On Dec 8, 2006, at 17:00, Eddward DeVilla wrote: > For me, on my work desktop I pretty much only restart emacs to get > the newest versions of org-mode after testing them out on my laptop. > :-) > > Think it would work if I wrote a function to reload org and then > iterate through the buffers, restarting org-ode in the org-mode > buffers or would the function still hold on to the version of org that > was active when it was called? Would there be an easy/automated way > to restart the agenda buffer without messing up the buffer-window > mapping? For sure this would work, if you take some care like actually selecting the *window* displaying the agenda before refreshing it. Something like (untested): (defun org-upgrade () "Reload org.el and renew the mode in all applicable buffers." (interactive) (load-library "org") (let ((buffers (buffer-list)) (cwin (selected-window)) (org-inhibit-startup t) ; avoid re-folding of the buffers buf win) (while (setq buf (pop buffers)) (when (buffer-live-p buf) (with-current-buffer buf (and (eq major-mode 'org-mode) (org-mode))))) (when (setq win (get-buffer-window org-agenda-buffer-name)) (select-window win) (org-agenda-redo)) (select-window cwin) (message "All buffers upgraded to org-mode version %s" org-version))) - Carsten