emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp assertion for debugging


From: Bruno Barbier
Subject: Re: Elisp assertion for debugging
Date: Sun, 19 Jun 2022 21:11:55 +0200

Ypo <ypuntot@gmail.com> writes:

> I am trying to debug my init file: C-u prefix is not working.
>
> I am using the elisp-bug-hunter package that has saved me many times in 
> the past. But it doesn't work fine this time though, so it seems I need 
> an “assertion elisp” to debug my init file.
>
> What elisp expression would return nil when C-u prefix works and non-nil 
> when C-u prefix doesn't work?
>
> I have tried
>
> (eq (key-binding "C-u C-SPC") 'nil)
>
> but it is probably a nonsense.
>
> Best regards

This might work:

     (unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
       (error "C-u has been redefined"))

Note that you don't need to quote nil:

     'nil = nil


Also, this question is not really about org-mode; posting to the emacs
mailing list might increase your chance to get a good answer.

Best regards,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]