1

I've been using emacs for 3 months and I never have problem like this, I installed a theme then my emacs had lag. Actually it is not a big deal there is small diffrence between without theme and with theme but I wanted to know why is this happening.

https://github.com/emacsfodder/emacs-clues-theme

This is the theme which I said above.

If you think it is not about theme here is my init file(currently I'm kind of newbie) :

; load theme
(load-theme 'ritchie t)
(add-to-list 'load-path "~/.emacs.d/")
; for dirtree package
(require 'dirtree)
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-0.8.0")
(require 'yasnippet)
(yas-global-mode 1)
; care about this place
;(define-key yas-minor-mode-map (kbd "<tab>") nil)
;(define-key yas-minor-mode-map (kbd "TAB") nil)
(define-key yas-minor-mode-map (kbd "<backtab>") 'yas-expand)
; care about this place
(setq ac-source-yasnippet nil)

(semantic-mode 1)
(defun my:add-semantic-to-autocomplete() 
  (add-to-list 'ac-sources 'ac-source-semantic)
)
(add-hook 'c-mode-common-hook 'my:add-semantic-to-autocomplete)
(add-to-list 'load-path "~/.emacs.d/auto-complete-1.3.1")
(require 'auto-complete-config)
(ac-config-default)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete-1.3.1/dict")
(global-auto-complete-mode t) ; section1
;(ac-set-trigger-key "TAB")
;(ac-set-trigger-key "<tab>")

(defun my:ac-c-headers-init ()
  (require 'auto-complete-c-headers)
  (add-to-list 'ac-sources 'ac-source-c-headers))

(add-hook 'c++-mode-hook 'my:ac-c-headers-init)
(add-hook 'c-mode-hook 'my:ac-c-headers-init)


(add-to-list 'load-path "~/.emacs.d/ajc-java-complete/")
(require 'ajc-java-complete-config)
(add-hook 'java-mode-hook 'ajc-java-complete-mode)
(add-hook 'find-file-hook 'ajc-4-jsp-find-file-hook)
(setq ajc-tag-file-list (list (expand-file-name "~/.java_base.tag")))
(setq ajc-use-plain-method-completion t)


(add-to-list 'load-path "~/.emacs.d/jdee-2.4.1/lisp")
(add-hook 'java-mode-hook 'load "jde")
;(load "jde")

(add-to-list 'load-path "~/.emacs.d")
(require 'linum)
(global-linum-mode 1)

(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-0.8.0")
(require 'yasnippet)
(yas-global-mode 1)
; care about this place
(define-key yas-minor-mode-map (kbd "<tab>") nil)
(define-key yas-minor-mode-map (kbd "TAB") nil)
(define-key yas-minor-mode-map (kbd "<backtab>") 'yas-expand)
; care about this place
(setq ac-source-yasnippet nil)


;(add-to-list 'load-path "~/.emacs.d/auto-complete-1.3.1")
;(require 'auto-complete-config)
;(ac-config-default)
;(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
;(global-auto-complete-mode t) ; section1
;(ac-set-trigger-key "TAB")
;(ac-set-trigger-key "<tab>")

;(defun my:ac-c-headers-init ()
 ; (require 'auto-complete-c-headers)
  ;(add-to-list 'ac-sources 'ac-source-c-headers))

;(add-hook 'c++-mode-hook 'my:ac-c-headers-init)
;(add-hook 'c-mode-hook 'my:ac-c-headers-init)

(add-to-list 'load-path "~/.emacs.d/iedit")
(require 'iedit)
(define-key global-map (kbd "C-c ;") 'iedit-mode)

;(semantic-mode 1)
;(defun my:add-semantic-to-autocomplete() 
 ; (add-to-list 'ac-sources 'ac-source-semantic)
;)
;(add-hook 'c-mode-common-hook 'my:add-semantic-to-autocomplete)
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(setq indent-line-function 'insert-tab)
(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-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.
 '(default ((t (:family "Ubuntu Mono" :foundry "unknown" :slant normal :weight normal :height 113 :width normal)))))
2

As always, recursively bisect your init file, to determine where the problem is. Don't just hand us a big sack and ask what's wrong, and don't try to guess, yourself, with tons of stuff in a big grabbag.

To bisect your file, comment out 1/2 of it (you can use M-x comment-region to comment and C-u M-x comment-region to uncomment), then 3/4, then 7/8,... It is very quick to do - it's a binary search.

Then you will know just what causes the problem. Within the theme code, if that is the problem, you can apply the same approach, to see what part(s) of it are problematic.

  • I get it what do you mean by your answer,I compared a normal theme and problematic theme but, almost there are no diffrences between them,I checked the theme line by line but it is almost same with others. I gave up I just don't use it and there is no problem around here anymore :) – Vivian Maya Dec 3 '14 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.