我使用Aquamacs,我使用ELPA在〜/ .emacs.d/elpa中安装文件?
这个ELPA背后的魔力是什么?我的意思是,如果没有ELPA,我应该在特定目录中下载并安装软件包,并在.emacs中添加这两行.
(add-to-list'load-path"PACKAGE_DIRECTORY")
(需要'PACKAGE)
但是,对于ELPA,我没有看到任何添加到.emacs或/ Users/smcho/Library/Preferences/Aquamacs Emacs/{Preferences.el,customizations.el}的内容.这怎么可能?
这是我在Aquamacs中发现的.
我想初始化文件没有改变,但是包管理器会自动读取〜/ .emacs.d/elpd/*进行初始化,因为我看到每个文件都有*** - autoloads.el.
使用emacs 24,似乎预先构建了包.我只需要在.emacs或.emacs.d/init.el中使用这些行来使ELPA正常工作.来自这个网站的提示.
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(defvar my-packages '(clojure-mode
nrepl))
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
Run Code Online (Sandbox Code Playgroud) With emacs/eshell, the "echo $PATH" shows different paths than that of $PATH environment variable.
And I also checked that eshell doesn't read .bashrc or .profile, and I think that's the reason why the path is different.
正如JérômeRadix指出的那样,PATH取决于我如何启动Aquamcs.
我试图使用捕获,如org-manual p 74中所述.这是组织模式的.emacs文件.
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(setq org-default-notes-file (concat org-directory "~/notes.org")) <-- error
(define-key global-map "\C-cc" 'org-capture)
Run Code Online (Sandbox Code Playgroud)
但是我得到了这个错误.可能有什么问题?
Symbol's value as variable is void: org-directory
Run Code Online (Sandbox Code Playgroud)
戴夫的回答后,我修改了代码,似乎工作正常.但我发现的另一个问题是Cc c给了我这个错误.
Symbol's function definition is void : org-capture
Run Code Online (Sandbox Code Playgroud) 我有一个启动一些应用程序的URLHandler,主要代码如下.
@implementation URLHandlerCommand
- (id)performDefaultImplementation {
NSString *urlString = [self directParameter];
NSLog(@"url :=: %@", urlString);
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath: @"/usr/bin/open"];
NSArray *arguments;
arguments = [NSArray arrayWithObjects: @"-a", @"Path Finder.app", urlString, nil];
[task setArguments: arguments];
NSPipe *pipe;
pipe = [NSPipe pipe];
[task setStandardOutput: pipe];
NSFileHandle *file;
file = [pipe fileHandleForReading];
[task launch];
return nil;
}
Run Code Online (Sandbox Code Playgroud)
由于此例程的目标是启动另一个应用程序,我想在启动App后使此URLHandler退出.我怎样才能做到这一点?
如何用C#将字符串中的所有'\'字符替换为'/'?例如,我需要从@"c:\ abc\def"创建@"c:/ abc/def".
在eclipse源码库的编译中.我有"未设置API基线..."错误.

我尝试添加API Baseline,但我不知道如何制作或添加它.
什么是API Baseline,我该如何添加或制作?


随着我的eclipse插件启动,我收到了Root exception:java.lang.IllegalStateException: Workbench has not been created yet.错误.
并且它似乎导致副作用使一些包异常错误.我认为我的代码不使用egit模块.
org.osgi.framework.BundleException: Exception in org.eclipse.egit.ui.Activator.start() of bundle org.eclipse.egit.ui.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
Run Code Online (Sandbox Code Playgroud)
如何删除此错误?这是访问工作区的代码.我发现这篇文章 - 调试一个失败的Eclipse启动说它是竞争条件,但我不确定为什么我有竞争条件,如果是,如何删除它.
public void renameClassRefactor() throws CoreException {
// get the project information with ResourcesPlugin
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
// 1. The name of the project in the workspace
System.out.println(ResourcesPlugin.getWorkspace().toString());
java.io.File workspaceDirectory = root.getLocation().toFile();
System.out.println(workspaceDirectory.toString());
Run Code Online (Sandbox Code Playgroud) 在C/C++中,我可以创建一个库,并在源代码中使用#include""将其设置为静态,或者在链接时使用-labc.如何在lisp中使用相同的功能?
作为目录A中util.lisp的一个例子.我定义了一个库函数hello.
(defpackage "UTIL" (:use "COMMON-LISP") (:nicknames "UT") (:export "HELLO")) (in-package util) (defun hello () (format t "hello, world"))
并尝试从main函数使用此库函数.
(defun main () (ut:hello)) (main)
我试过了
clisp main.lisp A/util.lisp
但是,我得到了以下信息
*** - READ from #: there is no package with name "UT"
我只需要加载库.
(load "./A/util.lisp") (defun main () (ut:hello)) (main)
并运行'clisp main.lisp'工作正常.
当值小于5时,我需要遍历XML树以添加子元素.例如,可以将此XML修改为
<?xml version="1.0" encoding="UTF-8"?>
<A value="45">
<B value="30">
<C value="10"/>
<C value ="20"/>
</B>
<B value="15">
<C value = "5" />
<C value = "10" />
</B>
</A>
Run Code Online (Sandbox Code Playgroud)
这个XML.
<?xml version="1.0" encoding="UTF-8"?>
<A value="45">
<B value="30">
<C value="10"/>
<C value ="20"/>
</B>
<B value="15">
<C value = "5"><D name="error"/></C>
<C value = "10" />
</B>
</A>
Run Code Online (Sandbox Code Playgroud)
我怎么能用Python的ElementTree做到这一点?
gcc与llvm-gccMac OS X Lion 象征性地相关联.
prosseek ~> ls -alF /usr/bin/gcc
lrwxr-xr-x 1 root wheel 12 Nov 12 14:39 /usr/bin/gcc@ -> llvm-gcc-4.2
Run Code Online (Sandbox Code Playgroud)
我如何设置gcc-4.2在gcc被叫时使用?