emacs initialization and updating emacs packages - emacs

I am violating probably the most essential emacs package rule in my .emacs file by loading a specific path to an emacs (workgroups2) package which gets updated. So, everytime a new version is released and when I upgrade I have to edit my emacs file (this is the first line below).
The following is the relevant section of my emacs file. How can I load this without adding a specific path? Let me know what other suggestions you have and thanks!
To be clear the line we are considering is: (add-to-list 'load-path "~/.emacs.d/elpa/workgroups2-20130915.1509")
(add-to-list 'load-path "~/.emacs.d/elpa/workgroups2-20130915.1509")
(require 'workgroups2)
(setq package-enable-at-startup nil)
(package-initialize)
(desktop-save-mode nil) ; save all opened files (or disable it)
(setq wg-prefix-key (kbd "C-c w")
wg-restore-associated-buffers t ; restore all buffers opened in this WG?
wg-use-default-session-file t ; turn off for "emacs --daemon"
wg-default-session-file "~/.emacs.d/emacs_def.wg"
wg-use-faces nil
wg-morph-on nil) ; animation off
;; Keyboard shortcuts - load, save, switch
(global-set-key (kbd "<pause>") 'wg-reload-session)
(global-set-key (kbd "C-S-<pause>") 'wg-save-session)
(global-set-key (kbd "s-z") 'wg-switch-to-workgroup)
(global-set-key (kbd "s-/") 'wg-switch-to-previous-workgroup)
(workgroups-mode 1) ; Activate workgroups
EDIT: If I comment out that line, this is what the debugger gives me:
Debugger entered--Lisp error: (file-error "Cannot open load file" "workgroups2")
require(workgroups2)
eval-buffer(#<buffer *load*> nil "/home/d2b2/.emacs.d/init.el" nil t) ; Reading at buffer position 6014
load-with-code-conversion("/home/d2b2/.emacs.d/init.el" "/home/d2b2/.emacs.d/init.el" t t)
load("/home/d2b2/.emacs.d/init" t t)
#[0 "^H\205\262^# \306=\203^Q^#\307^H\310Q\202;^# \311=\204^^^#\307^H\312Q\202;^#\313\307\314\315#\203*^#\316\202;^#\313\307\314\317#\203:^#\320\nB^R\321\202;^#\316\$
command-line()
normal-top-level()
EDIT: Now commenting out both lines we have the following errors:
Debugger entered--Lisp error: (error ":END: line missing at position 186")
signal(error (":END: line missing at position 186"))
error(":END: line missing at position %s" 186)
org-flag-drawer(t)
org-cycle-hide-drawers(all)
org-set-startup-visibility()
org-mode()
desktop-restore-file-buffer("/home/d2b2/.todo" ".todo" nil)
#[nil "^H \236A\206^H^#\305\n^K\f#\207" [desktop-buffer-major-mode desktop-buffer-mode-handlers desktop-buffer-file-name desktop-buffer-name desktop-buffer-misc deskt$
desktop-create-buffer(206 "/home/d2b2/.todo" ".todo" org-mode (workgroups-mode) 1 (nil nil) nil nil ((buffer-file-coding-system . undecided-unix) (truncate-lines . t)))
eval-buffer(#<buffer *load*> nil "/home/d2b2/.emacs.desktop" nil t) ; Reading at buffer position 813
load-with-code-conversion("/home/d2b2/.emacs.desktop" "/home/d2b2/.emacs.desktop" t t)
load("/home/d2b2/.emacs.desktop" t t t)
desktop-read()
#[nil "\304\211^X \235\203^O^#\305^H \"^Q\306^R)\n\205^Z^#\307 \210\310\211^S\207" [key command-line-args desktop-save-mode inhibit-startup-screen "--no-desktop"$
run-hooks(after-init-hook)
command-line()
normal-top-level()

Make sure, that package-directory-list includes your path to elpa ~/.emacs.d/elpa.
Then package.el initializes some package, it adds name of package to
package-activated-list and pushes package directory
(e.g. ~/.emacs.d/elpa/workgroups2-20130915.1509) to load-path
automatically.
For me it works as usual, I don't add any specific pathes for packages manually.
The value of package-enable-at-startup is t in my config.
package-enable-at-startup doc:
"Whether to activate installed packages when Emacs starts...If the
value of package-enable-at-startup is nil, you can type M-x
package-initialize to activate the package system at any time."
(require 'workgroups2) is before package initialization in your config, try to move it below.

Related

Cannot open new frames with undo-tree installed

I use undo-tree 0.6.5 (from Elpa), and it works quite well most of the time. However, if I have not yet called C-x-u on a buffer, then from this buffer I can't open a new frame. If I do C-x-5-2, Emacs opens the `Backtrace buffer with this:
Debugger entered--Lisp error: (wrong-type-argument undo-tree nil)
signal(wrong-type-argument (undo-tree nil))
undo-tree-current(nil)
(undo-tree-node-previous (undo-tree-current buffer-undo-tree))
(and undo-tree-mode (not buffer-read-only) (not (eq t buffer-undo-list)) (undo-tree-node-previous (undo-tree-current buffer-undo-tree)))
x-create-frame(((visibility) (vertical-scroll-bars . left) (reverse . t)))
x-create-frame-with-faces(((vertical-scroll-bars . left) (reverse . t)))
#f(compiled-function (params) #<bytecode 0x1fdd4b1bc7bf>)(((vertical-scroll-bars . left) (reverse . t)))
apply(#f(compiled-function (params) #<bytecode 0x1fdd4b1bc7bf>) ((vertical-scroll-bars . left) (reverse . t)))
frame-creation-function(((vertical-scroll-bars . left) (reverse . t)))
make-frame()
make-frame-command()
funcall-interactively(make-frame-command)
call-interactively(make-frame-command nil nil)
command-execute(make-frame-command)
Then, I do C-x-u so the undo-tree buffer related to that buffer is created, and from then on I can create other frames.
Is there a workaround for this?
edit: it also prevents the use of menus. When I try to click on any menu item, the same message shows up.
edit: opening Emacs with this minimalistic startup file gives the same error:
(add-to-list 'load-path
"~/.emacs.d/elpa/undo-tree-0.6.5")
(require 'undo-tree)
(global-undo-tree-mode)
(setq debug-on-error t)
Okay, so I got it working. I was using the ELPA version of undo-tree, which is version 0.6.5. So a couple of days ago I noticed that the developer has a new version in his git repository, 0.6.6. I installed it locally and the problem was gone!
First, get a copy of the git repository:
$ cd ~/.emacs.d
$ git clone http://www.dr-qubit.org/git/undo-tree.git
Then add this to your Emacs config:
(load "~/.emacs.d/undo-tree/undo-tree.el")
(require 'undo-tree)
(global-undo-tree-mode)

idris-mode – Buffer has no process

I'm new to emacs (coming from vim, where I can't get idris-vim to work) and have these packages installed via el-get:
ace-jump-mode installed A quick cursor location minor mode for emacs.
el-get installed Manage the external elisp bits and pieces you depend upon.
evil-leader installed Add <leader> shortcuts to Evil, the extensible vim emulation layer
evil-numbers installed Increment/decrement numbers in Evil, the extensible vim emulation layer. Like C-a/C-x in vim. After installation, you will need to add a key-binding for evil-numbers. For example: (define-key evil-normal-state-map (kbd "C-c +") 'evil-numbers/inc-at-pt) (define-key evil-normal-state-map (kbd "C-c -") 'evil-numbers/dec-at-pt)
evil-surround installed Emulate Tim Pope's surround.vim in evil, the extensible vim emulation layer for emacs
evil installed Evil is an extensible vi layer for Emacs. It emulates the main features of Vim, and provides facilities for writing custom extensions.
goto-chg installed Goto the point of the most recent edit in the buffer.
haskell-mode installed A Haskell editing mode
idris-mode installed Major mode for the Idris language
j-mode installed Emacs major mode for editing J code.
linum-relative installed Display relative line number in the left margin
undo-tree installed Treat undo history as a tree
My ~/.emacs.d/init.el looks like this:
(add-to-list 'load-path "~/.emacs.d/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
(setq mouse-wheel-progressive-speed nil)
(setq mouse-wheel-f 't)
(setq scroll-s 1)
(add-to-list 'load-path "~/.emacs.d/lojban")
(autoload 'lojban-parse-region "lojban" nil t)
(autoload 'lojban-mode "lojban-mode" nil t)
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil 'noerror)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
(goto-char (point-max))
(eval-print-last-sexp)))
(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes")
(el-get 'sync)
(add-to-list 'load-path "~/.emacs.d/j-mode/")
(autoload 'j-mode "j-mode.el" "Major mode for editing J files" t)
(add-to-list 'auto-mode-alist '("\\.ij[rstp]$" . j-mode))
;(custom-set-face
; '(j-verb-face ((t (:foreground "cornflower blue"))))
; '(j-adverb-face ((t (:foreground "goldenrod"))))
; '(j-conjunction-face ((t (:foreground "olive drab"))))
; '(j-other-face ((t (:foreground "Black")))))
(require 'evil-leader)
(global-evil-leader-mode)
(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
;(require 'lalopmak-evil)
(define-key evil-normal-state-map "," 'evil-ex)
(define-key evil-motion-state-map ":" 'evil-repeat-find-char-reverse)
(define-key evil-window-map "j" 'evil-window-left)
(define-key evil-window-map "J" 'evil-window-move-far-left)
(define-key evil-window-map "k" 'evil-window-down)
(define-key evil-window-map "K" 'evil-window-move-very-bottom)
(define-key evil-window-map "h" 'evil-window-up)
(define-key evil-window-map "H" 'evil-window-move-very-top)
(define-key evil-motion-state-map "j" 'evil-backward-char)
(define-key evil-motion-state-map "J" 'evil-window-top)
(define-key evil-motion-state-map "k" 'evil-next-line)
(define-key evil-motion-state-map "h" 'evil-previous-line)
(define-key evil-motion-state-map (kbd "C-n") 'evil-scroll-line-up)
(define-key evil-normal-state-map (kbd "M-x") 'execute-extended-command)
Since I'm using evil, and idris-mode has bindings that work with evil, I tried to follow the case splitting example for vim. Starting from a fresh session, here's what happens:
I open the vadd.idr file, which already contains 3 lines (1 of which is blank).
I move to the last line and press \d.
I get a long error message, which disappears before I can read it.
The Idris REPL opens in a new split pane.
The command line (at the bottom of the window) shows Buffer vadd.idr has no process.
I also try out the REPL, typing in insert mode. Upon pressing enter, I get Buffer *idris-repl* has no process, and nothing further happens.
In a Linux shell, echo $PATH produces /home/james/bin /home/james/.cabal/bin /home/james/bin /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/vendor_perl /usr/bin/core_perl, and idris works from the shell as expected.
When exiting emacs (via a few ZZs), I'm told that active processes exist. Here's the process list I'm shown:
Process Status Buffer TTY Command
idris run *idris-process* /dev/pts/3 idris --ideslave-socket
Because it may be connected, here's the error I get from the same file in vim, using idris-vim:
:call IdrisReload(0)
"vadd.idr" 3L, 62C written
Uncaught error: connect: does not exist (Connection refused)
Press ENTER or type command to continue
I use the ex command because the leader binding doesn't work (yet another issue I have).
Sorry for making such a long question. I wanted to include most relevant pieces of information, even if that meant adding irrelevant things.
Edit: more; I found the debugger (setting “Enter Debugger on Error” from the menu).
I press \d, then see this in a buffer:
Debugger entered--Lisp error: (file-error "make client process failed" "connection refused" :name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil)
make-network-process(:name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil)
open-network-stream("Idris Ideslave" "*idris-connection*" "127.0.0.1" 0)
idris-connect(0)
idris-process-filter(" ____ __ _ \n / _/___/ /____(_)____ \n / // __ / ___/ / ___/ Version 0.9.12\n _/ // /_/ / / / (__ ) http://www.idris-lang.org/ \n /___/\\__,_/_/ /_/____/ Type :? for help \n\n")
comint-output-filter(#<process idris> " ____ __ _ \n / _/___/ /____(_)____ \n / // __ / ___/ / ___/ Version 0.9.12\n _/ // /_/ / / / (__ ) http://www.idris-lang.org/ \n /___/\\__,_/_/ /_/____/ Type :? for help \n\n")
accept-process-output(#<process idris> 3)
idris-run()
idris-ensure-process-and-repl-buffer()
idris-load-file-sync()
idris-add-clause(nil)
call-interactively(idris-add-clause nil nil
and in the ex command line see
make client process failed: connection refused, :name, Idris Ideslave, :buffer, *idris-connection*, :host, 127.0.0.1, :service, 0, :nowait, nil
I have no idea what it's trying to do.
Edit: Here's the right-hand end of vadd.idr's buffer's status line (correct term?):
(Idris (Not loaded) ElDoc Ind Undo-Tree)
Not loaded looks worrying, but I don't know any more about it.
Edit: Going back to the Vim issue, I ran
$ vim -V9vimlog vadd.idr
:call IdrisReload(0)
ZZ
$ ack idris vimlog
Everything from the log looks pretty normal, until the end (brought about by the error):
Calling shell to execute: "(idris --check vadd.idr) &> /tmp/vbKELys/1"
Error detected while processing function <SNR>38_BufWritePostHook..<SNR>38_UpdateErrors..<SNR>38_CacheErrors..16..15..SyntaxCheckers_idris_idris_GetLocList..SyntasticMake:
Calling shell to execute: "(idris --client ':l /mnt/sda9/home/james/Documents/idris/vadd.idr') >/tmp/vbKELys/2 2>&1"
So, I find that the log file includes
Calling shell to execute: "(idris --check vadd.idr) &> /tmp/vbKELys/1"
Error detected while processing function <SNR>38_BufWritePostHook..<SNR>38_UpdateErrors..<SNR>38_CacheErrors..16..15..SyntaxCheckers_idris_idris_GetLocList..SyntasticMake:
line 66:
E380: At bottom of quickfix stack
error list 1 of 1; 1 errors
Calling shell to execute: "(idris --client ':l /mnt/sda9/home/james/Documents/idris/vadd.idr') >/tmp/vbKELys/2 2>&1"
Uncaught error: connect: does not exist (Connection refused)
Running those shell commands from the shell, I get:
$ idris --check vadd.idr
$ idris --client ':l /mnt/sda9/home/james/Documents/idris/vadd.idr'
Uncaught error: connect: does not exist (Connection refused)
$ idris --client vadd.idr
Uncaught error: connect: does not exist (Connection refused)
Plain idris vaddr.idr works fine, by the way.
It looks to me like you may have a version mismatch between Idris and idris-mode. Somewhat recently, idris-mode started using a socket to communicate with the compiler rather than stdin/stdout. If you're using idris-mode from MELPA, that's what it will be expecting. Generally, the version on MELPA will require the latest Git version of the compiler. The latest tagged release from Github (available in MELPA-stable) will work with the latest release of Idris.
In Vim, it's much more difficult to run a subprocess than it is in Emacs, so in Vim, you need to have a separate running Idris REPL. Commands are then sent using the --client option, which causes the command to be run in the background REPL. This background REPL should have the correct working directory. I saw that you used --check above - this tells Idris to type check a file and then exit. Try starting a REPL up in one terminal, then using --client from another.

Installing el-get for managing packages in Emacs 24.3

The instructions for installing el-get say the following:
;; Copy/paste this code into your *scratch* buffer,
;; hit C-j, and you have a working el-get.
(url-retrieve
"https://raw.github.com/dimitri/el-get/master/el-get-install.el"
(lambda (s)
(goto-char (point-max))
(eval-print-last-sexp)))
When I do so, a buffer called *Backtrace* opens up in debugger-mode with the following contents:
Debugger entered--Lisp error: (void-variable closed)
eval(closed nil)
eval-last-sexp-1(t)
eval-last-sexp(t)
eval-print-last-sexp()
(lambda (s) (goto-char (point-max)) (eval-print-last-sexp))(nil)
apply((lambda (s) (goto-char (point-max)) (eval-print-last-sexp)) nil)
url-http-activate-callback()
url-http-content-length-after-change-function(589 3952 3363)
url-http-generic-filter(#<process raw.github.com> ";;; el-get-install.el --- installer for the lazy
;;
;; Copyright (C) 2010 Dimitri Fontaine
;;
;; Author: Dimitri Fontaine <dim#tapoueh.org>
;; URL: http://www.emacswiki.org/emacs/el-get.el
;; Created: 2010-06-17
;; Keywords: emacs package elisp install elpa git git-svn bzr cvs apt-get fink http http-tar
;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/
;;
;; This file is NOT part of GNU Emacs.
;;
;; bootstrap your el-get installation, the goal is then to use el-get to
;; update el-get.
;;
;; So the idea is that you copy/paste this code into your *scratch* buffer,
;; hit C-j, and you have a working el-get.
(let ((el-get-root
(file-name-as-directory
(or (bound-and-true-p el-get-dir)
(concat (file-name-as-directory user-emacs-directory) \"el-get\")))))
(when (file-directory-p el-get-root)
(add-to-list 'load-path el-get-root))
;; try to require el-get, failure means we have to install it
(unless (require 'el-get nil t)
(unless (file-directory-p el-get-root)
(make-directory el-get-root t))
(let* ((package \"el-get\")
(buf (switch-to-buffer \"*el-get bootstrap*\"))
(pdir (file-name-as-directory (concat el-get-root package)))
(git (or (executable-find \"git\")
(error \"Unable to find `git'\")))
(url (or (bound-and-true-p el-get-git-install-url)
\"http://github.com/dimitri/el-get.git\"))
(default-directory el-get-root)
(process-connection-type nil) ; pipe, no pty (--no-progress)
;; First clone el-get
(status
(call-process
git nil `(,buf t) t \"--no-pager\" \"clone\" \"-v\" url package)))
(unless (zerop status)
(error \"Couldn't clone el-get from the Git repository: %s\" url))
;; switch branch if we have to
(let* ((branch (cond
;; Check if a specific branch is requested
((bound-and-true-p el-get-install-branch))
;; Check if master branch is requested
((boundp 'el-get-master-branch) \"master\")
;; Read the default branch from the el-get recipe
((plist-get (with-temp-buffer
(insert-file-contents-literally
(expand-file-name \"recipes/el-get.rcp\" pdir))
(read (current-buffer)))
:branch))
;; As a last resort, use the master branch
(\"master\")))
(remote-branch (format \"origin/%s\" branch))
(default-directory pdir)
(bstatus
(if (string-equal branch \"master\")
0
(call-process git nil (list buf t) t \"checkout\" \"-t\" remote-branch))))
(unless (zerop bstatus)
(error \"Couldn't `git checkout -t %s`\" branch)))
(add-to-list 'load-path pdir)
(load package)
(let ((el-get-default-process-sync t) ; force sync operations for installer
(el-get-verbose t)) ; let's see it all
(el-get-post-install \"el-get\"))
(unless (boundp 'el-get-install-skip-emacswiki-recipes)
(el-get-emacswiki-build-local-recipes))
(with-current-buffer buf
(goto-char (point-max))
(insert \"\
Congrats, el-get is installed and ready to serve!\")))))
closed
")
Do I take that there is an error in the file https://raw.github.com/dimitri/el-get/master/el-get-install.el ? Or is there anything else that I have to setup to get such a script working?
Somehow the downloaded file gets a closed line appended, which isn't present in the original file - not sure why, it doesn't happen for me. It's visible at the very end of the backtrace.
You could copy the entire el-get-install.el file, paste into *scratch* and eval that with C-j instead.

Cedet - Wrong type argument , stringp, 1

I am using the latest cedet version from bzr. My cedet configuration is given below ( Taken from Alex Ott's file ).
(setq cedet-root-path (file-name-as-directory "~/cedet"))
(load-file (concat cedet-root-path "cedet-devel-load.el"))
(add-to-list 'load-path (concat cedet-root-path "contrib"))
;; select which submodes we want to activate
(add-to-list 'semantic-default-submodes 'global-semantic-mru-bookmark-mode)
(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-scheduler-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-stickyfunc-mode)
(add-to-list 'semantic-default-submodes 'global-cedet-m3-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-highlight-func-mode)
(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
;; Activate semantic
(semantic-mode 1)
I always get error "Wrong type argument , stringp 1" whenever I open a C source code.
Looks like (semantic-mode 1)
is causing the issue. Any help is appreciated.
I am using emacs 24, and I didn't see this issue if I use cedet that comes with emacs.
EDIT : Stack trace attached. Will send this to cedet-delevel mailing list also. .~/.semanticdb is not created yet( new laptop ).
Debugger entered--Lisp error: (wrong-type-argument stringp 1)
string-match("\n" 1 0)
split-string(1 "\n")
semantic-cpp-defs(1)
semantic-gcc-setup()
semantic-default-c-setup()
semantic-new-buffer-fcn()
semantic-mode(1)
eval-buffer(#<buffer *load*> nil "/home/sudheesh/Dropbox/cedet_new.el" nil t) ; Reading at buffer position 898
load-with-code-conversion("/home/sudheesh/Dropbox/cedet_new.el" "/home/sudheesh/Dropbox /cedet_new.el" nil nil)
load("/home/sudheesh/Dropbox/cedet_new.el" nil nil t)
load-file("~/Dropbox/cedet_new.el")
SOLVED:
This issue is solved now. I haven't installed g++ compiler. The issue is because of this. Installing g++ compiler solved this issue. Thanks to the support of David Engster from cedet-dlevel mailing list.

ELPA/Marmalade reports "cannot open load file" for ~/.emacs.d/elpa/archives/-pkg

I have installed Marmalade and downloaded some interesting packages. But now, when I start Emacs I get this error:
Cannot open load file: c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg
If I use --debug-init, I get:
Debugger entered--Lisp error: (file-error "Cannot open load file" "c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg")
load("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg" nil t)
(if (file-directory-p pkg-dir) (load (concat pkg-dir ... "-pkg") nil t))
(let ((pkg-dir ...)) (if (file-directory-p pkg-dir) (load ... nil t)))
package-load-descriptor("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/" "archives")
(lambda (name) (package-load-descriptor dir name))("archives")
mapc((lambda (name) (package-load-descriptor dir name)) ("anything-1.287" "anything- complete-1.86" "anything-config-0.4.1" "archive-contents" "archive-contents~" "archives" "auto-indent-mode-0.35" "builtin-packages" "builtin-packages~" "clojure-mode-1.7.1" "clojurescript-mode-0.5" "coffee-mode-0.3.0" "color-file-completion-1.0.1" "color-theme-6.6.1" "color-theme-eclipse-0.0.2" "color-theme-github-0.0.3" "color-theme-railscasts-0.0.2" "color-theme-twilight-0.1" "css-mode-1.0" "drag-stuff-0.0.3" "evernote-mode-0.41" "find-file-in-project-2.0" "flymake-coffee-0.4" "flymake-haml-0.5" "flymake-ruby-0.4" "flymake-shell-0.5" "haml-mode-3.0.14" "highlight-parentheses-1.0.1" "html-script-src-0.0.2" "inf-ruby-2.1" "js-comint-0.0.1" "js2-mode-20090814" "lua-mode-20100617" "package.el" "package.el~" "project-local-variables-0.2" "ruby-compilation-0.7" "ruby-electric-1.1" "ruby-mode-1.1" "slime-20100404" "tabbar-2.0.1" "tabbar-ruler-0.2" "yasnippet-0.6.1" "yasnippet-bundle-0.6.1" "zenburn-1.8"))
(if (file-directory-p dir) (mapc (lambda ... ...) (directory-files dir nil "^[^.]")))
(lambda (dir) (if (file-directory-p dir) (mapc ... ...)))("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/")
mapc((lambda (dir) (if (file-directory-p dir) (mapc ... ...))) ("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/" "/usr/share/emacs/site-lisp/elpa/"))
package-load-all-descriptors()
package-initialize()
(progn (package-initialize))
(if (load (expand-file-name "~/.emacs.d/elpa/package.el")) (progn (package-initialize)))
(when (load (expand-file-name "~/.emacs.d/elpa/package.el")) (package-initialize))
eval-buffer(#<buffer *load*> nil "c:/Documents and Settings/Carlos/Datos de programa/.emacs" nil t) ; Reading at buffer position 9019
load-with-code-conversion("c:/Documents and Settings/Carlos/Datos de programa/.emacs" "c:/Documents and Settings/Carlos/Datos de programa/.emacs" t t)
load("~/.emacs" t t)
#[nil "\205\264
This file doesn't exist. I've tried searching for this problem with Google but I didn't find anything.
Easy. For whatever reason, the package.el you're now using is the "classic" version from http://tromey.com/elpa/package.el. It's wildly incompatible with recent versions of package.el. How you managed to install Marmalade packages using that version, I don't know; you must have had a different version of package.el when you installed those packages, perhaps because you were using a newer Emacs at the time.
The fix is to use the version bundled with your Emacs (if it's new enough to have one), or to replace your ~/.emacs.d/elpa/package.el with this version instead, as described in the Marmalade instructions.
I've stumbled upon this question while trying to solve a similar problem. In my case, forcing package-initialize have solved the problem:
;; init.el
(require 'package)
(package-initialize)
Even though I did not read the source code for package.el, I believe some kind of laziness in package.el is cousing the problem. Athough this is and old question, I wanted to answer, in case someone else need some help.
For more information on Emacs start-up, see http://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html.
Adding a file, not directory, using touch ~/.emacs.d/elpa/archives/-pkg solved it for me.
I think it may just go away if you manually create a directory at:
c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg
In my case I had to add this directive to tell emacs where it can find the files required:
First this line
(add-to-list 'load-path "~/.emacs.d/")
And the required package ...
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))