I noticed that Emacs was getting a
default-directory value of
/ when launching it with a custom keyboard shortcut I set up in Gnome (2). The result is that opening a file started my search in the root (
/) of the filesystem.
I suppose this is due to the way in which emacs was invoked (via the window manager). Given that there was no actual present working directory, I can understand that it would default back to using
At the time I was just setting the window title:
emacs -T Emacs
When considering how to work around this I first considered setting the
default-directory in my
.emacs file. This turned out to be a less an idea solution. Doing so causes it to become a global configuration value (all subsequent emacs launched via the terminal opened in
~). So instead, I changed my launcher command to this:
emacs -T Emacs -eval "(setq default-directory \"~/\")"
Works like a champ!
I realized tonight While hacking on Taboot that Emacs was showing particularly uninteresting files in the completion buffer when opening a file. For example,
I assumed that there was a facility for customizing this, so I did some research on the topic. Trying emacs filter possible completions and emacs filter list of completions both came up with the same documentation. The GNU documentation describes a customization facility similar to the filtering I sought after via the
completion-ignored-extensions variable (part of the Dired group). However, it stops a bit short of what I was looking for. Quote from
describe-variable for the variable (emphasis added):
Completion ignores file names ending in any string in this list. It does not ignore them if all possible completions end in one of these strings or when displaying a list of completions.
I went through some more search results and sure enough, stackoverflow provides again. In that response the author provided a fantastic
defadvice which did exactly what I was looking for. By default it uses the value of your existing
While I’ve been gone from the blogging world I’ve still been working on projects. Mostly I’ve been working on documentation.
Using the Makefile for publishing only requires having xsltproc and dblatex installed. Both of which are available through your favorite package manager.
While searching for modes which would help me edit bind9 configuration files I came across this mailing list post. It mentions
zone-mode which ended up being great for editing the actual zone files A+. It also tipped me off to another emacs Easter Egg,
M-x zone. Described thus:
zone is an interactive compiled Lisp function. It is bound to . (zone) Zone out, completely.
It’s basically an emacs screensaver/psychedelic ascii mode using your focused buffer for content. It obfuscates the buffer in ways which involves wrapping your code around the screen or swapping characters around, and even just turning it all into curly braces and wiggling. Press a key to undo it all. Might be a neat trick to play on a friend, but I see no other usage for this mode.
I’ve been working on my XMPP server pet project recently, and the need for a good Erlang XML parser has finally struck. I decided to go with Erlsom. It’s in MacPorts, so from there I installed it. Now, since I don’t update my port tree frequently I get delightful surprises from time to time. This time installing Erlsom triggered an update of Erlang, to the latest version!
Short story shorter, the update changes the path to the erlang-mode.el file so before you can M-x erlang-mode again you’ll have you fix your Emacs load-path to register the new location. (See my older post on how to initially set up Erlang and Emacs from MacPorts from scratch)
The new load commands should be:
(setq load-path (cons "/opt/local/lib/erlang/lib/tools-2.6.5/emacs/" load-path)) (setq erlang-root-dir "/opt/local/lib/erlang") (setq exec-path (cons "/opt/local/bin" exec-path)) (require 'erlang-start)
It just requires changing the tools-x.x.x to 2.6.5.
p.s. about erlang-mode