Strange behaviour when compiling auctex from MELPA in Emacs (w32 version) in Cygwin - emacs

I tried to compile the auctex from Emacs MELPA. The version is: 11.88.4
When I first open a .tex file, compile AUCTEX, and change to "TeX-latex-mode", Emacs will work properly, the menu bar also change to latex state.
However, when I close Emacs, restart Emacs again and open a .tex file, Emacs will give:
Debugger entered--Lisp error: (error "Autoloading failed to define function TeX-latex-mode")
And auctex will not work...
It seems the problem is in autoloading certain state when initialize the auctex for a tex file.
Any help?

Problem Solved! My mistake.
I modularised my init.el and separated the LaTeX settings to latex.el, which conflict with the latex.el in auctex.
I renamed the file to latex_settings and everyting works fine. (A small warning that no docstring for 'tex-start-shell', but that's fine.)

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/

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 jshint in emacs web-mode?

As stated on the web-mode.org page, since May 2014 web-mode supports jshint.
I've been using jshint in js-mode, for which purpose I installed flycheck and added the following setting to the .emacs file:
(require 'flycheck)
(add-hook 'js-mode-hook
(lambda () (flycheck-mode t)))
I would also like to make jshint work in web-mode, but failed to do so. Here’s what I tried:
open .js file
M-x web-mode
M-x web-mode-jshint
M-x flycheck
But no luck. Could you please suggest how to make jshint work in emacs's web-mode?
UPDATE: fxbois pointed out below that the only command that needs to be executed is
M-x web-mode-jshint. This works on regular .js files, but does not work on .js.erb files (which are recognized by the regular web-mode). So the next part of my question is, does anybody know how to make web-mode-jshint work with .js.erb files?
You should only have to execute M-x web-mode-jshint
(of course, jshint should be installed)
I just ran into this in the past 20 minutes and found that web-mode-jshint does not run automatically, use C-c C-j to evaluate the buffer manually. I am still searching for a way to run the evaluation automatically.
(IMO) It is unfortunate that web-mode-jshint does not integrate existing jshint solutions, e.g. flycheck, but implements its own highlighting.

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.

Emacs lua-mode (File mode specification error)

I get the following error
File mode specification error: (error "Unknown rx form `group-n'")
when I try to edit a .lua file in emacs. I use GNU Emacs 23.3.1, and I have the following in my .emacs file:
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
I installed lua-mode from http://immerrr.github.com/lua-mode/.
I have tried to run emacs with the --debug-init option, but it did not enter the debugger, instead the .lua file opens in text-mode and not lua-mode..
(See also Emacs lua-mode issue: (void-function interactively-called-p))
Your Emacs is complaining because it knows nothing about group-n symbol used in rx macro in one of the recent commits, and that is probably because that symbol was only introduced in Emacs 24.2 and your one is a bit older.
I must admit, when coding that I thought that rx package was much more mature and didn't even bother looking up its changes in Emacs news. So, there are two options here:
either you update your Emacs to 24.2
or you could downgrade to older revision and wait while I have the chance to rewrite that piece of code.
UPD: the issue is fixed in upstream, the code is compatible with Emacs23 again.