As a busy developer I end up working on several projects, documents & books at the same time. I want a simple way to capture notes where I don’t have to worry about formatting. I also want to keep a track on all the things I am working on. As I do most of my coding & writing with Emacs, then I was sure it had something that could help.
Emacs is a really powerful tool for Clojure development, although without a guiding hand it can be a bit of a learning curve. Using the Emacs Live its really simple to get a fully featured development environment for Clojure. I will show you how to get Emacs Live installed and how to start using it for Clojure.
Emacs is fun to configure and if you have the basics of LISP or Clojure then its pretty easy too. After reading how to replace the text on the modeline I decided to customise my mode-line to make it more efficient for Clojure development. I’ll cover how I tweaked the mode line and added this customisation to my Emacs Live based configuration.
In part one I showed how easy it is to version a project using Git from within Emacs, using the Magit package. This time we look at the git log within Magit.
Working with the log gives you a lot more detail about your changes, helps you compare local and remote repo commits. All of which helps you understand when you should push your code.
Getting to grips with Git was not to much of a learning curve, although I found it quicker to work on the command line than using graphical tools. Using
git status and
git log made it easy to keep a handle on my code changes.
As I do most of my Clojure development in Emacs, it was great to discover I could drive git from Emacs using Magit. What follows is a flow through the first steps with Magit.
In part two I look at Git logs with Magit
Even though I use
.gitignore files to control common files that should not be committed to a git repository, its very easy to forget about the backup or temporary files that my development tools generate. As these auto-generated files are development tool specific, they are not always included in a
Especially when you are under pressure to commit changes or deploy your code its easy to include a few things you dont need, especially when using the commands
git add . or
git commit -am "".
So when I discovered the idea of using a
.gitignore_global file, I quicky adopted this and saved myself a lot of time with this simple approach.
I love using Emacs for Clojure development, although as I add to my configuration file I noticed start-up times have grown by a few milliseconds, which can feel like a life time when you have just thought of a new idea.
The Fill minor mode will wrap your text so the lines dont become too long. Whist this is good for code, it puts in hard line breaks for your text which you would have to remove if copied into your blog post.
If you are using emacs to write the content for your blog you probably want to turn off the
Fill minor mode, as this seems to be on by default when using Emacs 24 and the Emacs starter kit.
Easiest way for the new starter is to use the right mouse button to select the mode options on the control bar at the bottom of the buffer you are working in.
For those who enjoy the keyboard, fire up the macro
auto-fill-mode to toggle the mode on and off.
If you would like to have a keyboard oriented lifestyle but are still learning Emacs, press the key combination
auto-fill-mode and press return. This toggles the mode, so if its on it switches it of and vice versa.
On a Linux PC, Meta-x is the keyboard combination Alt-x, on MacOSX it is Option-x
Happy Emacs fun!
This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket