如何查看红色波浪状错误标记表示的内容

How to see what the red squiggly error marking indicates

我正在编辑降价文件,在我的文档中看到一些红色波浪线。我有 flycheck 与 markdown-lint 一起工作,而 ispell 正在做一些其他工作来检测拼写错误、重复的单词等。但我无法立即弄清楚为什么某些单词会出现波浪形。

我发现

所以我已经准备好了真正需要的一切。但是红色波浪线代表不同的东西有点烦人,所以我必须使用不同的命令来获得看起来相同的东西,因此无法判断使用哪个绑定跳转到下一个波浪线。而且我想知道是否有办法,当点在一个波浪形的东西上时,知道为什么它是波浪形的。 (我知道 flycheck 在迷你缓冲区中显示原因方面做得很好,但我认为 flyspell/ispell 做不到)。

我担心这会变得更糟,因为我尝试添加更多工具,如 WriteGood mode 和可能的其他工具。

我不认为有一个简单的内置方法可以做到这一点,但这里有一个小函数试图告诉点处的波浪线代表什么:

(defun my-whats-that-squiggle ()
  (interactive)
  (let* ((interesting-properties '(flycheck-error flyspell-overlay flymake-overlay))
         (present-properties (cl-remove-if-not
                              (lambda (p) (get-char-property (point) p))
                              interesting-properties)))
    (if present-properties
        (message "This squiggle represents: %s"
                 (mapconcat 'symbol-name present-properties ", "))
      (message "No interesting properties present"))))

M-x my-whats-that-squiggle 调用它,或用 global-set-key 将它绑定到一个键上。

您可以使用 C-u C-x = 手动检查点上存在哪些属性,并根据需要向 interesting-properties 添加更多属性。跳到下一个波浪线,无论它是什么类型,很可能需要编写一个调用 next-property-change.

的函数