Feed on

Archive for the 'Emacs' Category

when trying to install emacs using macports on my new snow leopard install, i got the following error: foo://opt/local/sudo port install emacs —>  Computing dependencies for emacs —>  Fetching emacs —>  Verifying checksum(s) for emacs —>  Extracting emacs —>  Applying patches to emacs —>  Configuring emacs —>  Building emacs Error: Target org.macports.build returned: shell command […]

To make emacs color code by default in Terminal when you’re working on your Mac, add this to your ~/.emacs file. ;; turn on font-lock mode (global-font-lock-mode t) (setq font-lock-maximum-decoration t) or to toggle color within emacs, just type: M-x font-lock-mode thanks to sean clarke for this!

block indent / dedent in emacs

to indent or dedent a block of text in emacs, first set a markpoint: C-space move the cursor to the end of the block, and then hit: C-c-> to indent or C-c-

it’s been a bit of a hassle getting emacs to read python files in python-mode.  in spite of downloading a python-mode file and putting it in my boot path, emacs still refused to enter python mode.  i kept getting the error message: file-error “Cannot open load file” “python-mode” turns out the problem was that i […]

spell-check keyboard shortcut in emacs

you can spell check in emacs with the command: $ M-x ispell-buffer however, that’s not very convenient to do over and over; to create a shortcut to the spell-checker, add the following to your .emacs file: (global-set-key “\C-c” ‘ispell-buffer) when you restart emacs, you’ll find that pressing ctrl-c will instantly pull up the spellchecker.

how to auto-indent in emacs

one of the reasons why i use emacs, as opposed to just a vanilla text editor, is that it auto-indents your code. all you’ve got to do is ask it to do so nicely. just highlight the region of code you want indented (control-space at the beginning of the text block, then move the blinking […]

add a goto-line command to emacs

it boggles the mind that emacs – famous for having a bazillion keyboard shortcuts – doesn’t have one for quickly finding a line. so, here’s how to make one. go to your home directory in the terminal: >> cd and open up the .emacs file that lives there. add the following line of code to […]

More blogs about http://desk.stinkpot.org:8080/tricks.