I use emacs.
;; Mail address (apply 'string (mapcar '1- (append "mbzopsAhnbjm/dpn" nil)))
I’m an old casual emacs user, but a recent emacs convert. I started using emacs more seriously when I started working on Vimpulse, that I don’t maintain nor develop anymore, but always use.
Luckily it has found a better maintainer than me ☺
I am the author of Enotify and its Rspec/Rails/Watchr plugin, contained in the espectator ruby gem - the gem hosted on rubygems.org is actually named rspec-rails-watchr-emacs. I’m using emacs both on windows 7 and linux. I sometimes lurk on #emacs as ale`.
Accessing GMail on Windows using Gnus can be a little tricky. I had to google for hours to find a working configuration. I use Cygwin’s openssl to access my inbox, and msmtp to send messages through GMail’s smtp server. Here’s my configuration:
(setq message-send-mail-function 'message-send-mail-with-sendmail) (setq sendmail-program "msmtp.exe") (setq message-sendmail-extra-arguments '("-a" "ale")) (setq mail-host-address "gmail.com") (setq user-full-name "Alessandro Piras") (setq user-mail-address "firstname.lastname@example.org") (setq mail-default-reply-to "email@example.com") (load-library "nnimap") (setq imap-ssl-program "c:/cygwin/bin/openssl.exe s_client -ssl3 -quiet -connect %s:%p") (setq gnus-select-method '(nntp "news2.open-news-network.org")) (add-to-list 'gnus-secondary-select-methods '(nnimap "gmail" (nnimap-address "imap.gmail.com") (nnimap-server-port 993) (nnimap-authinfo-file "~/.authinfo") (nnimap-stream ssl))) (add-to-list 'gnus-secondary-select-methods '(nntp "news.gmane.org"))
This is my authinfo file, where I store gnus authentication information:
machine news2.open-news-network.org login firstname.lastname@example.org password nntppassword machine imap.gmail.com login email@example.com password gmailpassword port 993
Msmtp needs a configuration file. The authentication information is stored there:
account ale host smtp.gmail.com tls on tls_certcheck off auth on user firstname.lastname@example.org password gmailpassword port 587 logfile c:\users\ale\msmtplog.txt
I’m using EmacsW32, version 24. So I don’t know if this bug only arises for me, but if autojoin is activated, I get an error about erc-autojoin-enable being undefined. I solved the problem with an ugly kludge. I put this line at the beginning of my .emacs:
(defun erc-autojoin-enable (&rest args) (interactive) nil)
This is the rest of my erc-related configuration, minus the output of customize:
(load "~/.ercpass") (require 'erc) (require 'erc-join) (require 'erc-services) (erc-services-mode 1) (setq erc-prompt-for-nickserv-password nil) (setq erc-nick '("laynor" "laynor`")) (setq erc-nickserv-passwords `((freenode (("laynor" . ,freenode-passwd-laynor) ("laynor`" . ,freenode-passwd-laynor))))) (defun erc-freenode-laynor () (interactive) (erc :server "irc.freenode.net" :port 8000 :nick "laynor"))
The ~/.ercpass file contains a line like this one:
(setq freenode-passwd-laynor "myfreenodepassword")
I configured some extra keys to get folding on Vimpulse. I don’t really know if this has been obsoleted by the current Vimpulse, but I still have it in my .emacs:
(define-key viper-vi-global-user-map (kbd "z M") 'hide-body) (define-key viper-vi-global-user-map (kbd "z A") 'show-all) (define-key viper-vi-global-user-map (kbd "z a") 'show-subtree) (define-key viper-vi-global-user-map (kbd "z m") 'hide-subtree)
[new] Just found out this has been obsoleted by the new Vimpulse.
I use FixmeMode and love it. I would have liked some kind of TODO/FIXME comment tracking like the one I get in Visual Studio, but I didn’t find one, so I hacked some elisp code that makes things easier for me. It searches for all the occurrences of fixme-mode’s keywords in all the open buffers whose major mode is the same as the current buffer, which works nicely with [[Slime?]]’s open-system functionality.
(require 'fixme-mode) (defun get-same-mode-buffers () "Get all the buffers having the same Major mode as the current buffer" (interactive) (remove-if-not (lambda (buf) (eql (with-current-buffer buf major-mode) major-mode)) (buffer-list))) (defun fixme-occur () "Finds all the occurrences of the fixme keywords in all buffers having the same major mode as the current buffer" (interactive) (multi-occur (get-same-mode-buffers) fixme-keyword-re-string)) (fixme-mode 1)
In the Slime REPL, filename completion on windows didn’t work nicely. Hitting tab completed the filename inserting the absolute path, and since I had spaces inside the filename, I only got partial completion and couldn’t hit tab anymore to complete the full filename. I found this in the lispbox sourcecode:
(defun slime-maybe-complete-as-filename () "If point is at a string starting with \", complete it as filename. Return nil iff if point is not at filename." (if (save-excursion (re-search-backward "\"[^ \t\n]+\\=" nil t)) (let ((comint-completion-addsuffix '("/" . "\""))) (if slime-when-complete-filename-expand (comint-replace-by-expanded-filename) (comint-dynamic-complete-as-filename)) t) nil))