简体   繁体   English

如何在emacs中为Django安装pony模式

[英]How to install pony-mode for Django in emacs

I'm new to emacs and i would like to install pony-mode for django. 我是emacs的新手,我想为Django安装pony-mode I've been struggling with the installation instructions but I have not found a way to make it work. 我一直在努力进行安装说明,但是还没有找到一种使之正常工作的方法。 Do i need to byte-compile all the .el files? 我需要对所有.el文件进​​行字节编译吗? How do I do that? 我怎么做? Are there any dependencies that need to be installed? 是否需要安装任何依赖项? I've managed to get the following error: pony-mode.el:83:1:Error: Cannot open load file: files-x . 我设法得到以下错误: pony-mode.el:83:1:Error: Cannot open load file: files-x Can someone provide a full set of instructions? 有人可以提供全套说明吗?

I'm using emacs GNU Emacs 23.1.1 on ubuntu 10.04 我在Ubuntu 10.04上使用emacs GNU Emacs 23.1.1

I noticed that pony-mode is also available via package.el 我注意到小马模式也可以通过package.el获得

I have package manager configured like so: 我有这样配置的程序包管理器:

(require 'package)
(dolist (source '(("marmalade" . "http://marmalade-repo.org/packages/")
                  ("elpa" . "http://tromey.com/elpa/")))
  (add-to-list 'package-archives source t))
(package-initialize)

And then you should be able to run the package-install command and type pony-mode when prompted in the minibuffer. 然后,您应该能够运行package-install命令并在微型缓冲区中出现提示时键入pony-mode

It works just fine for me 对我来说很好

git clone http://github.com/davidmiller/pony-mode ~/Development/pony-mode

M-x byte-compile-file (compile only pony-mode.el)

And then add to .emacs: 然后添加到.emacs:

(add-to-list 'load-path "~/Development/pony-mode")
(require 'pony-mode)

Of course you would have to change the paths for yours... Be careful with the path in the load path function, no final / and no spaces 当然,您必须为自己的路径更改...小心加载路径函数中的路径,没有最终/,也没有空格

The error "Cannot open load file: files-x" is unrelated to byte-compilation. 错误“无法打开加载文件:files-x”与字节编译无关。

There is a file included in GNU Emacs 'files-x.el' which is required by pony-mode in order to set dir-local variables for per-project settings. GNU Emacs的“ files-x.el”中包含一个文件,小马模式需要此文件,以便为每个项目设置设置dir-local变量。

This error most likely means that the variable `load-path' is set such that it cannot find files-x.el. 该错误很可能意味着变量`load-path'被设置为无法找到files-x.el。

(/usr/local/share/emacs/23.1/lisp/files-x.el would be a good first place to look in your case. Ch v load-path will allow you to inspect this variable.) (在您的情况下,/ usr / local / share / emacs / 23.1 / lisp / files-x.el将是一个很好的第一位置。Ch v load-path将允许您检查此变量。)

The installation instructions provided by @Fernando should work if your installation is standard 如果您的安装是标准安装,则@Fernando提供的安装说明应该可以使用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM