5
votes

I am using Guile in conjunction with Geiser under Emacs while learning how to program in Scheme. I find it actually a hindrance that Guile drops into a debugger each time I make a typo or enter a wrong piece of code. How can I make Guile more tolerant of my typos/errors and skip the debugger, while using it through Geiser under Emacs?

As I get more advanced in Scheme programming, how would I restore the default behavior or else how can I toggle between having the debugger always start vs start only on demand?

2

2 Answers

3
votes

You can set the on-error option to report, and it will simply report the error without dropping you in the debugger (that's the default value, debug); e.g.

scheme@(guile-user)> ,option on-error 'report
scheme@(guile-user)> (/ 1 0)
ERROR: Throw to key `numerical-overflow' with args `("/" "Numerical overflow" #f #f)'.
scheme@(guile-user)> 

See: https://www.gnu.org/software/guile/manual/html_node/System-Commands.html

1
votes

I don't really write a lot of Scheme, but it seems that you can just ignore the debugger.

If you're using lispy to do the eval with e, you don't even see the REPL window, you just get messages in the echo area with the result.

If you set (setq geiser-impl--implementation 'guile), and press e in lispy-mode, it will start a Geiser REPL automatically (if there isn't a live one) and eval the expression.