You probably heard that emacs can do lots of things, such as running shell, as a file manager, do ftp/sftp, read and send email, read newsgroup forums, and even as a web browser, and lots of other things other than text editing. But you are rather new and don't know how. This page lists some of fun things with simple instructions you can do right away with emacs.
Emacs has thousands of commands. To call a command, type 【Alt+x】.
You can split your window into two or more panes, vertically or horizontally. Call
split-window-vertically to split into top/bottom panes. To split a pane side-by-side, call
split-window-horizontally. To unsplit, call
Spliting Window is available under the menu 〖File ▸ Split Window〗.
To run calendar in emacs, pull the menu 〖Tools ▸ Calendar〗, or call
To close the calendar pane, type q.
To run a calculator in emacs, call
To quit calculator, type q.
To compute “1+2”, type 【1 Enter ↵ 2 +】. Or, you can type the expression directly by starting with a sinle quote, like this: 【' 1 + 2 Enter ↵】.
Calculator can also be started by going to the menu 〖Tools ▸ Programmable Calculator〗.
To convert the decimal 10 to binary representation in calc, type 【10 Enter ↵ d2】. The d2 will display all numbers in the window in the binary form. The numbers will have a
2# prefix to indicate that they are in base 2. To display them back in decimal form, type
d0. To show numbers in octal or hexadecimal form, type
To convert a binary number 1010 to decimal, type
2#1010 Enter ↵ to enter the number then type
d0 to show all numbers in decimal form. Similarly, to enter a number in octal form, precede it with
8# and hexadecimal numbers are prefixed with
To find out what is 40 F° in C°, type 【40 Enter ↵ ut dF Enter ↵ dC Enter ↵】.
Emacs is a excellent tool for file management, such as viewing directory, creating files, copying files, moving files, creating directory, deleting files or directory. Once you become familiar with it, you almost never go back to shell or your operating system's file viewer for these tasks.
To start, call
dired or pull the menu 〖File ▸ Dired〗, then, give a dir path.
For a full tutorial, see: Emacs: File Management, dired Tutorial.
You can also transfer files between different machines connected by a network. The way to do this in emacs is consistent with the way it does directory navigation.
dired and type a directory you want to work with. In this directory, suppose myfile.html is the one you want to upload across the network to the machine on
“example.org” in the directory
/public_html. Suppose your login name for that machine is “jane”.
Here's what you do. Call
dired then choose a source dir. Then move your cursor to the file you want to copy. Type “C” (for copy), then emacs will prompt you for a directory to copy to. Type
/ftp:firstname.lastname@example.org:/public_html. You'll be asked for password, then it'll be copied over.
Once you logged in the ftp server, you can actually edit and save files on the remote server, bypassing all the upload/download pain.
Emacs also allows you to do sftp or ftp over ssh.
(info "(emacs) Remote Files")
To view the many colors and their hexadecimal values in RGB model, call
list-colors-display. This is very useful when you work in HTML.
To use emacs as the OS's command line interface (in Mac OS X, Linux, or Windows), call
shell. Now, you can use emacs just as a shell. The advantage is that, you can have the entire shell's screen output history in your window, and you can copy ＆ paste any part you like, just as if it is a normal text file. Normally in a shell, you can visit past command by pressing the up arrow. But now up arrow moves you cursor to the line above. To show the previous commands you used, press 【Ctrl+↑】.
See: Emacs: Run Shell in Emacs.
Sometime you hear that emacs has the artificial intelligence language LISP built in. That's right. Here's how you can run a short example.
In emacs, open a file, any file. In the file, type
(+ 1 2), then, select the whole text, then call
eval-region. You will see the result “3”. CONGRADULATIONS, you've just evaluated a lisp program!
See: Emacs Lisp Basics.
If you don't know already, IRC is Internet Relay Chat. IRC is a public instant messaging forum that allows a groups of people to discuss things together. Typically, irc topics are about programing languages (Perl, Bash, PHP, HTML, OCaml, …) or tools (emacs, ubuntu, git …).
Yes, you can run IRC in emacs if you are running emacs version 22 or later. To see what version of emacs you have, type “emacs --version” in the command line prompt. Or, inside emacs, call
To start irc, call
irc. Then, you'll be prompted to enter the server name and port and user name, and channel you want to join. For example, use the following:
IRC Server: irc.freenode.net IRC Port: 6667 IRC Nick: imrandomjack Channels: #emacs
then you'll be connected to the #emacs discussion room in the irc.freenode.net server.
Yeah, that's emacs. Some say, it's a operating system. Others say, it's a overflowing kitchen sink.
Life is filled with endless meaningful things to learn, if it is gonna be a fulfilling life.