Fork me on GitHub
#emacs
<
2022-12-11
>
Darrick Wiebe07:12:49

I occasionally end up with a non-responsive emacs... 😳 When I do that and find that repeatedly pressing Ctrl-g does nothing, I go for the killall -USR2 emacs , which usually breaks out, pops a debugger and lets me recover. The problem is, after I do that, emacs starts throwing up debugger windows as I'm working. For instance in this state if I do projectile find file, it pops up an ivy file finder, and if I change my mind and press Esc, up pops the debugger. This is annoying, and I haven't been able to figure out how to stop it except by restarting emacs, which I don't want to do. I've tried all of these, but none of them fix the problem. Anyone have any idea what could try?

(setq debug-on-error nil)
(setq debug-on-event nil)
(setq debug-ignored-errors ())
(setq debug-on-message nil)

Benjamin C07:12:39

(setq debug-on-quit nil) ?

Darrick Wiebe08:12:08

Oh, that was it, thanks! Somehow I missed the existence of that one!

1
borkdude12:12:17

In clojure-mode, can I fold an if "then" branch if it becomes to large? so I can see the "else" branch?

lispers-anonymous21:12:03

Have you tried hs-minor-mode? if enabled, a command call hs-hide-block should work

👍 1
lispers-anonymous21:12:01

hs-show-block would then reveal it

borkdude21:12:13

excellent, that works :)

catjam 1
borkdude12:12:21

I don't use vi keybindings

Jeongsoo Lee18:12:04

Why is this elisp expression evaluating to "it's hoho" ?

(cond ((equal 'hihi 'hihi) "it's hihi"
       (equal 'hihi 'hoho) "it's hoho"))

Jeongsoo Lee18:12:15

(equal 'hihi 'hihi)  ; => t
(equal 'hihi 'hoho)  ; => nil
so, the above expr should evaluate to "it's hihi"!

Jeongsoo Lee18:12:19

Ah, stupid me. The correct syntax is

Jeongsoo Lee18:12:22

(cond ((equal 'hihi 'hihi) "hihi")
      ((equal 'hihi 'hoho) "hoho"))

Hermann08:12:59

In fact it should be

(cond
  (equal 'hihi 'hihi) "hihi"
  (equal 'hihi 'hoho) "why's it hoho?"
  :else        "we're in trouble")

Jeongsoo Lee17:12:11

Nope, the clauses should be separated in their own forms:

(cond
  ((equal 'hihi 'hihi) "hihi")
  ((equal 'hihi 'hoho) "why's it hoho?")
  (:else        "we're in trouble"))
Note the extra parens.

❤️ 1
Erick Isos19:12:46

The @U03KLA1A00K version is the Clojure syntax 😞 yours is emacs-lisp as you said, just keep adding parentheses until it works.

Hermann07:12:36

Yes, I overlooked it's elisp - my bad 😁

Jeongsoo Lee18:12:47

Syntax for cond in Clojure and Elisp got mixed in my brain