As my aversion to all things rodent orientated increases and my use of Emacs grows so too does my use of org-mode.
Org-Mode probably doesn’t need any introduction. It can be used for pretty much any sort of organising you require, from sketching out blog posts (this article was drafted in Org-Mode before being published to WordPress) to a full productivity and GTD suite.
The Emacs tip this week isn’t about highlighting all the useful features Org-Mode has to offer, but instead it is more of a “How-to-Learn” rather than a “How-To”.
In my daily Emacs activities I open a lot of files. However, during the week I am normally opening the same files as I’m generally working on the same stuff. Emacs’s Recent Files (recentf) feature generates a list of my recently used files and allows me to display that list so I can quickly open any of them.
To enable recentf mode, add the following into your Emacs init file (which you are version controlling right?)
If you use Tramp a lot you may want to disable the auto-cleanup command for Recentf. This is simply because every now an then, if enabled, the auto-cleanup feature scans a list of your recent files, and tries to stat them to see if they should remain in the list. Obviously, if it tries to stat any remote files this may cause your system to temporarily hang.
;; recentf stuff(require 'recentf)(setq recentf-auto-cleanup 'never);; disable before we start recentf!(recentf-mode 1)(setq recentf-max-menu-items 25)(global-set-key "\C-x\ \C-r" 'recentf-open-files)
Now use Emacs for a bit to generate a list of your recently used files. Next time you open Emacs, simply hit C-x C-r and you’ll be greeted with a list of your recently used files.
As some of you know, whilst Emacs is my editor (et al.) of choice my favourite window manger is Awesome. Awesome is, according to the website,
.. extremely fast, small, dynamic and heavily extensible using the Lua programming language
I’ve never delved into Lua before, but since using Awesome I’ve had to play around with a bunch of config files. They have always looked very clean and simple so, this weekend, with a spare couple of hours to kill I thought I’d have a play around with Lua and see if Awesome really is as “heavily extensible” as the claims make out.
A couple of weeks ago I set up real time web analytics on a number of sites with Clicky. Clicky have an incredibly simple API which I thought would be perfect to play around with.
I decided to try and build a widget that displays the total visitors and actions for a specified website. Really simple, but also quite useful. I had never written anything in Lua before, or even played around with widgets too much in Awesome. Fortunately both Awesome and Lua made the whole thing fantastically easy and fun. What follows is the code I wrote, use it if you want to, it’s just an example of what I did with my first attempt, so feel free to extend it as you want.
This first tip is something that I’m seeing more and more people do, especially with the excellent Emacs Starter Kit aiming to get Emacs newbies up and running quickly:
Version control your emacs.d directory.
This technique is especially useful if you have a number of development machines that you work from (desktop, laptop, remote server). This is the reason why I started to version control my .emacs.d directory. Whilst my configuration is still very basic (for now) I find it invaluable.
Whilst it is useful to version control your configuration file, a happy side effect of the increasing prevalence of services like GitHub is that you can see other Emacs users’ setups. It is great to look at these, borrow some ideas and lean some new techniques. After some Googling, I’ve quickly compiled the list below from GitHub, which is by no means exhaustive:
As regular readers of my poor, infrequently updated blog may know my editor of choice is the wondrously magnificent Emacs. One of the reasons I like Emacs is because there is so much more to learn. I can easily imagine that one could spend every day for a whole year learning a new technique, mode or snippet within Emacs and still not come close to learning all there is to know about it.
Sadly, I’m not dedicated enough to learn a new tip every day.
However, I am going to try and learn one a week. My aim is to pick up a new Emacs top tip, use it for a week and post about it here on my blog. This should hopefully increase my knowledge of Emacs and server as a repository of this information.
So, tune in every Monday for my Emacs Tip of the Week!
For those that can’t wait, there are loads of great places for all things Emacs out there. Check out:
I’ve head a lot of stuff about Tumblr recently and how easy it is to update. As you can see from the blog you’re reading right now, I need all the help with keeping things up-to-date so I thought I’d give it a try, so I did.
Obviously, being the lead tech geek at Jabbakam I had to do something involving IP cameras, so I found an old Axis camera we had lying around the office, pointed it at the birdbox we have at home and started recording. BerlinBirdbox was born.
If any of our feathered friends decide to make our little birdbox their home, hopefully the camera will record it, upload it to Jabbakam and then I can post it onto Tumblr. I might even mash up the APIs to get it to auto post…. but possibly another day!
Following from my dependencyhellproblems the other day my new version of MySQL seems to have all its stored procedures corrupted, displaying the following message when any of them are executed:
Cannot load from mysql.proc. The table is probably corrupted
After a bit of research, I found the simple fix is to run
mysql_upgrade
Problem solved.
Posting it to my blog as a reminder to me to RTFM, and just in case it is useful to some other poor soul out there.
As NodeJS v0.4.0 is out, I thought I’d have a play around with it (something I haven’t done in a very long time!)
Instantly I ran into problems:
$ ./configure
Traceback (most recent call last):
File "/Users/greim/nodestuff/node/tools/waf-light", line 157, in
import Scripting
File "/Users/greim/nodestuff/node/tools/wafadmin/Scripting.py", line 146
except Utils.WafError, e:
^
SyntaxError: invalid syntax
I’m trying to install this on my Arch Desktop, which has Python version 3.1.3 installed. After someresearch I found that it was a compatibility issue between Python 2.x and 3.x.
I didn’t really want to remove Python 3 as I’d had dependencyhellrecently. Inspired by an answer on StackOverflow, I had a dig about in my /usr/bin directory to see if there was both Python v3 and Python v2 installed. Fortunately there was: /usr/bin/python2
The past few months I have spent most of my time head down, working on a number of projects. In work, I spend most my time in Emacs, which has been my editor of choice for just over a year. Over the past year, my knowledge of Emacs, and my associated productivity is improving all the time. However, the Emacs universe is so vast there is no possible way to know everything, or every little command (or even every “big” command).
My tactic recently has been to try and learn one new useful tip each day, whether it is switching to ibuffer instead of the normal buffer mode, or trying to use M-^ (delete-indentation) more. Whilst trawling through the Emacs Wiki or a list of command references may be a good way to find some useful stuff, a better way is to let someone else do all the hard work for you!
So here are three blogs that I have found great for general Emacs related tips and tricks: