简体   繁体   English

无法在正在运行的emacs上打开奇异

[英]cannot open Singular on a running emacs

I am a newbies in Singular. 我是Singular的新手。 I just downloaded Singular4-0-2_64.dmg, mounted the image, right-ckick, show the package contents, then moved the contents folder to the Applications directory. 我刚刚下载了Singular4-0-2_64.dmg,安装了映像,右击,显示了软件包的内容,然后将内容文件夹移动到Applications目录。 double-clicking Contents/MacOS/Singular (or Esingular) I have Singular running in a terminal (or via emacs in a terminal). 双击Contents / MacOS / Singular(或Esingular),我在终端中运行Singular(或通过终端中的emacs运行)。 But when I try Mx singular in a running emacs, it says "cannot open load file : no such file or directory, singular". 但是,当我在运行的emacs中尝试使用Mx单数时,它显示“无法打开加载文件:没有这样的文件或目录,单数”。

Then I copied .emacs-general and .emacs-singular to the home directory. 然后,我将.emacs-general和.emacs-singular复制到主目录。 Adding the following lines to .emacs 在.emacs中添加以下行

(setq load-path (cons "" load-path)) (autoload 'singular "singular" "Start Singular using default values." t) (autoload 'singular-other "singular" "Ask for arguments and start Singular." t) (setq load-path(cons“” load-path))(自动加载'singular“ singular”“使用默认值启动奇异点。” t)(autoload'singular-other“ singular”“询问参数并启动奇异点。” t )

changing singular-emacs-home-directory into /Applications/Singular.app/Contents/share/singular/emacs/ it still doesn't work. 将singular-emacs-home目录更改为/Applications/Singular.app/Contents/share/singular/emacs/仍然不起作用。 Also when I replace .emacs with .emacs-singular, replacing the above directory, it gives the error: Warning (initialization): An error occurred while loading `/Users/Me/.emacs': 同样,当我用.emacs-singular替换.emacs并替换上面的目录时,它也会出现错误:警告(初始化):加载`/Users/Me/.emacs'时发生错误:

Symbol's value as variable is void: /Applications/Singular.app/Contents/share/singular/emacs 符号的变量值无效:/Applications/Singular.app/Contents/share/singular/emacs

Am I not finding the right singular-emacs-home-directroty or is there any other problem? 我找不到合适的singular-emacs-home-directroty还是有其他问题?

I appreciate your help. 我感谢您的帮助。

Also I must mention that I am a user of emacs for Macaulay2. 我还必须提到我是Macaulay2的emacs用户。 For that I have changed .emacs and .emacs-Macaulay2 in order to teach emacs where to look for M2. 为此,我更改了.emacs和.emacs-Macaulay2,以便教emacs在哪里寻找M2。 Is there anything similar to be done for Singular? 对Singular可以做类似的事情吗? Shall I have a file .emacs-singular somewhere? 请问我在某处有一个.emacs单数文件吗?

Thanks for your help. 谢谢你的帮助。

Here are some basic settings that assume the Singular.app has been installed to the /Applications folder. 这是一些基本设置,它们假定Singular.app已安装到/Applications文件夹中。 I chose to set the absolute path to the executable, instead of setting the PATH in Emacs. 我选择设置可执行文件的绝对路径,而不是在Emacs中设置PATH The PATH in Emacs on OSX is (by default) not the same as what one would generally except to see in let's say Terminal.app. PATH在OSX在Emacs是(默认) 一样,什么人会一般除了看到比方说Terminal.app。 [But, setting the PATH is beyond the scope of this basic answer.] [但是,设置PATH超出了此基本答案的范围。]

My personal preference is to have all of the lisp and configuration files in a custom directory for purposes of editing and backup up. 我个人的喜好是将所有lisp和配置文件放在自定义目录中,以进行编辑和备份。 This limited example just leaves everything where they are. 这个有限的示例只是将所有内容保留在原处。

In the Emacs master branch (February 7, 2016), there is no built-in variable named current-menubar -- the configuration files are looking for the existence of that variable. 在Emacs master分支(2016年2月7日)中,没有名为current-menubar内置变量-配置文件正在寻找该变量的存在。 I did not spend the time to debug the built-in configuration files to find out what version of Emacs they were designed for, and I did not spend the time to make the Singular elisp libraries compatible with the latest Emacs master branch. 我没有花时间调试内置配置文件,以了解它们设计用于哪个版本的Emacs,也没有花时间使Singular elisp库与最新的Emacs master分支兼容。

Add the following lines of code to the .emacs file in the home directory, save the file, and restart Emacs. 将以下代码行添加到主目录中的.emacs文件中,保存该文件,然后重新启动Emacs。 Then type Mx singular RET 然后键入Mx singular RET

(add-to-list 'load-path "/Applications/Singular.app/Contents/share/singular/emacs/")
(require 'singular)
(setq singular-emacs-home-directory "/Applications/Singular.app/Contents/share/singular/emacs/")
(defvar current-menubar nil)
(setq singular-executable-default "/Applications/Singular.app/Contents/MacOS/Singular")
(load-file "/Applications/Singular.app/Contents/share/singular/emacs/.emacs-general")
(load-file "/Applications/Singular.app/Contents/share/singular/emacs/.emacs-singular")

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

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