符号的值作为变量是void:eclimd-port

时间:2013-05-13 21:48:00

标签: eclim

遵循emacs-eclim的安装指南后,我想通过“start-eclimd”启动eclimd,但是Mini-Buffer中会弹出以下错误消息。

  

符号作为变量的值为void:eclimd-port

Eclimd脚本在eclipse中启动时完美无瑕。

在shell中运行脚本会出现以下错误:

  

您的jvm不支持您安装的eclipse所需的体系结构:-d32

我的Java版本:

  

java版“1.7.0_21”   OpenJDK运行时环境(IcedTea 2.3.9)(7u21-2.3.9-1ubuntu1)   OpenJDK 64位服务器VM(版本23.7-b01,混合模式)

这是64位问题吗?

我只想控制emacs或至少脚本中的守护进程。 这些行与我的.emacs相关:

;; Eclim - eclipse interface for emacs
(require 'eclim)
(global-eclim-mode)
(require 'eclimd)

完整堆栈跟踪:

Debugger entered--Lisp error: (void-variable eclimd-port)
  (let ((eclimd-start-regexp "Eclim Server Started on\\(?: port\\|:\\) \\(?:\\(?:[0-9]+\\.\\)\\{3\\}[0-9]+:\\)?\\([0-9]+\\)")) (save-match-data (let ((output (eclimd--match-process-output eclimd-start-regexp eclimd-process))) (when output (setq eclimd-port (match-string 1 output)) (message (concat "eclimd serving at port " eclimd-port))))) eclimd-port)
  wait-eclimd-start()
  (progn (wait-eclimd-start))
  (if eclimd-wait-for-process (progn (wait-eclimd-start)))
  (when eclimd-wait-for-process (wait-eclimd-start))
  (if (eclimd--running-p) (message "Cannot start eclimd: eclimd is already running.") (message (concat "Starting eclimd for workspace: " workspace-dir "...")) (setq eclimd-process-buffer (make-comint eclimd-process-buffer-name eclimd-prog nil (concat "-Dosgi.instance.area.default=" (replace-regexp-in-string "~" "@user.home" workspace-dir)))) (setq eclimd-process (get-buffer-process eclimd-process-buffer)) (when eclimd-wait-for-process (wait-eclimd-start)))
  (if (not eclimd-prog) (message "Cannot start eclimd: check eclimd-executable variable.") (if (eclimd--running-p) (message "Cannot start eclimd: eclimd is already running.") (message (concat "Starting eclimd for workspace: " workspace-dir "...")) (setq eclimd-process-buffer (make-comint eclimd-process-buffer-name eclimd-prog nil (concat "-Dosgi.instance.area.default=" (replace-regexp-in-string "~" "@user.home" workspace-dir)))) (setq eclimd-process (get-buffer-process eclimd-process-buffer)) (when eclimd-wait-for-process (wait-eclimd-start))))
  (let ((eclimd-prog (eclimd--executable-path))) (if (not eclimd-prog) (message "Cannot start eclimd: check eclimd-executable variable.") (if (eclimd--running-p) (message "Cannot start eclimd: eclimd is already running.") (message (concat "Starting eclimd for workspace: " workspace-dir "...")) (setq eclimd-process-buffer (make-comint eclimd-process-buffer-name eclimd-prog nil (concat "-Dosgi.instance.area.default=" (replace-regexp-in-string "~" "@user.home" workspace-dir)))) (setq eclimd-process (get-buffer-process eclimd-process-buffer)) (when eclimd-wait-for-process (wait-eclimd-start)))))
  start-eclimd("~/workspace")
  call-interactively(start-eclimd t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

2 个答案:

答案 0 :(得分:1)

我认为eclimd.el文件中有一个错误(〜/ .emacs.d / elpa / emacs-eclim-20140809.207 / eclimd.el)

我为eclimd-port添加了一个defvar,解决了这个问题。 (在此报道:https://github.com/senny/emacs-eclim/issues/156

    (defvar eclimd-port nil
      "The active eclimd port number")

答案 1 :(得分:0)

似乎这不是emacs问题。当您在emacs上运行start-eclimd时,它可能使用与从shell运行脚本时相同的上下文来触发进程,在那里您会收到32位与64位错误。

也许您应该尝试修复您的eclim设置,以便当您从shell运行它时,您会得到一个看起来像

的输出
  

Eclim Server在端口上启动...

This可能会有所帮助。