Emacs Help
Name:Emacs
Version:1.2
Last update:2019-02-18 17:51:19



This help file describes the Emacs package.

Introduction

The emacs package provides a set of keyboard shortcuts that mimic those used in the Emacs editor. The emacs editor enjoys wide-spread popularity on unix systems. Pete Keleher acknowledges it as part of the inspiration for Alpha.
When you turn on the Emacs package using Alpha ↣ Global Setup ↣ Features (see
Features Preferences dialog) a number of emacs-like keyboard shortcuts will be made available for every editing window.
The procedures and commands that get keyboard shortcuts through this package primarily deal with: navigation in the text (buffer), text manipulation, and window appearance & positioning for the most part (aside: the use of the word buffer to refer to a text-containing window probably comes from emacs).
A lot of the keyboard shortcuts are unusual compared to those used in "normal" Macintosh editor/word processors, so it is fair to wonder what the advantages of these shortcuts are for those not already used to emacs. Well, the primary advantage is in keeping your hands close to the home keys, you rarely have to move away from the alpha-numeric portion of the keyboard into the arrow, keypad or function key areas if you use this package.

Emacs Submenu

Since the shortcuts/functionality used by emacs may not yet be second nature to you, you can have this package include a submenu under the Edit menu that can serve as a handy reference to jog your memory, and as an alternative method of invoking a desired operation. The inclusion of this submenu is the default behavior of this package, but if they are already second nature to you, or, become so, you can remove it by unchecking Use Emacs Menu in the Emacs Preferences panel dialog.

Emacs Keyboard Shortcuts

The Control modifier (represented by ) is used in a lot of these shortcuts, this modifier is rarely used in other Macintosh applications, but was the first non-ordinary modifier available on early keyboards. Those keyboards had only one Control key, and it was located where the capslock key is today. This kept your hands even more tightly concentrated than the current arrangement, you only needed to stretch your little finger over a tiny bit and then you could make all your Control combinations with ease. Today's keyboards are pretty well standardize with the two Control keys in the lower corners.
This configuration makes these Control combinations a little less convenient, it's more of a stretch away from the home row position and makes the use of one hand to press both the Control key and the 'regular' key a difficult stretch for some combinations. The reason the Control keys have assumed their current configuration is that programmers form a pretty small subset of the people who use computers so the keyboard makers moved those mysterious and "useless" keys out of harms way.
If you do get used to the Control key combinations, there is a bonus as regards Scrolling List dialogs that you may not be aware of, as long as there is a selection in the list, the following key combinations will work: On Mac OS X, all of the multiple shortcuts below start with ⌃X, and then are followed by the indicated key. In some cases, the key must be also be preceded by the modifier key indicated. For example, "⌃X ⌃F" will open an Open File dialog.
This is only a partial list of the shortcuts associated with the emacs package. See the Edit ↣ Emacs submenu for a complete list of the functions and shortcuts or
display the bindings window.

Alpha Shortcuts

⌃X ⌃C
Quits Alpha, prompting to save any open modified files if necessary. Also bound to ⌘Q.
⌃X ⌃F
Opens an Open File standard dialog. Also bound to ⌘O.
⌃X M
Opens a dialog in which you can enter a regular expression to be searched in the current window.

Window Manipulation

⌃X L
Toggles the size of the current window from full to default. Also bound to ⌃/.
⌃X B
Opens a dialog containing all of the current windows. Also bound to ⌃;.
⌃X K
Closes the current window, prompting to save if necessary. Also bound to ⌘W.
⌃X O
If the current window is not a split-pane, switches to the last previous frontmost window. If the current window IS a split-pane, switches to the next pane.
⌃X ⌃S
Saves the current window. Also bound to ⌘S.
⌃X ⌃W
Opens a standard Save As dialog.

Text and Cursor Manipulation

⌃X D
Kills the region between the current mark point and the cursor.
⌃X L
Returns a status message displaying the current position (in bytes).
⌃X U
Also bound to ⌘Z. Undo the most recent action.
⌃X ⌃X
Exchanges the cursor point and the previous mark. See the numeric key pad section in the help file Keyboard Shortcuts for more information.
Again, these are only some of the keyboard shortcuts associated with the Emacs package. Many more can be found in the Edit ↣ Emacs menu.

Meta Keys

The other modifier key that emacs had to work with on early keyboards was the Escape key, and, if the keyboard provide it, an additional modifier key that emacs refers to as the Meta key. Not all keyboards had such a modifier, and, if they did, rarely called it the same thing. In this emacs-mimicking keyset, the Option key is used as the emacs Meta key.

Emacs Preferences


The emacs preferences can be accessed with the
Alpha ↣ Preferences ↣ Package Preferences ↣ Emacs panel.
If the preference Emacs Last Word If Touching is turned on, the behavior of a few emacs keyboard shortcut procedures changes. Those procedures are: Those procedures behave as normal except when the cursor is right at the end of a word. In that case, they effect the word they are "touching". I find this convenient as after I have typed a word is the usual point at which I realize that I should have capitalized it. Ditto for the others.

Known problems

Please report any problem or bug you encounter to Alpha's Bug Tracker.

License and Disclaimer

Copyright (c) 1998-2019, the Alpha Community.
All rights reserved.
The Emacs package is free software and distributed under the terms of the new BSD license:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ALPHA COMMUNITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.