Sunday, May 15, 2011

goodbye openoffice, hello abiword

I don't often use Word Processors. Instead I edit text. I like emacs for lots of editing and vi for quickly tweaking a configuration file. If I had to make something look nice I'd type set it with LaTeX. However, I have recently been collaborating with people sending me .doc files. I used to save them as text, edit them in emacs, and import them back into openoffice but the overhead from loss of formatting was making it not worth it so I started just using openoffice but the key-bindings were the hardest part; e.g. my muscle memory thinks that Ctrl-f moves the cursor forward and shouldn't open up a Find/Replace dialog. Openoffice refuses to accommodate vi or emacs key bindings but I found that AbiWord does (successfully using AbiWord 2.8.6). Also, AbiWord is smaller than openoffice so it's faster. I didn't have luck changing the key-bindings by just doing what's described on the AbiWord FAQ, instead I got it working as described in a linuxgazette.net mailing list.

Monday, April 25, 2011

tried spice

I tried a spice desktop today from my Fedora client:
sudo yum install spice-client
spicec -h $server -p $port -w $passwd
shift-ctrl-f12
It really works. The image of my VM was less than 100M since it's stored in qcow2 format. This also allows images given to each user (one per port) to inherit software updates to the master image (requires qcow2 images to go offline).

Link: How To Safely Store A Password

http://codahale.com/how-to-safely-store-a-password/

Thursday, April 7, 2011

flymake & pyflakes

I am writing Python using flymake in Emacs with pyflakes as described in chrism's blog entry on Flymake Mode for Emacs / Python.
cd ~/elisp
wget http://cvs.savannah.gnu.org/viewvc/*checkout*/emacs/emacs/lisp/progmodes/flymake.el?revision=1.2.4.41
mv flymake.el\?revision\=1.2.4.41 flymake.el
easy_install pyflakes

add the following to .emacs:

  (when (load "flymake" t) 
         (defun flymake-pyflakes-init () 
           (let* ((temp-file (flymake-init-create-temp-buffer-copy 
                              'flymake-create-temp-inplace)) 
              (local-file (file-relative-name 
                           temp-file 
                           (file-name-directory buffer-file-name)))) 
             (list "pyflakes" (list local-file)))) 

         (add-to-list 'flymake-allowed-file-name-masks 
                  '("\\.py\\'" flymake-pyflakes-init))) 

   (add-hook 'find-file-hook 'flymake-find-file-hook)