Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skk-kakutei-key と skk-annotation-browse-key の衝突 #58

Closed
shwaka opened this issue Jun 13, 2017 · 3 comments
Closed

skk-kakutei-key と skk-annotation-browse-key の衝突 #58

shwaka opened this issue Jun 13, 2017 · 3 comments

Comments

@shwaka
Copy link

shwaka commented Jun 13, 2017

skk-show-annotationt にした状態で skk-kakutei-keyskk-annotation-browse-key に設定したキーが衝突している場合、「変換候補が一つずつ表示されている段階では、候補を進めるためにはSPCキーの入力が2回必要」という不思議な症状が現れます。
原因が分かっていれば衝突させなければ良いだけなのですが、これらのキーを入力した際に症状が現れるわけではないため、原因の特定に苦労してしまいました。

上記の不思議な症状を抑止できれば一番良いですが、それが難しいのであればこれらの変数のdocumentationに注意喚起をしておくと良いように思います。

なお、最新版のddskkで以下の設定を適用すると上記の現象が発生します。

(setq skk-show-annotation t)
(setq skk-annotation-browse-key (kbd "C-o")) ;デフォルトの値なのでこの行は不要
(setq skk-kakutei-key (kbd "C-o"))
@tkita
Copy link
Member

tkita commented Jun 13, 2017

再現しました。
たぶん skk-henkan() あたりの気がしますので、調査継続します。

@tkita
Copy link
Member

tkita commented Jul 2, 2017

SPC の打鍵で関数が連鎖します。

skk-start-henkan()
=> skk-henkan()
=> skk-annotation-find-and-show()
=> skk-annotation-show()
=> skk-annotation-wait-for-input()

どうやら skk-annotation-wait-for-input() に原因があるようです。
標準状態つまり skk-kakutei-key"\C-j" であれば、

(key-binding skk-annotation-browse-key)
=> open-line

しかし、(setq skk-kakutei-key (kbd "C-o")) 状態では

(key-binding skk-annotation-browse-key)
=>skk-insert

どう直せば正解なのか、もう少し時間かかります。

@tkita
Copy link
Member

tkita commented Jul 9, 2017

skk-kakutei-keyskk-insert() が割り当たるのは仕様です(skk-compile-rule-list() 参照)。
ちょっと場当たり的ですが、以下のパッチでどうでしょうか?

$ git diff
diff --git a/skk-annotation.el b/skk-annotation.el
index f5a90c7..ec1c464 100644
--- a/skk-annotation.el
+++ b/skk-annotation.el
@@ -747,7 +747,8 @@ NO-PREVIOUS-ANNOTATION B$r;XDj (\\[Universal-Argument] \\[skk-annotation-ad
                     digit nil
                     char  nil)
               (skk-annotation-show-2 annotation)))
-           ((eq command browse-command)
+           ((and (eq command browse-command)
+                  (not (eq browse-command 'skk-insert)))
             (setq list (delq browse-command list))
             (setq urls nil)
             (when (and word (setq cache (skkannot-cache word sources)))

@tkita tkita closed this as completed in 03c3351 Jul 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants