4

私はemacsを初めて使用し(idris-vimを機能させることができないvimから来ました)、これらのパッケージをel-get経由でインストールしました:

ace-jump-mode         installed  A quick cursor location minor mode for emacs.
el-get                installed  Manage the external elisp bits and pieces you depend upon.
evil-leader           installed  Add <leader> shortcuts to Evil, the extensible vim        emulation layer
evil-numbers          installed  Increment/decrement numbers in Evil, the extensible vim        emulation layer. Like C-a/C-x in vim.         After installation, you will need to add a key-binding for evil-numbers.        For example:         (define-key evil-normal-state-map (kbd "C-c +") 'evil-numbers/inc-at-pt)        (define-key evil-normal-state-map (kbd "C-c -") 'evil-numbers/dec-at-pt)
evil-surround         installed  Emulate Tim Pope's surround.vim in evil, the extensible vim        emulation layer for emacs
evil                  installed  Evil is an extensible vi layer for Emacs. It        emulates the main features of Vim, and provides facilities        for writing custom extensions.
goto-chg              installed  Goto the point of the most recent edit in the buffer.
haskell-mode          installed  A Haskell editing mode
idris-mode            installed  Major mode for the Idris language
j-mode                installed  Emacs major mode for editing J code.
linum-relative        installed  Display relative line number in the left margin
undo-tree             installed  Treat undo history as a tree

私の ~/.emacs.d/init.el は次のようになります:

(add-to-list 'load-path "~/.emacs.d/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)

(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
(setq mouse-wheel-progressive-speed nil)
(setq mouse-wheel-f 't)
(setq scroll-s 1)

(add-to-list 'load-path "~/.emacs.d/lojban")
(autoload 'lojban-parse-region "lojban" nil t)
(autoload 'lojban-mode "lojban-mode" nil t)

(add-to-list 'load-path "~/.emacs.d/el-get/el-get")

(unless (require 'el-get nil 'noerror)
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.github.com/dimitri/el-get/master/el-get-install.el")
    (goto-char (point-max))
    (eval-print-last-sexp)))

(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes")
(el-get 'sync)

(add-to-list 'load-path "~/.emacs.d/j-mode/")
(autoload 'j-mode "j-mode.el" "Major mode for editing J files" t)
(add-to-list 'auto-mode-alist '("\\.ij[rstp]$" . j-mode))

;(custom-set-face
; '(j-verb-face ((t (:foreground "cornflower blue"))))
; '(j-adverb-face ((t (:foreground "goldenrod"))))
; '(j-conjunction-face ((t (:foreground "olive drab"))))
; '(j-other-face ((t (:foreground "Black")))))

(require 'evil-leader)
(global-evil-leader-mode)

(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
;(require 'lalopmak-evil)
(define-key evil-normal-state-map "," 'evil-ex)
(define-key evil-motion-state-map ":" 'evil-repeat-find-char-reverse)

(define-key evil-window-map "j" 'evil-window-left)
(define-key evil-window-map "J" 'evil-window-move-far-left)
(define-key evil-window-map "k" 'evil-window-down)
(define-key evil-window-map "K" 'evil-window-move-very-bottom)
(define-key evil-window-map "h" 'evil-window-up)
(define-key evil-window-map "H" 'evil-window-move-very-top)

(define-key evil-motion-state-map "j" 'evil-backward-char)
(define-key evil-motion-state-map "J" 'evil-window-top)
(define-key evil-motion-state-map "k" 'evil-next-line)
(define-key evil-motion-state-map "h" 'evil-previous-line)

(define-key evil-motion-state-map (kbd "C-n") 'evil-scroll-line-up)

(define-key evil-normal-state-map (kbd "M-x") 'execute-extended-command)

私は悪を使用しており、idris-mode には悪で動作するバインディングがあるため、vimのケース分割の例に従ってみました。新しいセッションから開始すると、次のことが起こります。

  1. vadd.idr ファイルを開きます。このファイルには、既に 3 行 (うち 1 行は空白) が含まれています。
  2. 最後の行に移動して を押し\dます。
  3. 長いエラー メッセージが表示されますが、読む前に消えてしまいます。
  4. Idris REPL が新しい分割ペインで開きます。
  5. コマンド ライン (ウィンドウの下部) に が表示されますBuffer vadd.idr has no process。また、挿入モードで入力して、REPL を試します。Enter キーを押すと、 が表示Buffer *idris-repl* has no processされ、それ以上何も起こりません。

Linux シェルでは、echo $PATHが生成され、期待どおりにシェルから動作します。/home/james/bin /home/james/.cabal/bin /home/james/bin /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/vendor_perl /usr/bin/core_perlidris

(数秒間) emacs を終了するZZと、アクティブなプロセスが存在すると言われます。ここに私が示しているプロセスリストがあります:

Process         Status  Buffer          TTY          Command
idris           run     *idris-process* /dev/pts/3   idris --ideslave-socket

接続されている可能性があるため、idris-vim を使用して vim の同じファイルから取得したエラーは次のとおりです。

:call IdrisReload(0)
"vadd.idr" 3L, 62C written
Uncaught error: connect: does not exist (Connection refused)

Press ENTER or type command to continue

リーダーバインディングが機能しないため、 ex コマンドを使用します (まだ別の問題があります)。

このような長い質問をして申し訳ありません。関係のない情報を追加することになるとしても、最も関連性の高い情報を含めたかったのです。


編集:もっと; デバッガーを見つけました (メニューから「エラー時にデバッガーに入る」を設定します)。

を押す\dと、バッファに次のように表示されます。

Debugger entered--Lisp error: (file-error "make client process failed" "connection refused" :name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil)
  make-network-process(:name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil)
  open-network-stream("Idris Ideslave" "*idris-connection*" "127.0.0.1" 0)
  idris-connect(0)
  idris-process-filter("     ____    __     _                                          \n    /  _/___/ /____(_)____                                     \n    / // __  / ___/ / ___/     Version 0.9.12\n  _/ // /_/ / /  / (__  )      http://www.idris-lang.org/      \n /___/\\__,_/_/  /_/____/       Type :? for help                \n\n")
  comint-output-filter(#<process idris> "     ____    __     _                                          \n    /  _/___/ /____(_)____                                     \n    / // __  / ___/ / ___/     Version 0.9.12\n  _/ // /_/ / /  / (__  )      http://www.idris-lang.org/      \n /___/\\__,_/_/  /_/____/       Type :? for help                \n\n")
  accept-process-output(#<process idris> 3)
  idris-run()
  idris-ensure-process-and-repl-buffer()
  idris-load-file-sync()
  idris-add-clause(nil)
  call-interactively(idris-add-clause nil nil

そしてexコマンドラインで

make client process failed: connection refused, :name, Idris Ideslave, :buffer, *idris-connection*, :host, 127.0.0.1, :service, 0, :nowait, nil

何をしようとしているのかわからない。


編集: vadd.idr のバッファーのステータス行の右端は次のとおりです (正しい用語?):

(Idris (Not loaded) ElDoc Ind Undo-Tree)

Not loaded心配そうに見えますが、それ以上のことはわかりません。


編集:Vimの問題に戻り、実行しました

$ vim -V9vimlog vadd.idr
:call IdrisReload(0)
ZZ
$ ack idris vimlog

ログからのすべては、最後までかなり正常に見えます (エラーによって引き起こされます):

Calling shell to execute: "(idris --check   vadd.idr) &> /tmp/vbKELys/1"
Error detected while processing function <SNR>38_BufWritePostHook..<SNR>38_UpdateErrors..<SNR>38_CacheErrors..16..15..SyntaxCheckers_idris_idris_GetLocList..SyntasticMake:
Calling shell to execute: "(idris --client ':l /mnt/sda9/home/james/Documents/idris/vadd.idr') >/tmp/vbKELys/2 2>&1"

そのため、ログファイルに含まれていることがわかりました

Calling shell to execute: "(idris --check   vadd.idr) &> /tmp/vbKELys/1"
Error detected while processing function <SNR>38_BufWritePostHook..<SNR>38_UpdateErrors..<SNR>38_CacheErrors..16..15..SyntaxCheckers_idris_idris_GetLocList..SyntasticMake:
line   66:
E380: At bottom of quickfix stack
error list 1 of 1; 1 errors
Calling shell to execute: "(idris --client ':l /mnt/sda9/home/james/Documents/idris/vadd.idr') >/tmp/vbKELys/2 2>&1"
Uncaught error: connect: does not exist (Connection refused)

これらのシェル コマンドをシェルから実行すると、次のようになります。

$ idris --check vadd.idr
$ idris --client ':l /mnt/sda9/home/james/Documents/idris/vadd.idr'
Uncaught error: connect: does not exist (Connection refused)
$ idris --client vadd.idr
Uncaught error: connect: does not exist (Connection refused)

ちなみに、プレーンidris vaddr.idrは問題なく動作します。

4

1 に答える 1