TILiE (Today I’m Learning in Emacs): PDF Publishing, Text Formatting in Org-Mode, and (Maybe) My Next Big Project!

Independent Publishing

Figure 1: By Another Believer (Own work) [CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0) ], via Wikimedia Commons

Link to original image | Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)

The last week or so has actually been pretty busy in my personal life and at work. Professionally, I gained a new part-time consulting client which is only going to make me busier. I believe the trick will be staying organized and focused (and trying to get enough sleep…).

I did have a bit of time to do a bit of learning about Emacs and Org-Mode. What I now refer to as the most awesome time saver I’ve discovered so far is M-q. According to the GNU Emacs Manual, Section 25.5.2, M-q does the following:

The command M-q (fill-paragraph) fills the current paragraph. It redistributes the line breaks within the paragraph, and deletes any excess space and tab characters occurring within the paragraph, in such a way that the lines end up fitting within a certain maximum width.

Basically making all my lines in a paragraph line up correctly to the window I have open is a simple key combination. Before, I was laboriously deleting and adding spaces to invoke the same function, a line at a time. I practically broke out in maniacal laughter at work when I figured this out. 🙂

I also fixed export and publishing to PDF issue I mentioned in my last post. Once again, the Internet came to my rescue and provided me with a good answer. I found an old post from 2010 on the emacs-orgmode Archives that solved my exact problem. I noticed that when I tried to export and publish from org-mode (using C-c C-e) I kept getting what appeared to be a LaTex error in an error buffer stating that I was missing a wrapfig.sty file:

! LaTeX Error: File `wrapfig.sty’ not found.

Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty)

Enter file name:

The thread went on to state that you could fix the problem by installing the texlive-latex-extra package from the LaTeX supplementary packages and by adding (require 'org-latex) to my .emacs configuration file. A quick search through the packages that are supported by Mageia 5, my Linux distribution, and I was able to get the right RPMs installed. The second task required a quick edit to my .emacs file (init.el). Another call to C-c C-e and I got my PDF. Again, I had to suppress maniacal laughter and festive dancing in my cubicle.

This has been my observation in general around solving issues with Emacs and Linux this time around. So many good people have documented the problems they’ve found and their solutions to them that you can usually plug an error message you get into Google and your solution is almost always the first or second search result. This is so much less frustrating than when I was in university a mere ten years ago and couldn’t find any help, online or otherwise. Most issues I just gave up on if one of my classmates didn’t have an idea. It’s either that or I’ve gotten smarter. I’m pretty sure it’s the former. 🙂

Now that I can remove the PDF publishing issue from my list of problems I need to look into I have a few other issues I’d like to research:

Using org-agenda more effectively:

I noticed that you can export as an iCalendar from org-mode. Does this mean we can sync org-agenda with Google calendar? If that’s possible that would be huge. It would mean I could much more closely integrate working with Emacs and Org-mode into other tools I used heavily, like the many features from Google.

Going mobile with Org-mode

I found MobileOrg for Android so I should, theoretically, be able to sync my Org-mode files with my Android phone. This would a another huge step towards integrating Org-mode and Emacs into other tools I use everyday. Another option that I would love is to easily be able to import notes from Evernote into Org-mode. I use EverNote a lot when I’m away from my laptop. Being able to pull in my notes from EverNote would be a major efficiency for me. From what I can see, someone’s created an Emacs interface for Evernote (credit to a post by Sasha Chua for pointing me to the repository). From my initial perusal of the README.md file on the site, it looks like I’ll need some understanding of the Ruby programming language, specifically “gems” (?). I’m not sure I want to start digging into another programming language at this point. (Update: Ruby libraries or gems don’t seem to be too complicated but I’ll still have to fiddle with them. We’ll how much time I have for this…)

GTD: Getting Things Done

As I mentioned a few posts ago, I want to look at GTD: Getting Things Done which is a book written by David Allen. There’s an implementation in Org-mode by Charles Cave that I’d like to look at. I just need to find the time to get to it. (I think that might be irony maybe…)

[Next Big Project???] Configure Emacs Custom Syntax Highlighting for PC Gen Files

I don’t think I’ve mentioned this here before but I enjoy and play role-playing games (RPGs), mostly Pathfinder and mostly as a Game Master (GM) these days. I actually use Org-mode to keep track of my campaign’s details. Another tool that I use is a community-developed open-source RPG Character Generator called PC Gen. It currently maintains its code base on GitHub including the data files that drive the rules engine. I’d like to contribute to the project in some way (I’ve donated money in the past) so I was thinking of becoming a data monkey. Of course, I’d like to use Emacs as my text editor but someone hasn’t created a language mode file for it yet. Based on the list of language mode files for others editors (including vim >.< ) on GitHub, I should be able to reverse-engineer something for Emacs.

Again, the Internet has plenty of useful tutorials to help create your own language mode files for Emacs. If I can reverse-engineer one of the other files I like the syntax colouring of into a set of requirements, I should be able to recreate the syntax highlighting in Emacs for the PC Gen data files. Holy cow, I think I have my first big project!

I guess that’s all I’ve got for now. Hopefully, I’ll have time to look into some more of the list of things I want to investigate. Then, I can blog some more about what I’ve learned.

Thanks for reading!

Useful Links

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: