all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* RE: ielm freeze
@ 2012-03-22  9:00 Mentus Sarovar
  2012-03-22 16:02 ` Doug Lewan
  0 siblings, 1 reply; 5+ messages in thread
From: Mentus Sarovar @ 2012-03-22  9:00 UTC (permalink / raw)
  To: help-gnu-emacs

I applied your proposed method :-) and could quickly localize to
problematic place in my init file:

;; disable echoing in ruby intrepreter
(defun echo-false () (setq comint-process-echoes t))
(add-hook 'comint-mode-hook 'echo-false)

This was added because the ruby interepreter was returning two times
the same value.

How can this piece of code be made only inf-ruby-mode specific?

Thanks
Matus



^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: ielm freeze
@ 2012-03-23  8:38 Matus Kmit
  0 siblings, 0 replies; 5+ messages in thread
From: Matus Kmit @ 2012-03-23  8:38 UTC (permalink / raw)
  To: help-gnu-emacs

;; disable echoing in ruby intrepreter
(defun echo-false ()
 (setq comint-process-echoes t))
(add-hook 'inferior-ruby-mode-hook 'echo-false)

That did it. Thank you!

Matus



^ permalink raw reply	[flat|nested] 5+ messages in thread
* ielm freeze
@ 2012-03-21 12:37 Mentus Sarovar
  2012-03-21 18:12 ` Doug Lewan
  0 siblings, 1 reply; 5+ messages in thread
From: Mentus Sarovar @ 2012-03-21 12:37 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all

My ielm-REPL freezes as soon as I press RETURN after I entered some
expression to be evaluated. This does not happen if I don't have my
init file loaded, so the culprit must be in my init file:

(require 'cl)
(defvar *emacs-load-start* (current-time))

;; save emacs customizations in a separate file
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file 'noerror)

;; slime

(setq inferior-lisp-program "sbcl")
(add-to-list 'load-path "~/../site-lisp/slime/")
(require 'slime-autoloads)

(eval-after-load "slime"
  '(progn
     (add-to-list 'load-path "~/../site-lisp/slime/contrib")
     (slime-setup '(slime-fancy slime-banner))
     (slime-autodoc-mode)
     (add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
     (define-key slime-repl-mode-map (kbd "$") 'paredit-newline)
     (show-paren-mode 1)     ;; highlight parens
     (global-set-key [?\C-§] 'slime-selector)

     ;; keep fasls separate
     ;; (setq slime-compile-file-options '(:fasl-directory "/tmp/slime-fasls/"))
     ;; (make-directory "D:/temp/slime-fasls/" t)
     ))

;; Autocomplete

(add-to-list 'load-path "~/../site-lisp/auto-complete/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/../site-lisp/auto-complete//ac-dict")
(ac-config-default)

;; ac-slime

(add-to-list 'load-path "~/../site-lisp/ac-slime/")
(require 'ac-slime)
(add-hook 'slime-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(eval-after-load "auto-complete"
  '(progn
     (add-to-list 'ac-modes 'slime-repl-mode)
     (add-to-list 'ac-modes 'lisp-mode)))

;; paredit

(add-to-list 'load-path "~/../site-lisp/paredit/")
;; (require 'paredit)
(autoload 'paredit-mode "paredit" "Minor mode for pseudo-structurally
editing Lisp code." t)

(dolist (elt '(emacs-lisp-mode-hook
	       lisp-mode-hook
	       ;; lisp-interaction-mode-hook
	       scheme-mode-hook
	       slime-repl-mode-hook))
  (add-hook elt (lambda () (paredit-mode +1))))

;; (add-hook 'emacs-lisp-mode-hook       (lambda () (paredit-mode +1)))
;; (add-hook 'lisp-mode-hook             (lambda () (paredit-mode +1)))
;; (add-hook 'lisp-interaction-mode-hook (lambda () (paredit-mode +1)))
;; (add-hook 'scheme-mode-hook           (lambda () (paredit-mode +1)))
;; (add-hook 'slime-repl-mode-hook       (lambda () (paredit-mode +1)))

(eval-after-load "paredit"
  '(progn
     (define-key paredit-mode-map (kbd "RET") 'paredit-newline)
     (define-key paredit-mode-map (kbd "ö") 'paredit-open-round)
     (define-key paredit-mode-map (kbd "ä") 'paredit-close-round)
     (define-key paredit-mode-map (kbd "M-ä") 'paredit-close-round-and-newline)
     (define-key paredit-mode-map (kbd "M-ö") 'paredit-wrap-round)
     (define-key paredit-mode-map (kbd "M-<left>") 'paredit-backward)
     (define-key paredit-mode-map (kbd "M-<right>") 'paredit-forward)
     (define-key paredit-mode-map (kbd "M-<up>") 'paredit-backward-up)
     (define-key paredit-mode-map (kbd "M-<down>") 'paredit-forward-down)
     (define-key paredit-mode-map (kbd "(") (lambda () (interactive)
(insert "(")))
     (define-key paredit-mode-map (kbd ")") (lambda () (interactive)
(insert ")")))))

;; cedet

;; (load-file "~/../site-lisp/cedet/common/cedet.el")
;; (semantic-load-enable-minimum-features)
;; (require 'semantic-ia)

;; ecb

;; (add-to-list 'load-path "~/../site-lisp/ecb")
;; (require 'ecb-autoloads)

;; ruby

(add-to-list 'load-path "~/../site-lisp/ruby/")
(autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
(require 'inf-ruby)
(autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process")
(autoload 'inf-ruby-keys "inf-ruby" "Set local key defs for inf-ruby
in ruby-mode")
(add-hook 'ruby-mode-hook '(lambda () (inf-ruby-keys)))
(add-hook 'ruby-mode-hook '(lambda () (local-set-key "\r" 'newline-and-indent)))

(require 'ruby-electric)
(add-hook 'ruby-mode-hook (lambda () (ruby-electric-mode t)))

;; disable echoing in ruby intrepreter
(defun echo-false () (setq comint-process-echoes t))
(add-hook 'comint-mode-hook 'echo-false)

;; rsense

(setq rsense-home (expand-file-name "~/../site-lisp/rsense/"))
(add-to-list 'load-path (concat rsense-home "/etc"))
(require 'rsense)

(add-hook 'ruby-mode-hook
          (lambda ()
            (add-to-list 'ac-sources 'ac-source-rsense-method)
            (add-to-list 'ac-sources 'ac-source-rsense-constant)))

;; color theme

(add-to-list 'load-path "~/../site-lisp/color-theme/")
(require 'color-theme)
;; (eval-after-load "color-theme"
;;   '(progn
;;      (color-theme-initialize)
;;      (color-theme-hober)))

;; solarized theme

(add-to-list 'load-path "~/../site-lisp/solarized-theme/")
(require 'color-theme-solarized)
(color-theme-solarized-light)

;; emacs macros

(fset 'visit-init-file
   [?\C-x ?\C-f ?\C-a ?\C-k ?~ ?~ backspace ?/ ?. ?e ?m ?a ?c ?s return])

(fset 'load-init-file
   [?\M-x ?l ?o ?a ?d ?- ?f ?i ?l ?e return ?\C-a ?\C-k ?~ ?~
backspace ?/ ?. ?e ?m ?a ?c ?s return])

;;--------------------------------------------------------------------------------------------------------------
(message "My .emacs loaded in %ds" (destructuring-bind (hi lo ms) (current-time)
				     (- (+ hi lo) (+ (first *emacs-load-start*) (second
*emacs-load-start*)))))



Does anyone of you know what the problem is or experienced a similar problem?

My environment: Windows 7, Emacs 23.4

Thank you
Matus



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-23  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-22  9:00 ielm freeze Mentus Sarovar
2012-03-22 16:02 ` Doug Lewan
  -- strict thread matches above, loose matches on Subject: below --
2012-03-23  8:38 Matus Kmit
2012-03-21 12:37 Mentus Sarovar
2012-03-21 18:12 ` Doug Lewan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.