From orgmode to asciidoc (OR: ditching emacs)

Hello people,

I’m back. The portal will open in 3…2…1...

OK, here are some updates. After taming the beast for two long years, I’m now slowly ditching emacs from my life.

# archers, don't struggle yourselves!
sudo pacman -Rnsc $(pacman -Qdt emacs)
# *ntoo users, don't lose opportunity cost regarding precious compiling time!
sudo emerge -vC emacs && sudo emerge -avuDN @world && sudo emerge --depclean -a

Emacs doesn’t simply go out and we are done here. No, no, no. Rehab, guys. Org-mode was a fellow companion, now what? I even moved out of wordpress just to blog with org files[1]. Orgmode is the most amazing to-do / organizing / planning / tracking tool I’ve ever used, however it is completely tied up to emacs.

The only thing we can do about that is to get all the knowledge and discipline that orgmode teached to us, and then move on.

And I moved on.

I’m now slowly converting my text formatting habits to Asciidoc. It is an oldie (2002+) thing, but people are still using it, and very well, by the way.

Asciidoc is not a replacement for markdown[2], but rather a full-featured text formatting tool — markdown is KISS.

I also found a nice[3] tool to blog from an asciidoc file directly to WordPress; and it is called…blogpost, you are right. It was created by the same author of asciidoc, so you can probably conclude it is reliable.

OK, goodbye for now, till next time.


[1]: now you realize this was useless, since I moved back to WordPress. But at least I learned some Hakyll and Haskell in the process.

[2]: neither the other way around.

[3]: not sure if it is really nice, but if you can see this footnote, then I can guarantee you the tool still works. Update: actually, the tool works indeed, but it doesn’t play nice with footnotes.

From orgmode to asciidoc (OR: ditching emacs)

[Video] How do I blog with org2blog?

TL;DR Video link: Vimeo. YouTube.

This is my blogging workflow with WordPress, Emacs and org2blog.

Example markup:

  • bold
  • italics
  • code


sudo apt-get update && sudo apt-get upgrade

A new section.

Text in the new section.

Another section.

Text in another section.

Those are usually the formatting and commands I most use. There are others, of course, but this is usually a fast (and comfortable!) way of writing.

You should also notice that Emacs automatically break lines for me!

Now, let’s post this post. I’ll post the video link soon.

[Video] How do I blog with org2blog?

Storing passwords as plain text…no, wait


Sometimes we might need to store some sensible information as plain text. By plain text I mean using no fancy stuff or third-party programs: the information should be easily retrievable via a terminal or a text editor.

So, what we can do in this scenario? One such option is to create a my_secret_file.txt then populate it with your important dada. Of course, you’ll be saving it in your Desktop folder, where everyone with access to your computer/account will be able to read it, right? No!

I have to confess I once did it (with the exception of the Desktop part…of course, a folder such as Documents/passwords doesn’t help either). Nothing too much important, but it was a password, damn. So, as we value more our data, we find a KISS way to complete the same task.

Show me the code…er, the way

In this post I’m documenting how to use Emacs + GnuPG + Org-mode to encrypt your sensible information. Warning: I do not recommend to store your passwords this way, because it is annoying to keep retrieving frequent used information from a text editor; this method should be used only when you need to store passwords you won’t be retrieving too much. Does it looks reasonable? Okay, so let’s proceed.

Here are the requirements list:

  • Emacs 23+
  • Org-mode (should be shipped by default with a recent emacs, if not, access
  • GnuPG – I’m also assuming you already have a gpg key. If not, see my previous posts (1), (2), for example.

All of those are easily obtained in a Linux or *BSD machine. If you are on Windows, Emacs can be easily installed with chocolatey, but I’m not sure about GPG, you should try this yourself.

Now, you should add something like this to your .emacs file:

(require 'org-crypt)
(setq org-tags-exclude-from-inheritance '("crypt"))
(setq org-crypt-key "A905373C")

The only line you should change is the last one: you should reference your GPG Key instead of mine. If you don’t know what this means, you should read more about OpenPGP.

Now, I’m showing you the results via a mini screencast:

Notice this encrypted information could be shared on the web; but nobody would be able to decrypt it without your private PGP key.

Just use the :crypt: tag for the entries you want to have encrypted; that’s it.

Storing passwords as plain text…no, wait

Everything Orgmode (OR: orgmode everywhere)

I’ve just fallen in love with the amazing orgmode. What the hell is this? I talked about it before: it is a super add-on (mode) for Emacs, where you can organize, note and plan just every thing and aspect of your life. I’m not describing it here in more details; if you want to peek through its features, just access this page.

I’d just like to share some of my (current) usages of it:

  1. Once I published in this blog that “Favoritos são o terror” (something like ‘bookmarks/links are the worst’). Well, not anymore! Now I feel so much comfortable organizing my bookmarks with orgmode + version control (git). Before: I used to throw every bookmark in a different folder in my browser (that was both with Firefox and Chromium). My conclusion: this is so bad. Please just don’t do that. It is better to save nothing than to save everything. Now, storing my bookmarks in plain text and with version control, I have complete control of them. There is also a bonus: focus. By design (of orgmode), these bookmarks will not get into my way when they are not needed.
  2. I use orgmode to publish posts in this blog (this one is an example!), thanks to org2blog. Believe me, this is much faster than logging into wordpress and trying to format everything there. Of course, sometimes I still use the wordpress web interface. But org2blog is (by far) more comfortable, and faster.
  3. I’m beginning to convert every TODO list that I have scattered through everywhere into a few .org files. By adding these files to the org agenda I can easily keep track of every goal and things I have to do. This is boosting (for now, just a little, since I’m migrating my workflow) my productivity and fighting with my stress.
  4. Finally, my main motivation: I’m organizing and tracking my progress with a list of things to study using orgmode.

Once I asked myself if learning Emacs would be a wise choice. Today I can look back and say: yes, it was. Just for orgmode. Do not underestimate the powers of the unicorn.

Everything Orgmode (OR: orgmode everywhere)