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)


Smallworld Code Browser

Related to ECB

I was receiving an client_connect_done: ReadFile: Error 109 on the MagikSF prompt while using the class browser with Igor-macs 23.1.1 using ECB. It would result in a unresponsive class browser buffer and mf_connector.exe "stop working message". This occurred after restructuring the directory path to emacs & images.

A possible solution was recompiling the ecb.el file with the longer install directory… When I did this, Things started working…

Another thing is that once you get this error, you may need to exit ALL emacs executables currently running. maybe something gets screwy in the pip device?

Igor said I may be able to avoid the compilation of the ecb.el file by replacing (require 'ecb) - replace it with (load "ecb.el") in site-lisp\custom-lisp\custom_lig.el.[1]

Probable Solution Shortened the directory structure. When I shortened the directory structure leveraging the Windows subst command, it seemed to start working. My guess it is the embedded paths of the source files in the MF file were causing the problem.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License