Wednesday, December 15, 2010

Finding Emacs - to Word Wrap or to Truncate

When I started using Emacs, which was only a few months ago when I discovered org-mode, I spent a little bit of time working out how to organise the word-wrap of text files.

The menu selection "Options>Line Wrapping in this Buffer" has the answer.
  • Truncate lines simply means that the line will continue until you terminate the line and you will only see a small amount of it in the window.
  • Visual Line Mode is what we typically think of word wrapping in the window.
  • Wrap at Window Edge is another line wrap mode which appears to work, however I prefer the previous two modes as I'm using the editor.
Remember, you will probably have to set the wrap manually.

.... unless .... you have learnt to set the modes and variables per file.

Finding Emacs - Dired (Directory Editor)

  • Allows you to perform actions on files and directories, with the feedback to you displayed on a buffer.
  • Can be closed with the File>Close menu.
  • Can be opened with the " C-x d " keyboard command, or with the File>Open Directory menu command.

I mention Dired here, since we will use it when we byte-compile some of the Elisp files upon adding additional modules or updating existing ones.

:)

Tuesday, December 14, 2010

Finding Emacs - Encryption

v 0.3
It is quite easy to use encryption with Emacs.  Ensure you have gpg installed - under Windows, you can either install gpg for windows, or install it through Cygwin.  Under OSX and Linux, gpg will most probably already be installed.

So, if you have Windows, download and install gpg for windows or install Cygwin with gpg

In any event, add these lines to your " init.el " file


;; Encryption - symmetric gpg
(require 'epa)
(epa-file-enable)


  • Any file with the ending " .gpg " will be taken as encrypted.
  • When you open or save such a file, you will be asked for a password.
  • If you use orgmode, then a file of the format " filename.org.gpg " will be taken as ormode and encrypted.

This will result in a symmetric encryption scheme - you will need to provide the password to open the file, and the password twice to encrypt it.  That is it.

Update 28Jan11

After having not used "Aquamacs" and my Mac laptop for some time - because I was at home rather than at work - I discovered that using Aquamacs with "gpg" encrypted files as above brought up the MacGPG interface (which is rather nice).  SO, if trying to use encryption on the Mac doesn't "just work", then you might want to go to MacGPG at sourceforge and download their binary (1.4.9 is the version I've been using).  Apologies for any frustration.

Have you been certified to be let out unsupervised?

Finding Emacs - Spell Check in Windows

Default spell check in Emacs is Ispell.  Well, I had a look and took someone's advice and went with Aspell.  Here are the steps.




The init.el modifications are:


;; Aspell
(setq-default ispell-program-name "c:\\Program Files\\Aspell\\bin\\aspell.exe")


Now all the spell check menu items in Emacs work like a charm.

Do I REALLY need to tell you that you are responsible for your actions?


more later .......