浏览代码

org-element--cache-sync: Ignore some more silent changes

* lisp/org-element.el (org-element--cache-sync): Add heuristics
skipping silent buffer changes made by quail.el when inserting "S-\"
using computer-russian input method.

Reported in https://list.orgmode.org/smre9o$hn1$1@ciao.gmane.io/
Ihor Radchenko 3 年之前
父节点
当前提交
faf8ce7dee
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      lisp/org-element.el

+ 3 - 0
lisp/org-element.el

@@ -5821,6 +5821,9 @@ updated before current modification are actually submitted."
                ;; edit.
                ;; edit.
                (/= (buffer-chars-modified-tick)
                (/= (buffer-chars-modified-tick)
                   (buffer-modified-tick))
                   (buffer-modified-tick))
+               ;; FIXME: Similar for "S-\" in russian-computer input.
+               (not (= (buffer-chars-modified-tick)
+                     (- (buffer-modified-tick) 6)))
                ;; FIXME: Another heuristics noticed by observation.
                ;; FIXME: Another heuristics noticed by observation.
                ;; `replace-match' in `org-toggle-heading' in Emacs <28
                ;; `replace-match' in `org-toggle-heading' in Emacs <28
                ;; makes safe silent changes when first letter in the
                ;; makes safe silent changes when first letter in the