Auto start (auto mode) will not be set no matter what

I came across very strange behavior. Regardless of how I set ac-auto-start , be it by tuning, evaluating (setq ac-auto-start 2) , (setq-default ac-auto-start 2) or (setq-local ac-auto-start 2) immediately after that, the variable is set to nil .

I looked at the source of auto-complete mode and ac-slime in my case, but none of them do anything for this variable. I don’t understand how to deal with this.

The effective consequences of this malfunction are that the completion box does not appear on its own, unless I force it to do Mx auto-complete . This behavior is consistent in all modes where auto-complete minor mode is enabled.

EDIT

This seems to be a problem with the latest Emacs. Now it cannot change the values ​​of variables, no matter what variable it is. So, let's say, after running with -Q I found that I cannot evaluate code that uses forms (setq ...) , since it has no effect.: / So, please hold on, I will try to investigate this .. .

This was due to a typo, but the original problem still exists.

The Emacs version is 24.3.50.1, pulled from the trunk about a week ago.


auto-complete - version 1.4 installed from MELPA.

I set the variable by moving the point to the REPL buffer, and then M- : . I check its meaning in the same way.

EDIT2

OK, I finally found the reason: I had the enzyme package and it had an early version of auto-complete inside it, for some reason parts of the auto-complete code were downloaded from there and other parts from the one installed from MELPA. After disabling the enzyme everything works well.

EDIT3

This still happens after startup (auto-complete-mode 1) in the REPL buffer. The variable will become impossible. I was looking for various autocomplete timers that can set something, but so far no luck.

+4
source share
1 answer

Something strange is really happening in the auto-complete-mode setting.

(I am using the ELPA version in GNU Emacs 24.3.1)

This parameter is set to customize-group RET auto-complete :

  '(ac-auto-show-menu t) '(ac-auto-start t) 

At this point, if you are Mx auto-complete-mode , you will get [no match] on the right in the minibuffer. Only after you try to execute Mx auto-complete , changing the "auto-complete-mode is not enabled" strange error, can you Mx auto-complete-mode (but without completing the command ... Hm), and then enter mode.

If you put this in an initialization file (.emacs)

 (require 'auto-complete) (auto-complete-mode t) 

It will be effective only if you change it after launch (?!?).

Same thing with something like

 (if (auto-complete) (auto-complete-mode t)) 

The only way I found to get auto-complete-mode to load at startup is:

 (eval-and-compile (require 'auto-complete nil 'noerror)) 

(The above customize options are now effective)

0
source

Source: https://habr.com/ru/post/1499160/


All Articles