Emacs Technical Information

This page describes some cool tricks and tips about Emacs useful by Smallworld Developers.


Igor Lapitski with Hyde Park Consulting has an Enhanced Emacs for Smallworld. Some people call it 'Igormacs'. This has cool extensions that allow easier buffer control and code completion. Emacs 23 download Summary of Extensions Parent Dir


Locking/Freezing Buffers

Do you want to "lock" your emacs buffer in one location? This snippet of code allows you to "freeze" any buffer. If you freeze all the buffers of the current frame it will open a new window for the new buffer. This is great to dedicate 1 emacs window with two buffers for the Magik prompt and the class browser! This is similar to the ECB compile window w/o the ECB functionality… This works with the standard Emacs from GE…

;; From http://stackoverflow.com/questions/5151620/how-do-i-make-this-emacs-frame-keep-its-buffer-and-not-get-resized
;; This section should be put into .emacs or some other file read during startup.

;; Not sure what the next 2 lines do
(defadvice pop-to-buffer (before cancel-other-window first)
  (ad-set-arg 1 nil))
(ad-activate 'pop-to-buffer)

;; Toggle window dedication
(defun toggle-window-dedicated ()
  "Toggle whether the current active window is dedicated or not"
   (if (let (window (get-buffer-window (current-buffer)))
         (set-window-dedicated-p window 
                                 (not (window-dedicated-p window))))
       "Window '%s' is dedicated"
     "Window '%s' is normal")

;; Press [pause] key in each window you want to "freeze"
(global-set-key [pause] 'toggle-window-dedicated)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License