ergoemacs / ergoemacs-mode

ergoemacs-mode
ergoemacs.github.io/
GNU General Public License v3.0
293 stars 35 forks source link

Seems not working after ELPA upgrade #290

Closed rongcuid closed 10 years ago

rongcuid commented 10 years ago

Sorry I can't provide much information. I just did an upgrade from ELPA and suddenly ergoemacs stopped working. I tried manual checkout, but it works for the first time, and when I restart emacs, it does not work. All ergoemacs key bindings don't work. I am trying to checkout different tags without success. i don't quite know how to debug this.

rongcuid commented 10 years ago

Comment this line ;(ergoemacs-theme-option-off '(apps apps-apps apps-punctuation apps-swap)) which is in my init.el for whatever reason, AND reverted to tag v5.13.11 and it works. I am going to test newer tags

rongcuid commented 10 years ago

5.13.12-2 Works too

rongcuid commented 10 years ago

Well, on this try it worked all the way to the latest tag, but some intermediate ones gave segmentation fault... The latest v5.14.7.3 gives lots of warning but the v5.14.7.1 does not, so I am using that one. I think the only change was that I deleted ~/.emacs.d/ergoemacs-extra (probably)

rongcuid commented 10 years ago

Emacs daemon stops working though, it hang at Package assoc is obsolete! I am not so sure whether it is ergoemacs now...

rongcuid commented 10 years ago

OK, after some line-by-line debugging, I found that once (require 'ergoemacs-mode) is added, the daemon does not fully start, which means emacs is stuck at some place. I have no idea why.

rongcuid commented 10 years ago

The only thing that looks like an error message in Message is: byte-code: Symbol's value as variable is void: ergoemacs

mattfidler commented 10 years ago

Please post your configuration and tell me what OS and emacs version you are using so I can see if I can reproduce it.

Thanks for the information so far. On Aug 20, 2014 6:33 PM, "Carl Dong" notifications@github.com wrote:

The only thing that looks like an error message in Message is: byte-code: Symbol's value as variable is void: ergoemacs

— Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/290#issuecomment-52859979 .

rongcuid commented 10 years ago

I am on Funtoo amd64, with emacs 24.3. I am not sure if I can get attachments here because I have multiple config files. These two are the main ones.

On 2014-08-20T23:48:57 EDT, Matthew Fidler wrote:

Please post your configuration and tell me what OS and emacs version you are using so I can see if I can reproduce it.

Thanks for the information so far. On Aug 20, 2014 6:33 PM, "Carl Dong" notifications@github.com wrote:

The only thing that looks like an error message in Message is: byte-code: Symbol's value as variable is void: ergoemacs

— Reply to this email directly or view it on GitHub

https://github.com/ergoemacs/ergoemacs-mode/issues/290#issuecomment-52859979

.

— Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/290#issuecomment-52875505.

Rongcui Dong

rongcuid commented 10 years ago

OK, no attachments. I will paste it here .emacs.d/init.el:

(require 'package)

(set-face-attribute 'default nil :height 90)

(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))

(add-hook 'after-init-hook (lambda () (load "~/.emacs.d/real_init.el")))
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-safe-themes (quote ("cd70962b469931807533f5ab78293e901253f5eeb133a46c2965359f23bfb2ea" "6e92ca53a22d9b0577ad0b16e07e2e020c8b621197e39fec454048e51b7954cb" default)))
 '(ecb-options-version "2.40")
 '(inhibit-startup-screen t)
 '(sr-speedbar-width-console 24)
 '(sr-speedbar-width-x 24))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
rongcuid commented 10 years ago

.emacs.d/real_init.el:

(scroll-bar-mode -1)
(tool-bar-mode -1)
(ido-mode nil)
(define-key global-map "\C-x\C-u" 'undo)
(global-set-key (kbd "C-x o") 'switch-window)
(global-set-key (kbd "M-SPC") 'set-mark-command)
(global-set-key (kbd "C-c q") 'auto-fill-mode)
(global-set-key (kbd "C-c o") 'evil-mode)

(add-to-list 'load-path "~/.emacs.d/lisp/")

; Show parentetheses
(show-paren-mode 1)

; Buffer name
(require 'uniquify)
(setq uniquify-buffer-name-style 'reverse)

;; Ergo Emacs
(add-to-list 'load-path "~/.emacs.d/ergoemacs-mode")
;(require 'ergoemacs-mode)
;(setq ergoemacs-theme "lvl2") ;; Uses Standard Ergoemacs keyboard theme
;;(ergoemacs-theme-option-off '(apps apps-apps apps-punctuation apps-swap))
;(setq ergoemacs-keyboard-layout "us") ;; Assumes QWERTY keyboard layout
;(ergoemacs-mode 1)

(load "cc-config")
(load "appearence-config")
(load "org-mode-config")

;; Prevent conflict with linedit
;(setq inferior-lisp-program "sbcl --noinform --no-linedit")
;; Smooth scroll
(setq scroll-margin 1
      scroll-step 1
      scroll-conservatively 1000000
      )
mattfidler commented 10 years ago

Why do you use the after-init-hook; Could you try just loading the file directly (enabling ergoemacs-mode of course)

rongcuid commented 10 years ago

The same if I put the require line directly in init.el.

mattfidler commented 10 years ago

I can't reproduce with your init under windows. Have you deleted all the elc files in the ergoemacs-mode directory?

rongcuid commented 10 years ago

I deleted the whole directory. Not sure about the etc files.

rongcuid commented 10 years ago

Does not work even with emacs -q --load ergoconfig Where the ergoconfig contains only instructions to load ergoemacs

mattfidler commented 10 years ago

Could you change the start to

emacs -Q --load ergoconfig
rongcuid commented 10 years ago

Well, ok, it worked... Now I need to find how my config files mess this up.

mattfidler commented 10 years ago

Could you look at your site-lisp directory. Thats where the problem is happening.

rongcuid commented 10 years ago

site-lisp? Why is that the problem?

rongcuid commented 10 years ago

It seems that ergoemacs is not loading if I put it in real_init.el. but it always worked before.

rongcuid commented 10 years ago

That should be caused by -Q. If I now use an init.el that just loads real_init.el, it works. Then it should be some config in init.el, I am checking now.

rongcuid commented 10 years ago

I have a file called init.el.before_ecb_2.40 for some reason, and I used that file and it seems that ergoemacs is working. However, since I don't see the comments on top of scratch, I think something is still wrong.

mattfidler commented 10 years ago

Because -Q ignores the site settings.

rongcuid commented 10 years ago

Now I don't know why but both init files can initialize ergoemacs now... However, since scratch does not echo information, something should be wrong...

rongcuid commented 10 years ago

Well, it does not work without the -Q option... How do I find where are the site lisps?

mattfidler commented 10 years ago

From fhe emacs wiki

The default value of ‘load-path’ includes two special directories recursively: /usr/local/share/emacs/VERSION/site-lisp and /usr/local/share/emacs/site-lisp. (On Windows, the equivalent location is C:\Program Files\emacs-VERSION\site-lisp.) The first directory contains packages for a particular Emacs version; the second contains packages for all installed versions of Emacs. These directories contain files for the current site, for use by the system administrator when installing software locally[1].

~/.emacs.d/ on the other hand contains files for the current user, and is independent of system-wide changes. This makes it the best choice for storing your personal changes. Installing all packages in a sub-directory of ~/.emacs.d/ also makes it very easy to move them along with your configuration to a different machine.

rongcuid commented 10 years ago

One thing I noticed is that if -Q is passed, it takes several seconds to load ergoemacs-advice.el, but on the other hand it takes a long time. And there is a message "package assoc is obsolete" which is always there but not present in -Q.

rongcuid commented 10 years ago

The problem comes from CEDET. I uninstalled CEDET from distribution, and somehow it works. After I reinstall, it stops working.

rongcuid commented 10 years ago

OK, I think I confirmed that the problem comes from CEDET 1.1 installed by distro package manager. I uninstalled that, and now ergoemacs and emacs itself works perfectly(at least for those are tested)

mattfidler commented 10 years ago

You should probably remove CEDET 1.1, if you look at emacs 24.3, the cedet that is built-in is 2.0

mattfidler commented 10 years ago

Ergoemacs-mode has been tested with eieio 1.4

rongcuid commented 10 years ago

I removed cedet 1.1, and now I have that GUI frame problem too...

mattfidler commented 10 years ago

I'm unsure. What is the GUI frame problem?

rongcuid commented 10 years ago

Exactly as #292

mattfidler commented 10 years ago

Since I'm on windows, I don't have daemon access. Could you test this.

rongcuid commented 10 years ago

I will. However, I am not quite sure how to debug elisp since emacs does not say anything about errors: it just hangs, and the only symptom I can find is probably the scratch page...

rongcuid commented 10 years ago

Sorry, I don't know elisp so I cannot debug... The only thing I could do is this:

find ./elpa/ergoemacs-mode-20140821.729 -name "*.el" -exec grep -H "stringp" {} \; ./elpa/ergoemacs-mode-20140821.729/ergoemacs-shortcuts.el: ((stringp key) ;; Kbd code ./elpa/ergoemacs-mode-20140821.729/ergoemacs-shortcuts.el: ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-shortcuts.el: ((and hash (stringp (nth 0 (nth 0 hash)))) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: ((stringp def) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: ((or (commandp def t) (keymapp def) (stringp def)) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: ((and (listp def) (or (stringp (nth 0 def)))) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: ((stringp def) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: (or (and keymap (or (and (stringp keymap) keymap) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: (and (keymapp keymap) (stringp (nth 1 keymap)) (= 2 (length keymap)))))) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: (theme-plist (gethash (if (stringp theme) theme ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: (or (and (stringp option) (intern option)) option))) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: (let ((theme-plist (gethash (if (stringp theme) theme ./elpa/ergoemacs-mode-20140821.729/ergoemacs-theme-engine.el: (puthash (if (stringp theme) theme (symbol-name theme)) theme-plist ./elpa/ergoemacs-mode-20140821.729/ergoemacs-macros.el: (if (stringp elt) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-macros.el: (setq doc (if (stringp (car body)) (pop body) (symbol-name name))) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-macros.el: (stringp (first remaining)) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-macros.el: (when (stringp (first remaining)) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-macros.el: (setq based-on (or (and (stringp based-on) based-on) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-translate.el: (unless (stringp key) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-translate.el: (unless (stringp key) ./elpa/ergoemacs-mode-20140821.729/ergoemacs-menus.el: (stringp (caddr item))

mattfidler commented 10 years ago

Sorry I mis-spoke. I believe I fixed the issue, and would like you to test the newest version.

You will have to wait for marmalade to update the package, then download the update, and see if it works. Issue #292 has been closed because it works for other people.

rongcuid commented 10 years ago

Oh, ok. I will test it. What was changed?

rongcuid commented 10 years ago

I did a git pull and tested, but there is still this problem. I am on commit ad92be9c9307ed7593278598e5bbc402ef542f9a

mattfidler commented 10 years ago

It was shown above.

mattfidler commented 10 years ago

Please clarify about the problem. There was so many things mentioned, I cannot figure out what you are speaking about.

rongcuid commented 10 years ago

Sorry. Now my problem is that I get ERROR: Wrong type argument: stringp, C-source When I try to run emacsclient -c Just like in #292. The original problem of mine is fixed after removing CEDET 1.1.

mattfidler commented 10 years ago

This is another possible fix for this issue. I still cannot test this.

rongcuid commented 10 years ago

Works!

mattfidler commented 10 years ago

Great