emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Eddward DeVilla <eddward@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Re: Bug fix release 4.59
Date: Fri, 8 Dec 2006 17:21:20 +0100	[thread overview]
Message-ID: <7cddc9287b42f5dcc347ec159b010b87@science.uva.nl> (raw)
In-Reply-To: <b71b18520612080800t3eb63c0bw9cbf5df50e0126cd@mail.gmail.com>

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

  parent reply	other threads:[~2006-12-08 16:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08  8:59 Bug fix release 4.59 Carsten Dominik
2006-12-08 15:26 ` J. David Boyd
2006-12-08 15:37   ` Carsten Dominik
     [not found]     ` <b71b18520612080800t3eb63c0bw9cbf5df50e0126cd@mail.gmail.com>
2006-12-08 16:21       ` Carsten Dominik [this message]
2006-12-08 16:35     ` J. David Boyd
2006-12-08 17:58       ` Xiao-Yong Jin
2006-12-08 20:44         ` J. David Boyd
2006-12-08 16:38 ` Tim O'Callaghan

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://www.orgmode.org/

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

  git send-email \
    --in-reply-to=7cddc9287b42f5dcc347ec159b010b87@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=eddward@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).