emacs - 在当前的组织模式树中使用 flyspell

标签 emacs org-mode

我正在尝试编写一个小的 lisp 函数来在单个 org-mode 分支中运行 flyspell。我已将此添加到我的 .emacs 文件中:

(defun flyspell-current-tree()
  (interactive)
  (org-mark-subtree)
  (flyspell-region))

(global-set-key (kbd "S-<f8>") 'flyspell-current-tree)

但是当运行它时,我收到以下错误:
flyspell-current-tree: Wrong number of arguments

有任何想法吗?

最佳答案

您需要提供begendflyspell-region使其正常工作。错误来自该错误,而不是实际上来自您的函数。

如果您包括 (point)(mark)作为 flyspell-region 的参数它会正常工作。

(defun flyspell-current-tree()
  (interactive)
  (org-mark-subtree)
  (flyspell-region (point) (mark)))

关于emacs - 在当前的组织模式树中使用 flyspell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10283393/

相关文章:

Emacs 冰柱空间

emacs - Org Babel 不会为点源加载 Graphviz 编辑模式

emacs - 如何在 emacs 中重新对齐文本表的列?

emacs - 如何处理某些目录中的某些操作?

r - ESS 产生 "Variable binding depth exceeds max-specpdl-size"

Emacs 组织模式 gnuplot : Error running timer: (void-variable data-file)

emacs - 如何在组织模式下将单词的一部分加粗

pdf - 组织模式不导出为 PDF

emacs - Jruby emacs 集成

emacs - 本地到 `let` 与本地到函数