purcell / emacs.d

An Emacs configuration bundle with batteries included
BSD 2-Clause "Simplified" License
6.84k stars 2.05k forks source link

Symbol-overlay-mode will cause Emacs to freeze #785

Open Eason0210 opened 3 years ago

Eason0210 commented 3 years ago

Hi @purcell,

When I try to input a period(.) or a space after an integer in a list of haskell-mode, it will cause emacs to freeze. when I press C-g it will back to normal and then the characters I've been typing get inserted at point!

For example, when I input . or space after Interger 1, it will cause the issue. When I disable symbo-overlay-mode , everything works well.

triples = [(a,b,c) | c <- [1..10], a <- [1..c], b <- [1..a]]

Tested on: Emacs 28.0.50 native compile and Emacs 27.2 OS: macOS Big Sur 11.5 and Windows 10

Eason0210 commented 3 years ago

This is an issue caused by upstream package, but I am not sure it is cause by haskell-modeor symbol-overlay .

It can be reproduced by the below config:

(require 'package)
(add-to-list 'package-archives '( "melpa" . "https://melpa.org/packages/") t)
(package-initialize)

(require 'symbol-overlay)
(global-set-key (kbd "M-i") 'symbol-overlay-put)
(global-set-key (kbd "M-n") 'symbol-overlay-switch-forward)
(global-set-key (kbd "M-p") 'symbol-overlay-switch-backward)
(global-set-key (kbd "<f7>") 'symbol-overlay-mode)
(global-set-key (kbd "<f8>") 'symbol-overlay-remove-all)

(require 'haskell-mode)
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)