Error with Kieran Healy's emacs starter kit - emacs

I have installed Kieran Healy's emacs social sciences starter kit. I have changed the name of the file kjhealy.org to ljs.org (as per his instructions). The starter kit settings seem to load, but I get the following error.
Warning (initialization): An error occurred while loading
‘/Users/ljs/.emacs.d/init.el’:
File error: Cannot open load file, No such file or directory, ob-shell
When I open emacs with the --debug-init files, I get the following:
Debugger entered--Lisp error: (void-function package-initialize)
(package-initialize)
eval-buffer(#<buffer *load*> nil "/Users/ljs/.emacs.d/init.el" nil t)
; Reading at buffer position 403
load-with-code-conversion("/Users/ljs/.emacs.d/init.el"
"/Users/ljs/.emacs.d/init.el" t t)
load("/Users/ljs/.emacs.d/init" t t)
#[nil "^H\205\276^# \306=\203^Q^#\307^H\310Q\202A^#
\311=\2033^#\312\307\313\314#\203#^#\315\202A^#\312\307\313\$
command-line()
normal-top-level()
Any help with this greatly appreciated.

The underlying reason for this problem is that the file ob-sh.el was renamed to ob-shell.el and the corresponding babel language became shell. That happened in version 8.2.5 (more precisely, it's commit 583e7ab17:
$ git describe 583e7ab17
release_8.2.4-332-g583e7ab17
so 332 commits after 8.2.4).
So if your version of emacs is 8.2.4 or earlier, you have to use sh as the babel language and load the file ob-sh.el. For 8.2.5 and later (including the current version that is distributed with emacs), you have to use shell as the babel language and load the file ob-shell.el.
Hope that clarifies.

Related

file-error "https://melpa.org/packages/archive-contents" "Bad Request" during emacs 25.2 startup with Prelude initialization

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.

error on invalid function: abbrev

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.

Beginner issue: Errors loading .el files in Emacs

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

emacs24 semantic completion

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.

Trouble with load Lift package

When I try load Lift package through emacs-slime.
(load "/home/user/lib/lift")
I catch the next error
; compiling (LOAD "/home/user/lib/lift");; swank:close-connection: encoding error on stream
#<SB-SYS:FD-STREAM
for "socket 127.0.0.1:36328, peer: 127.0.0.1:59724"
{1003D9F5E1}>
(:EXTERNAL-FORMAT :LATIN-1):
the character with code 1069 cannot be encoded.
What wrong and how I can load this package?
From the CL spec, LOAD is used for loading Common Lisp source or compiled files. I'm guessing that /home/user/lib/lift is a directory on your system, and that's why LOAD isn't working.
You'll probably have the most luck if you install LIFT using Quicklisp, then load the library like it says in the LIFT User's Guide:
(in-package #:common-lisp-user)
(use-package :lift)