The long and short of it is that I am getting this error message from Emacs when I attempt to use gforth.el and open a .fs file:
Error: Don't know how to compile nil
My .emacs file simply has the following lines.
(autoload 'forth-mode "gforth.el")
(autoload 'forth-block-mode "gforth.el")
(add-to-list 'auto-mode-alist '("\\.fs$" . forth-mode))
The directory gforth.el is contained within is in the load path.
Emacs version: 24.3.1
Attempts to byte compile the file yeild the errors/warnings:
In toplevel form:
gforth.el:734:18:Error: Don't know how to compile nil
gforth.el:734:18:Error: Don't know how to compile nil
gforth.el:734:18:Error: Don't know how to compile nil
gforth.el:734:18:Error: Don't know how to compile nil
gforth.el:734:18:Error: Don't know how to compile nil
In forth-update-show-screen:
gforth.el:1059:36:Warning: `goto-line' used from Lisp code
That command is designed for interactive use only
gforth.el:1061:15:Warning: `goto-line' used from Lisp code
That command is designed for interactive use only
In end of data:
gforth.el:1697:1:Warning: the function `forth-emacs-older' might not be
defined at runtime.
Related
I am using GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0)
I installed auto-complete from Melpa, and have the following line in init.el:
(global-auto-complete-mode 1)
When I open up emacs, it fires up an warning:
Warning (initialization): An error occurred while loading `/Users/lita/.emacs.d/init.elc':
Symbol's function definition is void: global-auto-complete-mode
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
And the auto-complete-mode wasn't start. After I changed the line in init.el into:
(eval-after-load 'auto-complete (global-auto-complete-mode 1))
It still came up with the same warning. But if I `eval-buffer, it turns on the auto-complete.
What's the problem with that??
In your init file, you should call (package-initialize) before referring to packages.
In addition, you have a typo in your eval-after-load statement. You need to quote the form, otherwise it's evaluated immediately, which is the reason why you get the warning. In other words:
(eval-after-load 'auto-complete '(global-auto-complete-mode 1))
Alternatively, you can use the new macro with-eval-after-load.
I decided to give emacs another try, but configuring it can be quite a pain. I wanted something to simple auto complete html tags and php functions, then I find the auto-complete mode.
I installed it through the packages interface in emacs through elpa. I followed the instructions(http://cx4a.org/software/auto-complete/manual.html) for installing the dictionaries, editing the .emacs file with:
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(require 'auto-complete-config)
(ac-config-default)
but when I start emacs I have the following error:
Warning (initialization): An error occurred while loading `/home/dev/.emacs':
Symbol's value as variable is void: ac-dictionary-directories
Starting emacs with the debug options I have the following:
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Error while loading 50dictionaries-common: Symbol's value as variable is void: debian-aspell-only-dictionary-alist
Entering debugger...
find-library-name: Can't find library /usr/share/emacs/24E.3/lisp/subr.el
I tried many things already but to no avail. I checked the value of the 'load-path' variable and the dict folder is in it. What else should I try?
Emacs does not recognize 'ac-dictionary-directories. You should put this line after (require 'auto-complete-config)
I used to use Emacs in windows, recently I want to try Ubuntu 14.04. I used the same settings, same init.el, same packages. but I got an error when start Emacs under Ubuntu.
I am not an elisp programmer, and I hope I can get some help here. I am using Prelude for Emacs 24, but even I run emacs with -Q, the same error is still there....
The errors are as follows:
Debugger entered--Lisp error: (invalid-function "abbrev")
"abbrev"("convenience" "matching")
byte-code("\300\301\302\303\304\305\306\307\310\311\312\"&\207" [define-package "company" "20140731.944" "Modular text completion framework" ((emacs "24.1") (cl-lib "0.5")) :url "http://company-mode.github.io/" :keywords "abbrev" "convenience" "matching"] 11)
load("/home/zhijia/.emacs.d/elpa/company-20140731.944/company-pkg" nil t)
package-load-descriptor("/home/zhijia/.emacs.d/elpa" "company-20140731.944")
package-maybe-load-descriptor("company" "20140731.944" "/home/zhijia/.emacs.d/elpa")
package-load-all-descriptors()
package-initialize()
byte-code("\302\303!\210\302\304!\210\305\306\307\310#\210\311\312\"\313 \207" [prelude-dir package-user-dir require cl package add-to-list package-archives ("melpa" . "http://melpa.milkbox.net/packages/") t expand-file-name "elpa" package-initialize] 4)
require(prelude-packages)
eval-buffer(#<buffer *load*> nil "/home/zhijia/.emacs.d/init.el" nil t) ; Reading at buffer position 4156
load-with-code-conversion("/home/zhijia/.emacs.d/init.el" "/home/zhijia/.emacs.d/init.el" nil nil)
load("/home/zhijia/.emacs.d/init.el" nil nil t)
load-file("~/.emacs.d/init.el")
call-interactively(load-file record nil)
command-execute(load-file record)
execute-extended-command(nil "load-file")
call-interactively(execute-extended-command nil nil)
Delete ~/.emacs.d/elpa, restart Emacs, and let Prelude install all packages again.
It looks like you've stumbled across incompatibilities between package.el in different Emacs versions. I'm not sure why, though. Normally errors like this only occur when upgrading from Emacs 23 to 24, or when upgrading from Emacs 24.3 to the (not yet released) Emacs 24.4. Neither of these seem to be the case here, though.
You are getting this error with emacs -Q as well, because emacs -Q still loads all user-installed packages from ~/.emacs.d/elpa.
It seems you need to remove the ~/emacs.d/elpa/company-XXX and re-install it.
Even if you call it with -Q, it still has a startup file that checks the ~/.emacs.d/ directory.
Try first to remove the .elc files before to remove everything.
I'm an Emacs beginner. I just installed a Emacs on Linux. I want to integrate Emacs with gdb.
Based on some instruction from the internet, I downloaded 2 .el files: multi-gdb-ui.el and multi-gud.el. I put these 2 files in
/tmp/test/emacs/multi-gdb-ui.el
and
/tmp/test/emacs/multi-gud.el
I created a new .emacs file. I only put the following lines in it:
[root#localhost ~]# cat .emacs
(setq gdb-many-windows t)
;; this is used for GDB
(load-library "/tmp/test/emacs/multi-gud.el")
(load-library "/tmp/test/emacs/multi-gdb-ui.el")
Then I launched Emacs. But I got many errors. It asked me to launch it with --debug-init,
so I ran the following:
emacs --debug-init
I got these errors:
Debugger entered--Lisp error: (void-variable overlay-arrow-variable-list)
add-to-list(overlay-arrow-variable-list gud-overlay-arrow-position)
eval-buffer(#<buffer *load*<2>> nil "/tmp/test/emacs/multi-gud.el" nil t)
load-with-code-conversion("/tmp/test/emacs/multi-gud.el" "/tmp/shili/emacs/multi-gud.el" nil nil)
load("/tmp/shili/emacs/multi-gud.el")
load-library("/tmp/shili/emacs/multi-gud.el")
eval-buffer(#<buffer *load*> nil "~/.emacs" nil t)
load-with-code-conversion("/root/.emacs" "~/.emacs" t t)
load("~/.emacs" t t)
#[nil "^H\205\227^# ▒=\203^Q^#▒^H▒Q\2025^# ▒=\203'^#▒▒▒▒#\203#^#▒\2025^#▒\2025^# ▒=\2031^#▒\2025^#▒^H▒Q^Z▒^S▒\n▒\211#\210^K▒=\203F^#▒^S^K\203\210^#▒^K!▒\232\203$
command-line()
normal-top-level()
So how can I load these 2 .el files successfully?
The issue appears to be caused because the folders containing the source files at issue have apparently not been added to the load-path of Emacs. In this particular case, the original poster may either add the following directories to the load-path (i.e., /tmp/shili/emacs/ and /tmp/test/emacs/); or, the source files at issue may be placed inside an Emacs directory that is already wired with the load-path.
The following links contain relevant documentation relating to the load-path, which may be helpful in that regard:
http://www.emacswiki.org/emacs/LoadPath
http://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Libraries.html
I'm trying to get semantic completions working with emacs 24 and the version of cedet that comes with it. Completions work for classes I defined in my own source file, but completion isn't working for the standard library or STL stuff Here is my emacs config:
(require 'cedet)
(require 'semantic)
(require 'semantic/ia)
(require 'semantic/bovine/gcc)
(semantic-add-system-include "/usr/include/c++/4.6.3" 'c++-mode)
(setq semantic-default-submodes
'(global-semantic-idle-scheduler-mode
global-semanticdb-minor-mode
global-semantic-idle-summary-mode
global-semantic-idle-completions-mode
global-semantic-highlight-func-mode
global-semantic-decoration-mode
global-semantic-mru-bookmark-mode))
(setq semanticdb-default-save-directory "~/.semanticdb/"
semantic-complete-inline-analyzer-idle-displayor-class 'semantic-displayor-ghost)
(semantic-mode t)
In my ~/.semanticdb directory I only see "!usr!include!c++!4.6!x86_64-linux-gnu!bits!semantic.cache", which isn't even using the version I specified in the config.
When I try M-x semantic-analyze-possible-completions on a std::list, for example, I get an error saying: "Cannot find types for std::list"
Any suggestions for how to debug this or how to fix it?
I was installing today a fresh Ubuntu 13.04 on my new SSD,
and here are my steps to configure CEDET ( I checked that it gives completions for std::list).
Basic setup
Get a fresh emacs and build it from source.
It's as easy as
./configure && make && sudo make install
Add to .emacs
(semantic-mode 1)
That's the whole setup.
Testing
Run emacs without loading anything:
emacs -q test.cc
Enter the code
#include <list>
int main() {
std::list lst;
lst.$
return 0;
}
M-x semantic-mode
with point at $, M-x semantic-ia-show-variants
Troubleshooting
If stuff doesn't work, it's likely that the semanticdb is corrupt.
Just find where it is, for me it's semanticdb-default-save-directory="~/.emacs.d/semanticdb",
and remove everything from there.
Then, when visiting a source file, call semantic-force-refresh.