17 private links
Emacs’s built-in ispell package handles spell-checking and correction, while flyspell provides on-the-fly checking and highlighting of misspellings.
One way to reduce repetitive-strain injury from Emacs is to avoid pressing two keys simultaneously with the same hand. That is, avoid using modifier keys. For C-KEY, use one hand for KEY and the other for Ctrl. For M-KEY, do similarly as for C-KEY, or press and release Esc and then press KEY. And of course, take advantage of the automatic indenting and other features of Emacs that save keystrokes.
Most of the GNU Emacs integrated environment is written in the programming language called Emacs Lisp. The code written in this programming language is the software—the sets of instructions—that tell the computer what to do when you give it commands. Emacs is designed so that you can write new code in Emacs Lisp and easily install it as an extension to the editor.
(GNU Emacs is sometimes called an “extensible editor”, but it does much more than provide editing capabilities. It is better to refer to Emacs as an “extensible computing environment”. However, that phrase is quite a mouthful. It is easier to refer to Emacs simply as an editor. Moreover, everything you do in Emacs—find the Mayan date and phases of the moon, simplify polynomials, debug code, manage files, read letters, write books—all these activities are kinds of editing in the most general sense of the word.)
This page contains snippets of code that demonstrate basic EmacsLisp programming operations in the spirit of the O’Reilly cookbook series of books. For every task addressed, a worked-out solution is presented as a short, focused, directly usable piece of code.
All this stuff can be found elsewhere, but it is scattered about in libraries, manuals, etc. It would be helpful to have here in one spot.
These recipes should be pastable into the scratch buffer so that users can hit ‘C-j’ and evaluate them step by step.
Why Study Emacs Lisp?
Although Emacs Lisp is usually thought of in association only with Emacs, it is a full computer programming language. You can use Emacs Lisp as you would any other programming language.
Perhaps you want to understand programming; perhaps you want to extend Emacs; or perhaps you want to become a programmer. This introduction to Emacs Lisp is designed to get you started: to guide you in learning the fundamentals of programming, and more importantly, to show you how you can teach yourself to go further.
This page contains snippets of code that demonstrate basic EmacsLisp programming operations in the spirit of the O’Reilly cookbook series of books. For every task addressed, a worked-out solution is presented as a short, focused, directly usable piece of code.
All this stuff can be found elsewhere, but it is scattered about in libraries, manuals, etc. It would be helpful to have here in one spot.
These recipes should be pastable into the scratch buffer so that users can hit ‘C-j’ and evaluate them step by step.
There’s going to be some overlap with CategoryCode, obviously. Just link to more elaborate pages when appropriate. Should this page grow too large, we’ll split it up later.
Emacs makes frequent use of the Control key. On a conventional keyboard, the Control Key is at the lower left corner of the keyboard, usually not very large and is pressed by the pinky finger. For those who use emacs all day, this will result in Repetitive Strain Injury. This page lists some tips on avoiding this pinky problem.
All i wanted, is to make Space and Tab and Newline chars visible.
However, the emacs whitespace-mode does much more than that. It is designed for tech geeking control freaks to tune every aspect of white space in his source code. The mode is filled with bells and whistles. It distinguishes tabs mixed with spaces, EOLs mixed with spaces, EOLs at beginning of file, EOLs at end of file, run on spaces at end of line, lines that has nothing to do with white spaces but is simply longer than 80 chars, etc. Each of these is rendered with different foreground, background, colors, so that they cannot possibly escape the notices of control freaks.
This page tells you how to setup emacs's whitespace-mode
(in emacs 23 or later), and how to use it.
whitespace-mode
renders {spaces, tabs, newlines} characters with a visible glyph. This feature is useful for working with “tab separated values” (TSV) that's commonly used format for importing/exporting address books or spreadsheets. It's also useful in whitespace-significant languages such as Python.
To use it, call:
whitespace-mode
→ toggle on/off, for current file.global-whitespace-mode
→ toggle on/off globally for current emacs session.
There is also whitespace-newline-mode
and global-whitespace-newline-mode
. They only show newline chars.
Emacs has a spell checking feature (flyspell-mode), that check spelling errors while you type, much like all other modern editors, word processors, email programs, or text box in browsers. However, emacs's spell checking feature is much worse than the spell checker in browsers or any commercial editor.
Why another e-mail client?
I (the author) spend a lot of time dealing with e-mail, both professionally and privately. Having an efficient e-mail client is essential. Since none of the existing ones worked the way I wanted, I created my own.
emacs is an integral part of my workflow, so it made a lot of sense to use it for e-mail as well. And as I had already written an e-mail search engine (mu), it seemed only logical to use that as a basis.
(with-eval-after-load 'company
(define-key company-active-map (kbd "M-n") nil)
(define-key company-active-map (kbd "M-p") nil)
(define-key company-active-map (kbd "C-n") #'company-select-next)
(define-key company-active-map (kbd "C-p") #'company-select-previous))
Smex is a M-x enhancement for Emacs. Built on top of Ido, it provides a convenient interface to your recently and most frequently used commands. And to all the other commands, too.
Company is a text completion framework for Emacs. The name stands for "complete anything". It uses pluggable back-ends and front-ends to retrieve and display completion candidates.
This mode teaches you to use the proper Emacs movement keys in a
rather harsh manner.
No-easy-keys disables arrow, end, home and delete keys, as well as
their control and meta prefixes. When using any of these keys, you
instead get a message informing you of the proper Emacs shortcut
you should use instead (e.g. pressing down informs you to use C-n).
A fat and quality reference for Emacs, keyboarding and Elisp.
You can customize nXML mode so that / automatically inserts the rest of the end-tag when it occurs after ‘<’, by doing
M-x customize-variable RET nxml-slash-auto-complete-flag RET
and then following the instructions in the displayed buffer.
A very useful list off all the Emacs functions and variables accessible from the web or you mobile. It is also possible to access to this from Emacs itself by invoking describe-function
or describe-variable
.
So while in a dired buffer
C-u s
you can now change switches used by ls. Add h do get a human readable file sizes
You can add other switches too, for example I changed it to -alsh and it now sorts by file size
Also see cutomize-mode and edit "Dired Listing Switches" to -alh