Under MS Windows,
you should define a HOME
environment variable
(e.g., C:\Users\username\
).
Under Linux, HOME
should already be defined.
You can add something like -geometry 80x40+100+25
to the
Shortcut Target
to specify the initial size and position
of the Emacs window.
(I'm not actually sure where to do this after using the
installer for Emacs 27.2.)
Emacs can be customized using a .emacs
file in one’s home
directory and .el
files in
in the directory ~/.emacs.d/lisp/
.
These are my customizations:
The following table summarizes the emacs key bindings that I use, as defined
in pen.el
. They are patterned
after BBN's PEN text editor:
The caret (or circumflex accent) character (^
) is used
to indicate control characters. For example, ^a
signifies
holding down the Control
key while pressing the
a
key.
The Single column lists single-character
commands. The following three columns list commands which consist of
two characters: ^x
, ^y
or ^z
followed by another character.
The table does not include the use of the arrow keys, backspace
key, etc; nor the
use of whatever menus may appear on the screen; nor all of the commands
that can be invoked use ^[ x
.
The strongly emphasized entries are those that I use most often, and that might be considered as fundamental.
Single | ^x | ^y | ^z | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
^a | Beginning of line | Save all buffers | (undefined) | Beginning of buffer | ||||||||||||||||||||||||||||
^b | Backward one character | List buffers | (undefined) | Move line to bottom of window | ||||||||||||||||||||||||||||
^c | (html-helper-mode commands) | Quit | (undefined) | Re-centre | ||||||||||||||||||||||||||||
^d | Delete character at cursor | List directory | Deactivate mark | Down half a window | ||||||||||||||||||||||||||||
^e | End of line | (undefined) | (undefined) | End of buffer | ||||||||||||||||||||||||||||
^f | Forward one character | Find file (after ^u) | (undefined) | (undefined) | ||||||||||||||||||||||||||||
^g | Gobble word to right | (undefined) | Get region | (undefined) | ||||||||||||||||||||||||||||
^h | Help | (undefined) | (undefined) | Home (beginning of window) | ||||||||||||||||||||||||||||
^i | (tab) | Indent region | (undefined) | Insert/Overwrite mode | ||||||||||||||||||||||||||||
^j | (line feed) | (undefined) | (undefined) | Search backward (after ^u) | ||||||||||||||||||||||||||||
^k | Kill line | Edit keyboard macro | Kill region | (undefined) | ||||||||||||||||||||||||||||
^l | Left one word | Call last kbd macro | (undefined) | Scroll left | ||||||||||||||||||||||||||||
^m | (carriage return) | (coding-system commands) | (undefined) | (undefined) | ||||||||||||||||||||||||||||
^n | Next line | Set goal column for ^n & ^p | (undefined) | Next screenful | ||||||||||||||||||||||||||||
^o | Open space | Delete blank lines | Open region | (undefined) | ||||||||||||||||||||||||||||
^p | Previous line | Mark page | Put region | Previous screenful | ||||||||||||||||||||||||||||
^q | (see ^\) | |||||||||||||||||||||||||||||||
^r | Right one word | Re-highlight (redraw) | (undefined) | Scroll right | ||||||||||||||||||||||||||||
^s | (see S) | |||||||||||||||||||||||||||||||
^t | Toggle characters | Clear modification flag | (undefined) | Line to top | ||||||||||||||||||||||||||||
^u | User argument | Re-use user argument | Unkill region | Up half a window | ||||||||||||||||||||||||||||
^v | (html-insert commands) | Find alternate file | (undefined) | Split window vertically | ||||||||||||||||||||||||||||
^w | Wipe word to left | Write file | (undefined) | Split window horizontally | ||||||||||||||||||||||||||||
^x | (^x commands) | Run command shell | Exchange pos'n with mark | … | ||||||||||||||||||||||||||||
^y | (region commands) | (undefined) | Set mark | (undefined) | ||||||||||||||||||||||||||||
^z | (^z commands) | Exit & save | (undefined) | Other window | ||||||||||||||||||||||||||||
^\ | Quote | (undefined) | (undefined) | (undefined) | ||||||||||||||||||||||||||||
^] | Search forward (after ^u) | Save buffer | Shape of region | (undefined) | ||||||||||||||||||||||||||||
^[ | Meta | … | (undefined) | (undefined) | ||||||||||||||||||||||||||||
S | (self-insert) | Save buffer
Shape of region
| Incremental search fwd
| (
| Start macro
| Blink matching open
| (undefined)
| )
| End macro
| (undefined)
| (undefined)
| L
| Count lines on page
| Convert region to lower case
| (undefined)
| U
| Undo
| Convert region to upper case
| (undefined)
| =
| Show cursor position
| (undefined)
| Show cursor position
| 1
| Single window
| (undefined)
| Single window
| C
| (undefined)
| (undefined)
| Change case sensitivity for searches
| |
^s
and ^q
are not used because
in some contexts they are interpreted as transmission off and on, respectively.
The following table
lists the keystrokes to use after ^v
in order to
insert various HTML character entities. In some cases, pairs of characters
may be entered in either order.
Name | Glyph | Keystrokes |
---|---|---|
ampersand | & | & |
left angle bracket | < | < |
right angle bracket | > | > |
double quotation mark | " | " |
left single quotation mark | ‘ | ‘ |
right single quotation mark | ’ | ’ |
paragraph symbol | ¶ | pa |
British pound symbol | £ | po |
plus-minus symbol | ± | pm |
Name | Glyph | Keystrokes | Name | Glyph | Keystrokes |
---|---|---|---|---|---|
AE | Æ | AE | ae | æ | ae |
OE | Œ | OE | oe | œ | oe |
sz | ß | sz | |||
ss |
Name | Glyph | Keystrokes | Name | Glyph | Keystrokes |
---|---|---|---|---|---|
ETH | Ð | ETH | eth | ð | eth |
THORN | Þ | TH | thorn | þ | th |
Name | Glyph | Keystrokes | Name | Glyph | Keystrokes |
---|---|---|---|---|---|
Aacute | Á | A' | aacute | á | a' |
Acirc | Â | A^ | acirc | â | a^ |
Agrave | À | A` | agrave | à | a` |
Aring | Å | Ao | aring | å | ao |
Atilde | Ã | A~ | atilde | ã | a~ |
Auml | Ä | A\ | auml | ä | a\ |
Ccedil | Ç | C, | ccedil | ç | c, |
Eacute | É | E' | eacute | é | e' |
Ecirc | Ê | E^ | ecirc | ê | e^ |
Egrave | È | E` | egrave | è | e` |
Euml | Ë | E\ | euml | ë | e\ |
Iacute | Í | I' | iacute | í | i' |
Icirc | Î | I^ | icirc | î | i^ |
Igrave | Ì | I` | igrave | ì | i` |
Iuml | Ï | I\ | iuml | ï | i\ |
Ntilde | Ñ | N~ | ntilde | ñ | n~ |
Oacute | Ó | O' | oacute | ó | o' |
Ocirc | Ô | O^ | ocirc | ô | o^ |
Ograve | Ò | O` | ograve | ò | o` |
Oslash | Ø | O/ | oslash | ø | o/ |
Otilde | Õ | O~ | otilde | õ | o~ |
Ouml | Ö | O\ | ouml | ö | o\ |
Uacute | Ú | U' | uacute | ú | u' |
Ucirc | Û | U^ | ucirc | û | u^ |
Ugrave | Ù | U` | ugrave | ù | u` |
Uuml | Ü | U\ | uuml | ü | u\ |
Yacute | Ý | Y' | yacute | ý | y' |
yuml | ÿ | y\ |
Glyph1 is displayed using a Symbol font. Glyph2 is displayed using HTML character-entity names. The latter is more correct but doesn't work in many browsers; the former is inelegant but may work in some circumstances. The variant lower-case characters are even more problematical than the others.
Name | Glyph1 | Glyph2 | Keystrokes | Name | Glyph1 | Glyph2 | Keystrokes |
---|---|---|---|---|---|---|---|
Alpha | A | Α | gA | alpha | a | α | ga |
Beta | B | Β | gB | beta | b | β | gb |
Gamma | G | Γ | gG | gamma | g | γ | gg |
Delta | D | Δ | gD | delta | d | δ | gd |
Epsilon | E | Ε | gE | epsilon | e | ε | ge |
Zeta | Z | Ζ | gZ | zeta | z | ζ | gz |
Eta | H | Η | gH | eta | h | η | gh |
Theta | Q | Θ | gQ | theta | q | θ | gq |
theta | J | ϑ | gJ | ||||
Iota | I | Ι | gI | iota | i | ι | gi |
Kappa | K | Κ | gK | kappa | k | κ | gk |
Lambda | L | Λ | gL | lambda | l | λ | gl |
Mu | M | Μ | gM | mu | m | μ | gm |
Nu | N | Ν | gN | nu | n | ν | gn |
Xi | X | Ξ | gX | xi | x | ξ | gx |
Omicron | O | Ο | gO | omicron | o | ο | go |
Pi | P | Π | gP | pi | p | π | gp |
Rho | R | Ρ | gR | rho | r | ρ | gr |
Sigma | S | Σ | gS | sigma | s | σ | gs |
sigma | V | ς | gV | ||||
Tau | T | Τ | gT | tau | t | τ | gt |
Upsilon | U | Υ | gU | upsilon | u | υ | gu |
Phi | F | Φ | gF | phi | f | φ | gf |
phi | j | gj | |||||
Chi | C | Χ | gC | chi | c | χ | gc |
Psi | Y | Ψ | gY | psi | y | ψ | gy |
Omega | W | Ω | gW | omega | w | ω | gw |
omega | v | gv |
The following table shows three of the coding-system commands,
which are prefaced by ^X^M. The command is followed by the name of the
coding system and then ^M. For example,
^x ^m c mule-utf-16-le ^m
.
c | Specify coding system for the immediately following command |
f | Use specified coding system for the visited file in the current buffer |
r | Revisit current file using the specified coding system (Emacs version 22) |
There are also other coding-system commands.
My current favourite is AUCTeX.
I have been using Nelson Minar's html-helper-mode and G. U. Lauri's version; see also page on EmacsWiki (cf. D. Brierton's suggested extensions from 2002)).
In 2011 Jan, I started considering the use of the HTML Mode built into Emacs (see also HtmlMode in EmacsWiki).
For me, the advantages of the old html-helper-mode (apart from the
fact that I'm used to it) are that it generates time-stamps, and that
it has keystrokes defined for definition lists and for
em
, strong
, code
,
sup
and sub
(and for span
class=menu
that I added myself).
The disadvantages are that it hasn't been supported for a long time, and that it doesn't support the entry and indenting of tables.
((HTML-mode (time-stamp-line-limit . -50) (time-stamp-end . "\\.?$") (time-stamp-format . "%:y-%02m-%02d:%:H:%:M:%:S") (time-stamp-start . "^Last modified: ")))
To get the time-stamp functionality that was provided by
html-helper-mode, for the new HTML mode I created the code
shown at the right, for inclusion in the
directory-variables
file ~/.dir-locals.el
.
(These became available only in Emacs version 23; they do
not work for remote directories, which might become a problem if
I were using the feature whereby they identify the files to which
they apply based on location rather than mode.)
I have not been able to figure out how to get an
initial-caps abbreviated month name from the
date and time formatting specifications.
Here is a list of those particular html-helper-mode
keystrokes that I have been used to using, for comparison with the
newer HTML mode.
Keystrokes | Entity | Notes | Keystrokes [1] |
---|---|---|---|
^C & | & | ^V & | |
^C < | < | ^V < | |
^C > | > | ^V > | |
^C ␠ | | ^C Space | ^V ␠ |
Keystrokes | Tag | Notes | Keystrokes [2] |
^C ^L u | ul | ^C ^C u | |
^C ^L o | ol | ^C ^C o | |
^C ^L i | li (or dt+dd) | ^C ^C l | |
^C ^L d | dl | ||
^C ^L t | dt+dd | ||
^C ^A n | a name= | ^C ^C n | |
^C ^A l | a href= | ^C ^C h | |
^C ␉ | img | ^C Tab | ^C ^C i |
^C ^S e | em | ||
^C ^S s | strong | ||
^C ^S c | code | ||
^C ^S k | kbd | ||
^C ^S m | span class=menu | added by me | |
^C ^P ^ | sup | ||
^C ^P _ | sub | ||
^C ^T1 | h1 | ^C 1 | |
^C ^T2 | h2 | ^C 2 | |
^C ^T3 | h3 | ^C 3 | |
^C ^T4 | h4 | ^C 4 | |
^C ^T5 | h5 | ^C 5 | |
^C ^T6 | h6 | ^C 6 | |
^C ␍ | br | ^C Enter | ^C ␊ (^C ^J) |
␛ ␍ | p | ^[ Enter | ^C ␍ |
[1] Keystrokes defined in my html-ins.el
[2] Keystrokes defined in newer HTML mode