Title: reread-file Ref: sub3 Author: Thomas Hundt Date: 2001-08-23 Note that this is now supported in the July 2001 release; this macro may be used as a replacement. One thing I do a lot is look at logfiles in ME. It's fast loading and searching speed and seemingly limitless capacity (unlike vi ["window too wide"] and Notepad) make it wonderful for this. Naturally, as a power user, I want it all, and in this case the feature I need is an ability to reload a file. So I cooked up the following to reread a file: ==== reread_file.emf start =================================================== ;------------------------------------------------------------ ; reread-file: reload the current file (w/ safety prompt) ;------------------------------------------------------------ define-macro reread-file set-variable #l1 $window-aline set-variable #l2 $buffer-fname !if &bmod "edit" !if &iseq @mc1 "Buffer has been changed; reread anyway [y/n]? " "yYnN" "n" !abort !endif !endif 0 delete-buffer $buffer-bname ; force destroy (prompting user doesn't work in macro) ml-write &spr "[Rereading %s]" #l2 find-file #l2 #l1 goto-line !emacro !force global-bind-key reread-file "C-x f" ==== reread_file.emf end ===================================================== Date: 2000-03-14 Original submission. First revison of this code replaced with the above.