Enable tuareg mode in the emacs shell - emacs

In emacs I have got the tuareg mode enabled in the top and the shell in the bottom without color syntax. How can I have color syntax in the shell?
In order to get here, I installed camllight using this script http://judicael.courant.free.fr/2015/02/20/installationcaml.html
then, I installed melpa
M-x list-packages
to search and to install tuareg. And finally, I edited .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
emacs window:

The mode that you're looking for is not the one that comes with Tuareg. The guy in the video is using the inferior-ocaml mode that is a part of an old caml-mode that used to be distributed with the OCaml compiler. Unless you really want the exact setup as in the video, I would suggest you use a more modern Tuareg mode together with the OCaml Merlin. Otherwise, you should remove Tuareg and install caml-mode using M-x package-install <RET> caml-mode <RET> (see also the documentation on the Github page of the project for more details).

Related

emacs 27.1 for windows 10 org mode not working during first load (Shell command succeeded with no output)

In Windows 10, Emacs 26.3 with inbuilt org version 9.1.9 is working fine (Packaged binaries). Recently I tried Emacs 27.1. with inbuilt org version 9.3. While loading .org files for first time, I get the message (Shell command succeeded with no output) and org files are not rendered at all. To render it, I have to use M-x org-mode or reload the file in the buffer again. I tried to run without loading .emacs.d folder packages. The issue persists. It means, it has nothing to do with already installed other packages. I also tried with latest org version 9.3.7 and and also tried with emacs -Q. Still the issue persists. Any solutions?
I know I'm very late, but found in Jeffs words:
Evil remaps C-i to evil-jump-forward to emulate Vim’s jump lists feature2, which overwrites the default mapping for the TAB key in Org mode.
To fix the tab key’s functionality in Org mode, sacrifice Evil’s C-i backward jumping by turning it off in your configuration with the evil-want-C-i-jump option.
So to solve, just edit your init.el to look like this:
;; Install Evil and disable C-i to jump forward to restore TAB functionality in Org mode.
(use-package evil
:init (setq evil-want-C-i-jump nil)
:config (evil-mode))
source: https://jeffkreeftmeijer.com/emacs-evil-org-tab/

How to configure simpleclip in emacs terminal mode to copy-paste interchangeably with OS?

I'm using emacs -nw (Emacs 24.5, Ubuntu 16.04). And I found that the default emacs M-w C-y keys don't work interchangeably with the operating system.
After some research, it seems that the most comprehensive solution is to use simpleclip. EmacsWiki says that
simpleclip
You can use https://github.com/rolandwalker/simpleclip which ALWAYS
works.
But looking into its usage guide above, simpleclip makes use of a set of keys that are completely different from the default M-w C-y or the OS Ctrl-Shift-c, Ctrl-Shift-v for copy-paste
;; Press super-c to copy without affecting the kill ring.
;; Press super-x or super-v to cut or paste.
I don't really want to use super key a lot with my PC keyboards, and don't want to remember (or persuade others to remember) yet another set of copy-paste keys.
For the GUI emacs, I can copy something in emacs and paste it into another terminal without any configuration. Mostly, I don't feel that Emacs is any different from gedit except that the emacs copy-paste keys M-w C-y can be used in addition.
In the terminal mode, most of it breaks down. If I use OS copy (Ctrl-Shift-c), one line in emacs can be copied into two or more lines in a target terminal because the line is too long. contents copied using M-w simply do not paste into other programs, even though I tried to set certain variables following other SO questions, e.g.:
(setq x-select-enable-clipboard t)
I'm not very familiar with elisp. My question:
How can I customize or configure simpleclip so that copy-paste in emacs -nw is exactly the same as copy-paste in the OS?
Other related SO questions:
How to copy text from Emacs to another application on Linux
emacs terminal mode: how to copy and paste efficiently
I recommend you use the xclip package, which you can install from GNU ELPA (i.e. via M-x package-list-packages). It requires installation of the xclip utility under X11 (e.g. via aptitude install xclip) and uses the pbcopy/pbpaste under macOS.

Emacs24 , org-mode, can't find `latex'(needed to convert LaTeX fragments fo images)

I want to use the command C-c C-x C-l to preview latex code in org-mode. Since the emacs-nox cannot do this, I tried apt-get install emacs24. However, after I have installed the emacs24 with GUI, I get an error like
can't find \`latex'(needed to convert LaTeX fragments to images)
I have installed texlive2016, and I can latex *.tex in shell command.
I added the /paht/to/latex to .emacs, but it don't work well.
Adding the following to my init.el makes it work:
;; Making emacs find latex (so that C-c C-x C-l works on orgmode)
(setenv "PATH" (concat ":/Library/TeX/texbin/" (getenv "PATH")))
(add-to-list 'exec-path "/Library/TeX/texbin/")
It is not a very pretty solution, but it does the job and is very easy to modify and understand.
This solution worked on a Mac running macOS Sierra and Emacs v25.1.
My crystal ball tells me that the problem is that you're not starting the GUI Emacs from a terminal, so it can't inherit your $PATH settings. See for example https://emacs.stackexchange.com/questions/10722/ (that question is within OSX, but the same problem appears in other systems).
Apparently you can set env-vars globally (so that they affect all applications, including those started directly from the GUI) in ~/.pam_environment (that's for GNU/Linux systems). Note that this is only consulted when you login, so you need to logout+login for changes to take effect.

How to run auctex mode on emacs 24.3 on ubuntu 13.10?

So I've installed ELPA, and did the command M-x package-install RET auctex.
I was prompted with the message that 133 files were compiled and one was skipped.
But I cannot find auctex mode anywhere when trying to initialize it with M-x auctex-mode.
Am I missing something?
AUCTeX is a package that includes multiple TeX and LaTeX modes, but does not define an explicit AUCTeX mode. To invoke a mode explicitly, use M-x TeX-<TAB> or M-x LaTeX-<TAB> to see the possibilities.
Assuming that the package is installed correctly, these tab-completions should resolve.
Various of the modes may be started automatically upon opening files with certain extensions, perhaps like myfile.tex or similar.

Use repl for Hy in Emacs

I have successfully installed hy-mode from https://github.com/hylang/hy-mode. I now can open a .hy file in emacs and have syntax highlighting, and editing with paredit is a joy.
I however, don't know how to start a REPL. At the bottom of the github readme, it says:
When in hy-mode, you can launch a Hy REPL by launching a Lisp inferior
process
M-x lisp-inferior-process
That function, however, is not defined for me. What else do I need to install or check to be able to use the repl for Hy?
I am currently using:
GNU Emacs 24.3.1.
Have you tried to set inferior-lisp-program to "hy" and then doing M-x run-lisp?
This is the standard way (or maybe just the "way I know about") of having an inferior lisp process.
As of version 1.0.4 of hy-mode, you can start a hy repl buffer in Emacs using M-x run-hy or use the default key binding of C-c C-z.
In any Emacs mode, including hy-mode, you can use M-x describe-mode or the default key binding of C-h m to show key bindings for the current mode.