1. Frank Fischer
  2. evil
Issue #192 open

Emacs hangs on search in dired buffer

Anonymous created an issue

I have the following issue

  1. I start Emacs,
  2. find-file and enter a directory
  3. dired buffer opens
  4. search with key "/"
  5. type in some characters
  6. on the third character, the buffer screen becomes blank and Emacs hangs



Comments (12)

  1. Nik73

    Sorry for not being more specific. I traced the problem to sunrise-commander. With this command in your .emacs, Emacs hangs with the above steps.

    (require 'sunrise-commander)

  2. Nik73

    I spent hours trying to find the piece of code that causes this bug. With a clean config, all seems to work fine. The bug happens on three different machines with two versions of Emacs (23.2 and 24.1). In the following config, that does not contain sunrise-commander, the bug happens as in the above steps. But in a working config I have, the 'hang' happens later on in the session. The hang ivolves that C-g and C-c don't work anymore and 100% of one core is utilised by emacs.

    First it seemed that dired+ was the culprit, then the binding (define-key evil-insert-state-map "\C-w" 'evil-window-map) made Emacs hang. It seems to be some strange interaction effect.

    (setq inhibit-startup-message t) (tool-bar-mode 0) ;toolbar uit

    (define-key global-map (kbd "<C-tab>") 'ac-complete-filename) ;C-tab instead of M-tab

    (setq org-agenda-files (list "h:/Tasks.org"))

    autopair. Staat in site-lisp.
    (require 'autopair) (autopair-global-mode 1) ;; enable autopair in all buffers

    (add-hook 'minibuffer-setup-hook (lambda () (setq autopair-dont-activate t))) ;;geen autopair in minibuffer

    ;;hide details in dired (require 'dired-details+) ;;extra opties

    (require 'dired+)
    (require 'auto-complete-config) (defun auto-complete-mode-maybe () (unless (minibufferp (current-buffer)) (auto-complete-mode 1)))

    (add-to-list 'ac-dictionary-directories "h:/progs/EMACS-24.1/site-lispac-dict") (ac-config-default) (setq auto-complete-mode t) ;; (setq ess-use-auto-complete t) (setq ac-dwim-enable t) (define-key ac-complete-mode-map [tab] 'ac-expand) (define-key ac-complete-mode-map [return] 'ac-complete) (define-key ac-complete-mode-map [escape] 'ac-stop) (setq ac-menu-immediately-on-auto-complete t) (setq ;; ac-auto-show-menu 1 ;; ac-candidate-limit nil ;; ac-delay 0.1 ;; ac-disable-faces (quote (font-lock-comment-face font-lock-doc-face)) ;; ac-ignore-case 'smart ;; ac-menu-height 10 ;; ac-quick-help-delay 1.5 ;; ac-quick-help-prefer-pos-tip t ;; ac-use-quick-help nil )

    (require 'rainbow-delimiters) (global-rainbow-delimiters-mode)

    spss syntax highlighting
    (load "h:/progs/Emacs-24.1/site-lisp/pspp-mode.el") (load "H:/progs/Emacs-24.1/site-lisp/line-comment-banner.el") (global-set-key (kbd "C-;") 'line-comment-banner) (add-to-list 'auto-mode-alist '("
    '" . sr-virtual-mode))

    (define-key menu-bar-tools-menu [games] nil) (define-key menu-bar-help-menu [emacs-psychotherapist] nil)

    (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. '(ac-auto-show-menu 0.1) '(ac-delay 0.0) '(ediff-diff-program "h:/progs/gnuwin/bin/diff") '(ediff-diff3-program "h:/progs/gnuwin/bin/diff3") '(evil-search-module (quote evil-search)) '(org-agenda-files (quote ("h:/tasks.org"))) '(scroll-bar-mode nil) '(show-paren-mode t) '(tool-bar-mode nil)) (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 (:inherit nil :stipple nil :background "lightyellow1" :foreground "SystemWindowText" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 96 :width normal :foundry "raster" :family "Courier")))))

    ;;R settings. (setq inferior-R-program-name "h:/R/R-2.14.1/bin/i386/Rterm.exe") ;;pijltjestoetsen voor geschiedenis (define-key comint-mode-map [up] 'comint-previous-matching-input-from-input) (define-key comint-mode-map [down] 'comint-next-matching-input-from-input)

    (define-key inferior-ess-mode-map "\C-w" 'backward-kill-word)
    (setq ess-use-auto-complete t) (setq ess-font-lock-mode t)

    (require 'ess-eldoc) (add-hook 'inferior-ess-mode-hook 'ess-use-eldoc) ;; bind ess-r-args-show to F2 ;;(define-key ess-mode-map [f2] 'ess-r-args-show) (add-hook 'ess-mode-hook '(lambda () (setq inferior-R-args "--no-restore-history --no-save") (setq ess-ask-for-ess-directory nil) (setq comint-scroll-to-bottom-on-input t) (setq comint-scroll-to-bottom-on-output t) ))

    (setq inferior-XLS-program-name "h:/progs/xlisp-stat/XLSCLIEN.EXE")

    (add-to-list 'load-path "/.emacs.d/yasnippet/") (require 'r-autoyas) (add-hook 'ess-mode-hook 'r-autoyas-ess-activate) (require 'yasnippet) (yas/global-mode 1) (setq yas/trigger-key "<f5>")

    (add-to-list 'load-path "/.emacs.d/evil") (require 'evil) (evil-mode 1) (setq evil-ex-search-vim-style-regexp 1)

    (require 'surround) (global-surround-mode 1)

    ;; load elscreen (load "elscreen" "ElScreen" t)

    ;; F9 creates a new elscreen, shift-F9 kills it (define-key evil-normal-state-map "\C-w" 'evil-window-map) (define-key evil-normal-state-map (kbd "C-w t") 'elscreen-create) (define-key evil-normal-state-map (kbd "C-w x") 'elscreen-kill)

    (define-key evil-normal-state-map "gT" 'elscreen-previous) (define-key evil-normal-state-map "gt" 'elscreen-next) (define-key evil-normal-state-map (kbd "<SPC>") 'evil-scroll-page-down) (define-key evil-normal-state-map (kbd "S-<SPC>") 'evil-scroll-page-up) (define-key evil-normal-state-map (kbd "C-w C-c") 'kill-buffer-and-window) ;sluit window en kill buffer

    insert mode
    (define-key evil-insert-state-map "\C-w" 'evil-window-map)
  3. Nik73

    Setting the variable

    (setq evil-search-module 'evil-search)

    seems to cause the problem. So the bug might be in this new search mode.

  4. Frank Fischer repo owner

    Hm, this is rather long config ;)

    Could you please remove as much of this config as possible (especially all packages that are not strictly required to demonstrate this bug) and possibly bundle all remaining packages in a zip-archive (or so) that I can simply use as a stand-alone test environment? I'm not familiar with most of the packages you use, thus it's hard to find the problem.

    And please format the code. Currently it's very hard to copy & paste the config-code correctly.

  5. Frank Fischer repo owner
    • changed status to open

    Could you please provide a minimal example to reproduce the problem? Preferably starting with make emacs from Evil's source directory (or a minimal configuration) plus a sequence of keystrokes.

  6. Log in to comment