简体   繁体   English

我安装了图阿雷格模式,但它甚至没有显示在 emacs 中

[英]I installed tuareg mode but it's not even showing in emacs

I tried to install the tuareg mode for emacs on Manjaro, but when i open emacs and create a test.ml file, the "tuareg" menu isn't even there and all the commands such as Ctrl c + Ctrl b are undefined, it's as if tuareg wasn't installed.我试图在 Manjaro 上为 emacs 安装 tuareg 模式,但是当我打开 emacs 并创建一个 test.ml 文件时,“tuareg”菜单甚至都不在那里,所有的命令,例如 Ctrl c + Ctrl b 都未定义,它是好像没有安装图阿雷格。

In order to install the tuareg mode for emacs here is what i've done :为了在这里为 emacs 安装 tuareg 模式,我所做的是:

sudo pacman -S emacs
sudo pacman -S opam
opam install ocaml
opam install tuareg
opam init

Everything worked well during the installation so i don't know why it's not working.安装过程中一切正常,所以我不知道为什么它不起作用。 I guess it's something like emacs isn't linked to the tuareg mode and i need to specify a folder or something like that to find the tuareg mode.我猜是 emacs 没有链接到 tuareg 模式,我需要指定一个文件夹或类似的东西来找到 tuareg 模式。 But even then i cant't find the .emacs files, so i don't really know what to do.但即使那样我也找不到 .emacs 文件,所以我真的不知道该怎么做。

You're not far from it !你离它不远了!

As you guessed, emacs doesn't know that tuareg exists.如您所料,emacs 不知道 tuareg 存在。 The simplest way to solve that is to type:解决这个问题的最简单方法是键入:

opam install user-setup

You'll need to restart emacs afterwards to load the new configuration.之后您需要重新启动 emacs 以加载新配置。

@PatJ command didn't work for me. @PatJ 命令对我不起作用。 I'm on a raspberry pi (pi400) with Twister OS which is based on Raspberry Pi OS.我正在使用基于 Raspberry Pi OS 的 Twister OS 的 raspberry pi (pi400)。 So I try in super user所以我尝试超级用户

apt install emacs
apt upgrade
apt install opam
opam install ocaml (which tells me that ocaml is already install)
opam init
opam install user-setup

I have already try with camllight using this script http://judicael.courant.free.fr/2015/02/20/installationcaml.html (a thing with melpa but i don't remember exatly) then Mx list-packages then install tuareg then edit .emacs with (add to list 'load-path "home/pi/.emacs.d/lisp") where lisp is a directory which contain tuareg.el, camldebug.el, tuareg-site-file-el我已经使用这个脚本尝试使用camllight http://judicael.courant.free.fr/2015/02/20/installationcaml.html (与melpa有关,但我不记得了)然后Mx list-packages然后安装tuareg 然后编辑 .emacs(添加到列表 'load-path "home/pi/.emacs.d/lisp"),其中 lisp 是一个包含 tuareg.el、camldebug.el、tuareg-site-file-el 的目录

But it only worked halfway as i made a post Enable tuareg mode in the emacs shell但它只工作了一半,因为我在 emacs shell 中发布了启用 tuareg 模式

I have completely reinstalled my os for giving a new try but without results…我已经完全重新安装了我的操作系统以进行新的尝试,但没有结果......

Moderators, feel free to edit this post :) it's only my second post @PatJ vous pouvez répondre en français si vous préférez :D版主,请随意编辑这篇文章 :) 这只是我的第二篇文章 @PatJ vous pouvez répondre en français si vous préférez :D

Please feel free to vote for my answer so that I can comment on PatJ's answer, which by the way would be more appropriate请随意投票支持我的答案,以便我可以评论 PatJ 的答案,顺便说一句,这更合适

I will edit this post as far I reach 50 reputations ;)只要我达到 50 个声望,我就会编辑这篇文章;)

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

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