[英]How to get emacs to load ess
I installed emacs 26 via flatpak and ess using sudo apt-get. 我通过flatpak和ess使用sudo apt-get安装了emacs 26。
Currently my ess exists at /usr/share/emacs/site-lisp/elpa-src/ess-17.11
and I put in my .emacs file (load "/usr/share/emacs/site-lisp/elpa-src/ess-17.11/")
. 目前,我的ess存在于
/usr/share/emacs/site-lisp/elpa-src/ess-17.11
,我放入了.emacs文件(load "/usr/share/emacs/site-lisp/elpa-src/ess-17.11/")
。 When I run emacs, I get the following warning: 运行emacs时,出现以下警告:
Warning (initialization): An error occurred while loading ‘/home/yannik/.emacs’:
File is missing: Cannot open load file, No such file or directory, /usr/share/emacs/site-lisp/elpa-src/ess-17.11/
However, this directory clearly exists. 但是,此目录显然存在。 How do I get emacs to detect ess?
我如何获得emacs来检测ess? I've tried everything,
'(require ess-site)
didn't work either. 我已经尝试了一切,
'(require ess-site)
也没有用。
The function load
loads a single Emacs Lisp file. 功能
load
装载单一的Emacs Lisp文件。 What you want to do here is make an entire directory accessible, which you'd do by adding it to the load path: 您要在此处进行的操作是使整个目录可访问,您可以通过将其添加到加载路径来实现:
(add-to-list 'load-path "/usr/share/emacs/site-lisp/elpa-src/ess-17.11/")
After that, you should find that (require 'ess-site)
works - it will find the ess-site
module in that directory. 之后,您应该发现
(require 'ess-site)
有效-它会在该目录中找到ess-site
模块。
That said, you might find it easier to install ESS using Emacs' package manager. 就是说,您可能会发现使用Emacs的软件包管理器安装ESS更容易。 Follow the instructions for activating the MELPA package archive , and then type
Mx list-packages
and install ess
from the list. 按照激活MELPA软件包归档的说明进行操作 ,然后键入
Mx list-packages
并从列表中安装ess
。 Emacs will download the package, copy it to ~/.emacs.d/elpa
, and arrange to load it. Emacs将下载该软件包,将其复制到
~/.emacs.d/elpa
并安排加载。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.