Saturday, August 9, 2008

Emacs Word Wrap

Real word wrapping in emacs isn't automatic, but here's how it can be done. I found these instructions at http://lispy.wordpress.com/2007/07/12/dark-secrets-of-emacs-word-wrapping/. It's not perfect; despite the comments on that website, I don't yet know how to make word-wrap work after vertical splitting. First, get longlines.el and put it somewhere. Then, add the following lines to your .emacs:

(load "/path/to/longlines.el" t t)
(autoload 'longlines-mode "longlines.el" "Minor mode for editing long lines." t)
;; Uncomment the next line to wrap by default in text mode
;;(add-hook 'text-mode-hook 'longlines-mode)

To activate manually, do M-x longlines. More info at http://www.emacswiki.org/cgi-bin/wiki/LongLines.

Adding An Emacs Menu

Here's some template code for adding a menu item to the main emacs menu bar. I don't know hos this works; I just use it as a template!

;;;;;;; Add items to menu bar
(modify-frame-parameters (selected-frame) '((menu-bar-lines . 2)))
;; Make a menu keymap (with a prompt string)
;; and make it the menu bar item's definition.
(define-key global-map [menu-bar MyMenu] (cons "MyMenu" (make-sparse-keymap "MyMenu")))
;; Define specific subcommands in this menu.
(defun MyMenu-linkify() (interactive) (replace-regexp "^\\(.*\\)$" "\\1
"))
(define-key global-map
[menu-bar MyMenu linkify]
'("Linkify" . MyMenu-linkify))
(define-key global-map
[menu-bar MyMenu truncate]
'("Truncate em" . toggle-truncate-lines))

Sunday, August 3, 2008

Linux Brain Games

These involve the mind in some way... I like to do Blinken and Gnomine.

Chess. These engines are way too hard for me.
  1. Gnuchess
  2. Crafty
Memory
  1. Blinken
Quick Thinking
  1. Gnomine
  2. KSirtet
  3. Tetravex
  4. Gnome Sudoku
Uncategorized
  1. gtans (Tangrams)
  2. Code Breaker / Gnomermind (Mastermind clones)
  3. Klotski/Gnome Klotski
Free Online
  1. Happy Neuron free games
  2. MyBrainTrainer has a test and one free puzzle every month
Commercial
  1. The Amazing Brain Train (has a demo)