Issues using VCSCommand with MacVim

I tried to use the VCSCommand-plugin for Vim the other day, but I ran into a strange issue: the plugin tried to use an older version of subversion with my working copy, resulting in “this client is too old” error messages.

The setup

I’ve got two copies of Subversion installed on my system: the default that comes with Mac OS X (1.4.4) and the one I manually installed (1.6.9). I have set my $PATH so that 1.6.9 (in /opt/subversion/bin) gets precedence over 1.4.4 (in /usr/bin). It all works fine from the command line.

The problem

I am using MacVim, which is very nice, but it apparently doesn’t know about my 1.6.9 installation and complains. It appears (from running :!which svn in MacVim) that MacVim (or so it seems any OS X app) ignores my $PATH adjustments in .bash_profile. Hence it is unaware of the /opt/subversion/bin/svn executable.

The fix

I tried adding a file with the extra location to the /etc/paths.d directory, as per this suggestion. That worked but did not help, as it appended rather prepended the new location to MacVim’s $PATH. It gave /usr/bin precedence over /opt/subversion/bin.

I then gave up trying to solve this neatly. Instead I configured the plugin around the issue, which still works rather nicely. I included this line in my .vimrc file:

let VCSCommandSVNExec="/opt/subversion/bin/svn"

This tells the plugin which executable to use. This solution is not very portable (the path to svn may very well be different on other machines), but I have not found another way to solve this. Of course I could mess with my Subversion installations, but down that path madness lies, or so I hear. For now, I’m glad I can get on with it.

“…when Apple ties my hands behind my back and lets users punch me publicly in the face without allowing me to at least respond back, it’s hard to get excited about building an app.”
Garrett Murray, creator of the awesome ego iPhone app, on how Apple’s App Store is not helping him at all.

zsh arguments-fu

When using Subversion from the command-line I commonly do:

svn copy ^/myproject/branches/FB-branch1 ^/myproject/branches/FB-branch2
svn switch ^/myproject/branches/FB-branch2

This is a lot of typing. One way of working around this a wrapper around svn to automate these patterns, but another is using shell power. I use zsh, but bash and others can do the same with slightly different syntax:

svn copy ^/myproject/branches/FB-branch1 ^/myproject/branches/FB-branch2
svn switch !!:3

Here !!:3 is the third argument of the last command. Neat!

  • Librarian: There's a problem with this account update. It seems you have changed your default library account password.
  • Me: yes.
  • Librarian: ...
  • Me: I like chaning my passwords every now and then.
  • Librarian: It's not recommended to change your password. No we cannot update your account.
  • Me: ...
  • Librarian: I'll create this extra account for you, and restore its default password. Your password should be the first four digits of your birthday. But don't change it again. It's makes life difficult for all of us.
  • Me: Ehm… thanks?
  • McDonald's employee: here's your burger. You might want to check if it's still good.
  • Me: excuse me?
  • McDonald's employee: you know, try it. I'm not sure if it's still good.
  • Me: I think I prefer a new one, regardless.
  • McDonald's employee: why? It might still be okay!

Using Postbox

I’ve decided to give Postbox a try as my default e-mail client. I love Mail.app’s simplicity, but it has some quirks and I feel I could do better.

Here’s what I like so far:

  • A sleek interface for tagging (called topics)
  • Quick browsing of attachments in a folder or from a contact
  • Archive message immediately with ‘a’
  • Gmail-style conversation view
  • Pretty good and quick search
  • Plug-in potential, although there’s not much available yet.

Here’s what I dislike so far:

  • No global folders, i.e. one inbox, trash, sent and drafts for all accounts
  • Topics don’t seem to be IMAP-portable, so you have to apply tags both at home and at work
  • Message rules can not filter on content, only on message headers
  • The message composer is bulky
  • Integration with Mac OS X is not as good as Mail.app
  • It’s Mozilla-based, not native.

I’m undecided on:

  • Tabbed interface. I’m not used to it, I don’t need it and I don’t use it. But it might grow on me.
  • Editing messages: not sure why I’d want to do that.
  • Facebook and Twitter integration

Postbox does not come for free, while Mail.app and Thunderbird do. So it should really impress be before I switch. I remain unconvinced but hopeful for now.

Attention Deficit Disorder by Ricardo (via gamesdaypodcast)

Attention Deficit Disorder by Ricardo (via gamesdaypodcast)

Test apache configuration syntax

Recently my Mac OS X stock install of Apache failed to launch properly. The regular system preferences interface stopped and started Web Sharing without complaining, but I could not find httpd actually running using ps -ax | grep httpd in the terminal.

I was at a loss to explain why, until I found this little gem that you can use to syntax-test your configuration files with: apachectl -t will report on any errors in httpd.conf or any of your other included files.

It appeared that some time ago when I was attempting a manual upgrade of my Subversion install to 1.6.9 some Apache modules were corrupted. As I have no use for them I disabled them.

That did the trick, and now I’ve got my local development environment up and running again.