Emacs Extensions for
GE Smallworld Magik Development
Screen-casts, tutorials, and productivity tools for Magik programmers who use Emacs. From tab-mode and code folding to the Magik Debugger and object inspector — explore features built by a developer, for developers.
Learn MoreNine screen-casts published between November 2010 and January 2011 — covering everything from ECB mode to the Tree Item GUI control. Read the story behind the project →
Get in Touch
Magik and Emacs: A Match Made for GE Smallworld Developers
GE Smallworld’s Magik language was designed for specialised geographic information systems, where developers work with network models, spatial data, collections, and long-running enterprise applications. Its object-oriented style is powerful, although many programmers find that a general-purpose editor offers a more comfortable place to write and understand large Magik codebases.
Emacs provides that adaptable workspace. With the right extensions, it can turn Magik development into a smoother daily process, from opening methods and folding implementation details to inspecting objects and moving through unfamiliar applications. For Australian teams supporting electricity, water, transport, telecommunications, and local government systems, that flexibility can make a practical difference across offices, field projects, and remote support sessions.
Why Magik Benefits From Emacs
Magik programs often contain deep method hierarchies, specialised syntax, long source files, and domain-specific conventions. A basic text editor can display the code, but it does little to expose the relationships between classes, methods, mixins, and runtime objects. Emacs can provide a more structured view without forcing developers away from the language’s established tools.
The advantage is especially clear when maintaining mature Smallworld installations. A developer may need to trace a method inherited through several classes, compare custom code with vendor code, or identify where a collection is populated before it reaches a database operation. Emacs commands can reduce the number of manual searches and make those investigations more repeatable.
This matters for Australian consulting teams that support clients across Sydney, Melbourne, Brisbane, Adelaide, and Perth. A developer working from a home office in Perth may be reviewing code with colleagues in Melbourne while a client waits for an afternoon fix. Fast navigation and visible context help keep that session focused, even when the team is spread across several time zones.
Building A Practical Magik Workspace
A useful setup starts with a reliable Emacs installation, the Magik development extensions, and a clear connection to the Smallworld environment. Configuration should make it easy to open Magik source files, recognise language syntax, send code to a running image where supported, and preserve familiar keyboard commands for everyday editing.
The Magik development tools provide a starting point for assembling this environment. Developers can then adapt the configuration to their preferred operating system, project layout, and version of Smallworld. Keeping personal settings in a version-controlled file is worthwhile, particularly when several consultants need similar behaviour across customer engagements.
Australian organisations frequently operate through VPNs, managed laptops, and NBN connections that vary in quality between city offices and regional locations. A lightweight editor with local source navigation can remain useful when access to a remote development host becomes slow. Teams should also document proxy settings, authentication requirements, and the correct way to connect to test images before relying on the setup for production support.
Editing Code With Less Friction
Syntax highlighting is the most visible improvement, but it is only the beginning. A well-configured Magik mode can make method definitions, symbols, comments, strings, and control structures easier to distinguish. This lowers the mental effort required to scan a large file and helps developers spot an unclosed block or misplaced statement before testing.
Code folding is valuable in Magik because a single source file may contain many methods or lengthy implementation sections. Folding lets a developer collapse routine details and see the surrounding class structure. When reviewing a patch, this makes it easier to focus on the changed method while keeping the broader context available.
Emacs also supports efficient editing patterns through keyboard commands, macros, rectangle operations, and search-and-replace workflows. These features are useful when standardising method declarations, updating repeated attribute names, or applying a controlled change across generated or semi-generated code. Careful review remains essential, but the editor can remove much of the repetitive work.
For teams that use the Australian term “arvo” as shorthand for a busy afternoon support window, a small productivity gain can be significant. A consultant who can refactor, search, and validate changes quickly has more time to explain the result to a council, utility, or infrastructure client before the day’s handover.
Navigating Classes And Methods
Method navigation is one of the strongest reasons to pair Emacs with Magik. Instead of searching through directories and opening files one by one, developers can use editor commands to jump between definitions, references, and related source locations. This is particularly useful in systems where naming conventions carry important clues about inheritance and responsibility.
Object inspection adds another layer of understanding. Reading a method tells only part of the story; runtime values, collection contents, and object state can reveal why a process behaves differently for one network feature or dataset. An integrated workflow helps developers move from a suspicious line of code to the relevant object and back again without losing their place.
This style of exploration suits Smallworld work, where a visible problem may sit several layers away from its cause. A map display issue might involve a query, a network object, a collection transformation, and a custom presentation method. Emacs cannot replace domain knowledge, but it can shorten the route through the code.
Teams can make this even more effective by agreeing on source naming, class documentation, and navigation-friendly project layouts. Consistent conventions help a new developer understand a Victorian water authority project or a New South Wales transport integration without relying entirely on informal explanations from the original author.
Debugging And Runtime Investigation
Debugging Magik is most productive when the editor and the running Smallworld environment work together. Developers need a quick way to evaluate expressions, inspect returned objects, examine collections, and test assumptions in a controlled image. Emacs can act as the command centre for these actions while the application provides the runtime context.
A productive debugging cycle is deliberate. First, reproduce the issue with a known dataset. Next, inspect the relevant objects and method arguments. Then, test a small expression or targeted change before altering a larger section of code. Keeping those steps visible in an Emacs buffer creates a useful record of what was tried and reduces repeated experiments.
Source navigation is equally important during a debugging session. Once an exception or unexpected value is identified, jumping directly to the method definition and related callers can reveal whether the problem belongs to custom code, an integration boundary, or an assumption about the data model. This is much faster than relying on a series of broad text searches.
Remote support makes this discipline more valuable. A team in Brisbane may be diagnosing an issue for a mining or utilities client while another engineer in Perth checks an environment with different data. Clear commands, repeatable inspection steps, and captured notes reduce confusion when the people involved cannot sit beside the same workstation.
Working With Collections And Data
Magik collections are central to many Smallworld applications, and they deserve first-class attention during development. Developers may need to check whether a collection is empty, understand its ordering, compare object identities, or verify that a filtering operation has produced the expected members. Emacs can make these investigations easier by keeping source, commands, and notes close together.
Database analysis benefits from the same workflow. When a query returns an unexpected feature or a network relationship appears incomplete, the developer can inspect the query method, follow the data transformation, and evaluate intermediate results. Folding and narrow buffers help keep a long query or processing pipeline understandable while the investigation is underway.
Performance analysis should also be part of the process. A method that behaves well against a small development dataset may become slow when it processes a metropolitan network or a large asset register. Developers can use repeatable test expressions and timing checks to identify expensive iteration, unnecessary object loading, or poorly placed filtering.
Australian infrastructure projects often combine old operational data with newer integrations, which makes assumptions especially risky. Legacy schemas, imported records, and client-specific extensions can produce edge cases that are invisible in a small test image. A visible, inspectable Emacs workflow encourages developers to verify what the data actually contains rather than relying on what it is expected to contain.
Creating A Maintainable Team Workflow
An individual configuration is useful, but a shared workflow creates greater long-term value. Teams should document the supported Emacs version, Magik extensions, connection process, debugging conventions, and project-specific commands. A new consultant should be able to clone configuration files, read a short setup guide, and start navigating the code without guessing.
The configuration should remain understandable. Small, named functions are easier to maintain than a large collection of copied snippets. Comments should explain why a setting exists, especially when it addresses a particular Smallworld release or customer environment. Teams can place common settings in a shared repository while allowing personal preferences for colours, key bindings, and window layout.
A sensible evaluation habit also applies to tools outside the development stack. When comparing unrelated mobile utilities, for example, a review of Android growth alternatives illustrates the broader need to check purpose, compatibility, privacy, and reliability before adopting software. The same questions belong in an Emacs and Magik setup: does the extension solve a real problem, work with the environment, and remain safe to operate?
For Australian consultancies, this kind of documentation supports commercial delivery. It helps estimate onboarding time, reduces dependence on one senior Magik developer, and makes handovers clearer when a project moves between a Sydney office, a Canberra client site, and a remote engineer in regional Queensland.
Choosing The Right Development Approach
Emacs is not the only way to work with Magik, and the best choice depends on the team’s requirements. Some developers may prefer the familiar Smallworld environment for runtime operations and use Emacs mainly for source editing. Others may want a deeper integration that brings navigation, inspection, and command evaluation into one workspace.
| Capability | Basic Text Editor | Smallworld Environment | Emacs With Magik Extensions |
|---|---|---|---|
| Magik syntax support | Limited or configurable | Usually available | Purpose-built and configurable |
| Code folding | Varies | May be limited | Strong support for structured files |
| Method navigation | Manual searching | Available within the platform | Fast, keyboard-driven navigation |
| Runtime inspection | Separate workflow | Closely integrated | Can connect commands with source work |
| Customisation | Usually modest | Governed by the platform | Extensive and scriptable |
| Team portability | Easy to install | Depends on licensed environment | Shareable configuration with local adaptation |
| Best fit | Quick edits | Platform-focused operations | Daily development and investigation |
The strongest arrangement is often complementary rather than exclusive. Developers can retain the Smallworld tools required for application behaviour, deployment, and runtime administration while using Emacs as a highly productive source and analysis environment. That division respects established operational controls without giving up modern editing capabilities.
Before rolling it out, test the workflow against a real project. Check syntax recognition, method lookup, code folding, runtime communication, VPN behaviour, and access controls. A short pilot with representative Magik classes and collections will expose practical issues more reliably than a demonstration using a small example file.
Magik developers who invest in this approach gain a workspace that reflects how they actually investigate software: by moving through objects, methods, data, and runtime behaviour. Explore the available extensions, adapt them to your Smallworld environment, and make the resulting configuration part of the team’s documented development practice.
Core Features
Tab Mode & ECB
Quick tab switching and Emacs Code Browsing mode for navigating Magik codebases efficiently.
Magik Smeller
Code analysis tool that helps identify potential issues in Magik source files.
Code Folding
Hide/Show mode for collapsing and expanding Magik code blocks to focus on what matters.
Visual Bookmarks
Quick visual bookmarks for jumping between key locations in your Smallworld session buffers.
Object Inspector
Inspect Magik objects and display them in an Emacs Deep Print buffer for detailed examination.
Magik Debugger
Set breakpoints and monitor slots and variables directly from within Emacs.
Development Tools
Direct links between Emacs and the Smallworld Development Tools application, including Click Monitor.
Screen-casts & Tutorials
Screen-cast 1: Tab Mode, ECB & More
Covers tab-mode, ECB, Magik Smeller, code folding, visual bookmarks, pragma toggling, moving code, external editor, and MS Explorer.
Screen-cast 5: Object Inspection & Deep Print
Inspect a Magik object, prompt for an expression evaluated within a Smallworld session, and display results in a Deep Print buffer.
Screen-cast 7: Magik Debugger
Useful tools for application developers: Object Inspector and Magik Debugger with breakpoints and slot/variable monitoring.
Screen-cast 9: Tree Item GUI Control
Tree Item is a GUI control providing extensive facilities for displaying lists with rows, columns, trees, and in-place editing.