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.
Related
New job, new emacs setup. I've used emacs for years but never did much customization. Running CentOS Linux 7.7 and emacs 25.2. I wanted to try the Prelude "starter kit" so I installed it. On emacs starup the Prelude init.el file (~/.emacs.d/init.el) runs and I see: error: Package ‘ag-’ is unavailable.
When I start emacs with debug enabled I see the following back trace:
Debugger entered--Lisp error: (file-error "https://melpa.org/packages/archive-contents" "Bad Request")
signal(file-error ("https://melpa.org/packages/archive-contents" "Bad Request"))
package--download-one-archive(("melpa" . "https://melpa.org/packages/") "archive-contents" nil)
package--download-and-read-archives(nil)
package-refresh-contents()
prelude-install-packages()
require(prelude-packages)
.
.
I'd appreciate any suggestions on how to resolve this.
I just ran into similar issues on a new Debian install, it looks like there are some setup issues in the default init.el.
Check your init.el against the [https://melpa.org/#/getting-started][1], it currently gives the default melpa link as: "https://melpa.org/packages/" - in my case it was http rather than https.
Then check that M-x package-list-packages works, go through the M-x package-refresh-contents , update cycle. For some reason this took a couple of attempts to work for me.
I am trying to set up eslint on emacs by writing this in .emacs:
(setq flycheck-disabled-checkers '(javascript-jshint))
(setq flycheck-checkers '(javascript-eslint))
(add-hook 'js-mode-hook
(lambda ()
(flycheck-mode t)
(tern-mode t)
))
What I am getting when trying to open js files then is this error message:
Just updated eslint to the latest version (1.3.1) and emacs to the latest version (24.5). Hoped that would help.
It didn't.
(I do have lots of old packages in ~/.emacs.d/elpa directory that are left from the time I installed them on the previous emacs version (24.3). But I don't think that's causing any issues).
Could you please suggest how to solve this problem with eslint?
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.
I've just installed the new Aquamacs 2.0 in my Mac Os X 10.6.3 and I'm
an happy user of IDLWAVE on Aquamacs for programming in IDL.
Unfortunately I run into a problem which I can't understand.
I used in my configuration file to put the following
(setq idlwave-surround-by-blank t)
for the beautiful space around operator.
This used to work till
Aquamacs 2.0 preview b3 (third beta release)
from that on, it stops to work and every time I type an operator (the
same for '=' '<' '>' etc) I got the following message
Debugger entered--Lisp error: (void-variable idlwave-expand-equal)
(lambda nil (interactive) (self-insert-command 1) idlwave-expand- equal -1 -1)()
call-interactively((lambda nil (interactive) (self-insert-command 1)
idlwave-expand-equal -1 -1) nil nil)
Any help is welcommed
There was a bug introduced in Emacs 23.2. Try a newer version of the package or move to a version of Emacs based on 23.3 or 23.1.