Line-wrapping in Emacs

It’s been a while, but I’m back to Org-Mode again.  This time I’m using it as a convenient and simple way to draft my paper on source levels (exporting to LaTeX).  And of course, since it’s been a while, I’m constantly having to look things up that I’m certain I knew before.  Like line-wrapping.

To use line wrapping where lines are split on the spaces between words (instead of splitting at the screen width regardless of where you are in a word) is much better on the eyes.  To do that, it’s:

cmd-M Visual-Line-Mode

Hey, presto!

And if you don’t want to have to type that in every time, just put the following line in your .emacs file:

(global-visual-line-mode 1) ; 1 for on, 0 for off.

AND… because I love to see what Google Images will kick back, the exact search terms “line wrapping in emacs 23” gave me this:

To a certain friend of mine (you know who you are):  I tried using Bing, but there was nothing nearly this exciting or totally unrelated as this.  Sorry.  Next time!

Emacs encryption

I finally figured out how to encrypt an emacs file – ooooh.  Now I can put all of my secrets into org-mode, and no one will ever know, mua-ha-ha!

Emacs encryption can be done using EasyPG, which comes with Emacs2.3.  So the first thing I did was upgrade to Emacs2.3 from 2.2 using Fink.  A quick aside:  I mistakenly installed the x11 version and kept thinking I had totally broken something because I was impatient when I didn’t immediately see emacs pop up in the terminal.  I also installed GnuPG from fink.

After that it’s easy – just add a .gpg extension onto the file, so something like  When you open it in Emacs, it recognizes that it’s really an org file, and when you go to save it, you just need to give a password to re-open it.  Don’t forget that password!! Here’s what it looks like:

And that’s it.

Finally discovered Evernote

I’ve been meaning to check out Evernote for a while now, but the tipping point was really this morning when I saw Kurt’s post on Facebook about using it to record a meeting.  And generally, if Kurt has an opinion on some tech gadget or software, I’ll listen.  He didn’t actually give an opinion, actually, but it was enough to send me to the App store to see for myself.  It was way cooler than I thought it would be.

You can write notes in all sorts of formats – text, images, websites, web clips, iPhone photos, scans, PDF’s…And you can really easily synch your iphone, ipad, desktop, or laptop anytime you have an internet connection.  You can also access your notes online.  The notes are stored on a server somewhere, but as far as I can tell, the full installation + notes gets installed locally on computers.  I’m not completely sure what happens with iphones and ipads, though, they might just access the cloud directly for everything.

I could go on about it, but there’s lots to find elsewhere on the internet.  But one of my favorite features is the handwritten text recognition.  I tried taking an iphone snapshot of some notes I took during Rip’s Master’s defense today, and then used the iPhone app to upload them to Evernote.  Even with my messy handwriting, it was still able to find some important words.  Here’s an example:

Not bad!  I also like how it can show you a map of where you took certain notes:

I’m probably jumping the gun, but this seems incredibly irresistible to me.  Sorry, Org-Mode!

MobileOrg + Dropbox + iPhone

I did it – and it wasn’t that painful.  The iPhone app is a bit buggy – if you log out of Dropbox and try to log back in, the fields for email and password are messed up.  Also, you have to type “Enter” after typing your password, you can’t just hit the log-in button.  If you don’t do it in that order, it tells you that your email and password combo aren’t working.  Aside from that, the setup for Dropbox was pretty straightforward, and is described clearly here.

I’m still not sure how useful this will be for me, but I’ll try it out for a while.  It’s nice to be able to search quickly by keyword.  I don’t know how often I’ll actually input something via iphone to upload to Dropbox – I guess it will depend on how easy it is.  One thing occurred to me as I was setting it up was that if it does work out for me, I will probably stop using Mercurial.  And to be honest, using Mercurial for my Org-mode files was a bit weird – sort of overkill.  Really just a way to try out Mercurial.

Here’s a little sample of what it looks like on my phone – from something I did back in October.

Org-mode for meeting notes

I couldn’t include this in the main post about the meeting, because it’s really an aside. Anyone who used to read my old blog probably knows that I have recently fallen in love with Emacs Org-mode. It’s wonderful 🙂 I’ve found yet another great reason to love it – taking notes in meetings! I took more than 500 lines of notes in Org-mode. It was included in my main Org-mode log book. But it turns out that people actually wanted to have my copy of the notes (I didn’t say much during the meeting, but too a TON of notes). And I’m pretty sure most people wouldn’t have appreciated an Org-mode file as much as I would. Or even an unformatted flat text file for that matter. So I just extracted the relevant portion into a new Org-mode file, then exported to latex using:

M-x org-export-as-latex

Then, just to make things look at teeny bit nicer, I stuck this at the top of the page:

#+TITLE: Whale Meeting Notes
#+AUTHOR: Michelle Weirathmueller

Then I just ran pdflatex, and immediately had a really nicely formatted document, including a linked table of contents. Beautiful. I love when things like this make my life easier – and also makes it easier for the poor souls who might actually want to sift through the 20-odd pages of notes.

Org-mode deadlines and scheduling

I like how Org-mode is simple enough that I didn’t have to know much to get a lot out of it.  But it’s also nice to slowly learn new things as I go.  For example, I just learned about setting deadlines and scheduling.

To insert a deadline, use:

C-c C-d

This tells Org-mode to list the task (probably a TO-DO item, but doesn’t have to be) in the agenda for that date.

Using the command

C-c C-s

Tells Org-mode that you are planning to start working on the task on a certain date. In the agenda view, this task gets forwarded every day until it is completed.