HowTo Change camelCase() to camel_case() with Emacs

Go to the top of your file, unless you want to do regexp replace in many files, then press Meta-Ctrl-% to enter regexp-replace mode. Then enter the following:

   \([a-z]+\)\([A-Z]\)
Then press <CR> and enter the replacement text:
   \1_\,(downcase \2)

The trick to use Emacs lisp was found here.

Update: For an even better ways of dealing with CamelCase, see the EmacsWiki topic. :-)

Wednesday, 10 February 2010 at 08:50 | /emacs | permanent link to this entry

The mobile phone was turned off, OFF!

I was just alerted to an article in Swedish daily newspaper Dagens Nyheter (DN) that talked about an 18 year old man disappearing in the town of Varberg last night. The actual piece is a missing persons notice, which is always sad and worrying, but the real kicker was at the end:

"His mobile phone, that had been turned off, could be restarted remotely ..."

WTF?! When I turn my mobile phone off, it is supposed to stay OFF! Who came up with the bright idea to have the function to be reactivated by remote, and who in their right mind gave this certain someone permission to do so?

Unfortunately comments seem to be disabled for this article in DN.

OK, so the original story seems to have been somewhat retracted, and the Police claim to be confounded about the earlier statement made by the, so far unnamed, telecommunications company.

Even though it might be confusing to some people, I will still be removing the battery when I want to make sure my mobile is off!

Sunday, 07 February 2010 at 19:57 | /misc | permanent link to this entry