Tag: Emacs

  • Developing for Open Source Languages on Windows the Better Way

    When working with php, rails, python, etc, windows is sufficient, but definitely leaves something to be desired. The ports of these languages are definitely second class. With Microsoft’s backing php support with IIS is improving, but it’s not the same. And usually you are going to deploy those apps on a linux/bsd web server, so […]

  • Emacs on Windows Over SSH with Putty Tools

    With a little help from StackOverflow, I got emacs over ssh working on windows. This is trivial on mac/linux, but can be a challenge on windows. dired mode works too! To summarize: 1. Download putty installer with all the tools. 2. Put putty install in the path 3. Generate a key with PuttyGen 4. Copy […]

  • Keeping Temporary Files Out Of The Way In Emacs

    Found some very useful emacs info in this this blog post. Put the following into your config and your temporary and autosave files will not clutter up your project directory. (defvar user-temporary-file-directory (concat temporary-file-directory user-login-name “/”)) (make-directory user-temporary-file-directory t) (setq backup-by-copying t) (setq backup-directory-alist `((“.” . ,user-temporary-file-directory) (,tramp-file-name-regexp nil))) (setq auto-save-list-file-prefix (concat user-temporary-file-directory “.auto-saves-“)) (setq […]

  • Caps Lock to Control Key in Ubuntu

    I like to remap my caps lock key to an extra control key (this can be common practice in the emacs world).  It’s closer to the common keys that are paired with control.  And besides, I only ever turn on caps lock by mistake.  Recently, while installing Ubuntu on a box, I was looking for the […]

  • “wc”-like Unix Command in Emacs Lisp

    Inspired by reading a Steve Yegge blog post. (require ‘cl) (defsubst wc-whitespace-char? () “is current character whitespace?” (not (looking-at “[A-Za-z0-9]”))) (defun wc-buffer (b) “count words in a buffer” (interactive “bBuffer to Analyze “) (let ((word-count 0) (in-word nil) (char-count 0) (line-count 1)) (save-excursion (set-buffer b) (beginning-of-buffer) (while (not (eobp)) (if in-word (if (wc-whitespace-char?) (setq in-word […]