6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

google-translate.el で args-out-of-range になるときの対処法

Posted at

たぶん Emacs 26.3 に変更してからだと思うのですが次のコードで

(google-translate-translate "ja" "en" "こんにちは" 'current-buffer)

次のエラーがでるようになりました。

(args-out-of-range [] 1)

調べたところ次のリンク先のコードでとりあえず動くようになりました。

 (defun google-translate-json-suggestion (json)
  "Retrieve from JSON (which returns by the
`google-translate-request' function) suggestion. This function
does matter when translating misspelled word. So instead of
translation it is possible to get suggestion."
  (let ((info (aref json 7)))
    (if (and info (> (length info) 0))
        (aref info 1)
      nil)))    

そんだけです。

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?