Emacs

From Rohidekar

Jump to: navigation, search

Contents

Files

Commands

  • Quit Emacs - works in terminal mode (emacs -nw) too : C-x C-c

Customization

Apropos

  * *M-x apropos* - *shell.*faces*

ARU Development Tips Page

  * [[1]]


Modes

  * *f1-m* - Gives you information about the current mode
  * *f1-m shell-mode* - Gives you information about the shell mode (e.g. key bindings)

Shells

Directory Resynchronization

  * *shell-resync-dirs* (*M-return*)

Groups

  * *M-x customize-group comint* - Customize the communication interface (e.g. a shell)

Modifying the prompt text

  * You may find that the prompt is really long when you perform a telnet. 
  * This is a limitation in the Emacs shell mode whereby the XTerm title bar text isn't parsed correctly and is dumped as literal text into the prompt
  * You can fix this by running the following shell command:
     * ==PS1='(\u) \W - \s \$'==

Removing the double spacing between lines

  * This is another limitation of the Shell Mode. The cause is unknown.
  * To fix it, perform the following steps: _Note: don't do this before entering the environment which produces the erroneous doublespacing otherwise your normal shell will not have any carriage return at all_
     * ==set-variable comint-process-echoes t==

Replace & with newline

  * When in the minibuffer entering the replacement string, type *C-q C-j* 

Delete vs. Kill

  * Kill copies the victim text to the clipboard (or, more precisely, the kill ring)
  * Delete does not copy the victim text anywhere and is less memory intensive.

Key Bindings

  * *C-M-s* - Regular expression search

Useful commands

  * *sort-lines* - Divide the region into lines and sort by comparing the entire text of a line. A prefix argument means sort in descending order.

Regular Expression Reference

Pattern         Matches
-----------------------------------
.               any single character
\.              one period

[0-9]+          digit sequence
[A-Za-z]+       sequence of letters
[_A-Za-z0-9]+   sequence of alphanumeric char and underscore
[-A-Za-z0-9]+   sequence of alphanumeric char and hyphen
[[:blank:]]+    sequence of tabs and spaces

"\([^"]+\)"     capture text between double quotes 

+               means match previous pattern 1 or more times
*               means match previous pattern 0 or more times
?               means match previous pattern 0 or 1 time

http://xahlee.org/emacs/emacs_regex.html

Installation

Sumo

Configure

In an existing installation, see M-x describe-installation for the configure command used for that installation

./configure  
  'i386-redhat-linux-gnu' 
  '--prefix=/usr' 
  '--datadir=/usr/share' 
  '--docdir=/usr/lib/xemacs-21.4.15/doc/' 
  '--infodir=/usr/share/info' 
  '--libdir=/usr/lib' 
  '--mandir=/usr/share/man/man1' 
  '--with-gpm=yes' 
  '--with-sound=native' 
  '--with-pop' 
  '--mail-locking=lockf' 
  '--with-clash-detection' 
  '--debug=yes' 
  '--with-mule=yes' 
  '--with-canna=yes' 
  '--with-wnn=yes' 
  '--with-xim=xlib' 
  '--with-database=no'
  '--with-postgresql=no'
  '--with-ldap=no'
  '--with-hesiod=no'
  '--with-athena=3d'
  '--with-widgets=athena'
  '--with-menubars=lucid'
  '--with-scrollbars=lucid'
  '--with-dialogs=athena'
  '--with-msw=no'
  '--with-xfs=no'
  '--pdump'

Window Makers

FVWM (Free Virtual Window Manager)

  *   Tarantella & FVWM for ISD Development:
     * [[2]]
  * To set up your environment, run: ==source /arudev/env/dev.cshrc==
  * FVWM is launched via  ==.xinitrc== and ==.xinitrc-fvwm==

Key bindings

  * ==/rh2.1AS/nfs/techstack/local/fvwm-2.4.18/share/fvwm/themes/default/bindings==

Ice WM

Key bindings

  • ==/home/ssarnoba/.icewm/keys==
    • Alt-F3 - task shift (equivalent to Alt-TAB in Windows); toggle through window focus (a bit like ctrl alt tab)
Personal tools