I will give this a try. Thanks!! -- Javier "Joakim Hove" wrote in message news:4yr7zfqsm1.fsf@skjellgran.ii.uib.no... > > "Javier Oviedo" writes: > > > Hello all. I like to call a function that would "reload" all buffers that I > > have open...with the exception of buffers that have been modified but not > > yet saved. Can someone help me out with this? Thanks in advance. > > This is at least a start: > > (defun reload-all-buffers () > (interactive) > (dolist (buffer (buffer-list)) > (if (and (buffer-file-name buffer) ;; Ignoring buffers like *scratch* and *Messages* > (not (buffer-modified-p buffer))) ;; Ignoring buffers which have been modified > (let ((file (buffer-file-name buffer))) > (if (file-exists-p file) ;; Checking that the file still exists > (save-excursion > (set-buffer buffer) > (revert-buffer t t))))))) > > > HTH - Joakim > > -- > /--------------------------------------------------------------------\ > / Joakim Hove / hove@bccs.no / (55 5) 84076 | \ > | Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 | > | CMU | 5231 Paradis | > \ Thormøhlensgt.55, 5020 Bergen. | 55 91 28 18 / > \--------------------------------------------------------------------/