1

Flyspell regularly shows pandoc citations as a spelling error in markdown documents. For example @chu2017 will come up as a spelling error for 'chu'.

How can I get Flyspell ignore the citations and only check other words in the document?

1

Try adding the following to your init.el:

(add-hook 'markdown-mode-hook
          '(lambda ()
             (setq flyspell-generic-check-word-predicate 'my-pandoc-flyspell-verify)))

(defun my-pandoc-flyspell-verify ()
  (save-excursion
    (forward-word -1)
    (not (looking-back "@"))))

Essentially, it is telling flyspell not to check words that start with "@".

| improve this answer | |
  • Awesome, thanks @scaramouche, that does the trick! – Atanas Janackovski Feb 12 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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