Emacs Technical Information (23.1.1)

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 pipe device? Verify no mf_connector.exe or method_finder.exe processes are running!

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]

Things to try Any one of theses may fix your problem.

  • remove TEMP/mfm* files…
  • 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.
  • remove magikc files (For those you have magik files for!)
  • add mf_connector.exe and method_finder.exe to ignore list of antivirus realtime scanning… This is looking like the best solution…

Can't Select F, T, 2, etc

If you can't select the F, T, 2, or other modifiers and you are seeing an error about event-buffer, remove site-lisp/smallworld/swlisp/misc-sw.elc.

Emacs Code Browser (ECB)

ECB Will not Start

  • ecb-clean-up-after-activation-failure: ECB 2.40: Errors during the layout setup of ECB. (error-type: void-variable, error-data: (dframe-xemacsp)) There are 2 dframe.el(c) files in the 23.1.1 package: Emacs-23\lisp\dframe.el and Emacs-23\site-lisp\cedet-1.0pre6\speedbar\dframe.el(c). You want the latter… I renamed Emacs-23\lisp\dframe.el to Emacs-23\lisp\dframe1.el and things worked for me… May be able to finagle the EMACSLOADPATH.

Emacs Utilities

  • To recursively byte compile EL files: C-u 0 M-x byte-recompile-directory (Remember to remove site-lisp/smallworld/swlisp/misc-sw.elc)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License