I’ve been a fairly regular emacs user for about 4 years, but I’m still a newbie when it comes to customizing emacs and troubleshooting elisp. Recently, I’ve started customizing emacs as my ruby development environment and I’ve learned a few techniques from the folks here in StackOverflow.
For example, some one here told me about C-u C-M-x to instrument a function with edebug and then step thru’ the code. I also figured out that most commands and modes in emacs provide tons of hooks (either functions or regexps or customizable variables) which will provide most of what any newbie would want.
Now I’m greedy – I’m looking for more techniques and tips you’ve used and found useful in the past.
I’ve been a fairly regular emacs user for about 4 years, but I’m still
Share
Those help when you want to debug arbitrarily deep problems. You’ve already discovered
edebug(which is my tool of choice for figuring out other people’s code).describe-functionusually gives you a link to the.elfile (along with line number) where it was loaded. That’s useful to jump to the source of the problem. I often do that, copy out the function, put in somemessagecalls and re-evaluateC-x C-eto have that run instead of the original.Update: This is a little something I picked up from a presentation by John Wiegley.
Let’s you toggle
debug-on-errorwith a single keystroke.