【问题标题】:How to make emacs configurable for julia-lang如何使 emacs 可配置为 julia-lang
【发布时间】:2016-06-04 11:24:47
【问题描述】:

我想将 emacs 用于 julia 语言。让我自己解释一下。首先,我使用的是 OsX Yosemite。如您所知,当您编写 python 函数时,emacs 会自动为您突出显示特定于 python 的语法。同样,我想从 emacs 为 julia 编程语言做这件事。为此,我按照this github repo 中的书面步骤进行操作。

1) 首先,我已经将该存储库克隆到我的 Mac 中,(在 ~/myLaptop/Documents/ESS

2) 我将cd 放入克隆的git 目录(Documents/ESS) 并运行make all

3)此时此刻,在github仓库中,据说

在您的 .emacs 中加载 ess-site.el,除非您的 julia (julia-basic 对于旧版本)已经在 exec 路径中,设置 lower-ess-julia-program-name 指向 julia 可执行文件:

(加载“路径/到/ESS/git/lisp/ess-site”)

我无法理解这部分。现在我该怎么办? 这是我的.emacs.d 目录的视图

xxxs-MacBook-Air:.emacs.d xxx$ ls
auto-save-list
xxxs-MacBook-Air:.emacs.d xxx$

这是 ESS 目录:

xxxs-MacBook-Air:ESS xxx$ ls
ANNOUNCE        NEWS            VERSION         install-sh
COPYING         ONEWS           debian          lisp
ChangeLog       OONEWS          doc         mkinstalldirs
LDA         README          ess-autoloads.el    rsn.txt
Makeconf        README.md       etc         test
Makefile        RPM.spec.in     fontlock-test
xxxs-MacBook-Air:ESS xxx$

最后,这是我的 emacs 版本

xxxs-MacBook-Air:~ xxx$ emacs -version
GNU Emacs 24.5.1
Copyright (C) 2015 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.

这是我第一次使用 emacs,因此请像我是 emacs 傻瓜一样解释我。提前致谢,希望我能提供所有必需的信息。

【问题讨论】:

    标签: macos emacs julia


    【解决方案1】:

    第三点是告诉您将该代码添加到您的init file。这就像 juliarcvimrc 一样,您想告诉程序(在本例中为 Emacs)每次打开时要执行什么。

    如果julia 命令不在您的路径中,则需要set inferior-ess-julia-program-name 内容。

    你怎么知道它是否不在你的路径中? 试试:

    xxxs-MacBook-Air:~ xxx$ which julia
    

    如果返回错误,并且假设您的 julia 二进制文件位于 /home/user/stuff/julia/bin/julia,那么您必须编辑您的 init 文件并添加:

    (custom-set-variables
      '(inferior-ess-julia-program-name "/home/user/stuff/julia/bin/julia"))
    

    IIRC,你也可以运行M-x customize-variable RET inferior-ess-julia-program-name
    (顺便说一句,我使用~/.emacs.d/init.el 作为我的初始化文件)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-13
      • 2014-08-08
      • 1970-01-01
      相关资源
      最近更新 更多