7

Given I'd like to keep using global-flycheck-mode, how can I make sure flycheck is automatically disabled when editing org-mode documents? Or maybe is just activate it for code blocks?

I found this discussion but I admit I don't know what to do with this information. :\


ORIGINAL QUESTION:

I'm trying to create a timestamp with both date and time in org-mode (without adding to agenda), and I read from the docs that I should be using this cord:

C-u C-c !

However, I get this in my minibuffer:

screenshot http://zc.d.pr/NxKK/56UjyS0K+

Seems like its waiting for more input. I'm an Emacs n00b so I'm not really sure what's happening here. I get the same behavior with

C-c !

Both versions with . work fine, though:

C-u C-c .

C-c .

What's happening here?


UPDATE: Thanks to suggestions from the comments below, I've determined Flycheck is doing something to screw this up: here's my flycheck config

(use-package flycheck
  :ensure t
  :init (global-flycheck-mode))
(add-hook 'after-init-hook #'global-flycheck-mode)

Where can I look to find if there is a colliding key binding?

3
  • M-x where-is <RET> org-time-stamp-inactive will show if it has a keybinding.
    – Juancho
    Commented Jul 15, 2016 at 21:21
  • What you see in the echo area indicates that there is another keybinding C-c ! (something) defined somewhere, and Emacs is waiting for you to complete the combination. First try it after starting Emacs without your init file (emacs -Q). After that, bisect your init file recursively (commenting out successive halves) until what is creating the additional keybinding.
    – Dan
    Commented Jul 15, 2016 at 21:24
  • @Dan Thanks for the insight. I've updated my post above with my findings... appears that Flycheck is the culprit, but I don't know how to fix yet. Would appreciate any insight to debugging these sorts of issues.
    – neezer
    Commented Jul 15, 2016 at 21:36

2 Answers 2

9

I just did this by customizing flycheck-global-modes to be '(not org-mode).

In the customize interface, that was clicking except and repeat and adding an org-mode entry.

1

The prefix for flycheck commands is controlled by the flycheck-keymap-prefix variable. You can use customize to set this to your liking. If you don't use customize note that changing the value of flycheck-keymap-prefix is insufficient:

Changing this variable outside Customize does not have any effect. To change the keymap prefix from Lisp, you need to explicitly re-define the prefix key:

(define-key flycheck-mode-map flycheck-keymap-prefix nil)
(setq flycheck-keymap-prefix (kbd "C-c f"))
(define-key flycheck-mode-map flycheck-keymap-prefix
            flycheck-command-map)

Please note that Flycheck's manual documents the default keybindings. Changing this variable is at your own risk.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.