Skip to content

Symbol-overlay conflicts with haskell-mode #75

@Eason0210

Description

@Eason0210

Symbol-overlay-mode will cause Emacs to freeze with haskell-mode enabled,I am not sure it is cause by haskell-mode or symbol-overlay.

Steps to reproduce the issue:

  1. Back up your current configuration .emacs.d file with another name
  2. Create an .emacs file in the current user's HOME directory (for example, my HOME is the C:\Users\Aqua directory), and copy the following code to the .emacs file.
(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)
  1. Start Emacs, an error will be raised now, because the required packages have not been installed.
  2. Manually refresh the package contents and install haskell-mode and symbol-overlay
M-x package-refresh-contents
M-x package-install RET haskell-mode
M-x package-install RET symbol-overlay
  1. Restart Emacs, now it can start normally.

  2. C-x, C-f Create a test.hs file in any directory, press to turn on symbol-overlay-mode. Enter the following content from the beginning in the empty test.hs file.

triples = [(a,b,c) | c <- [1..10], a <- [1..c], b <- [1..a]]
  1. When I input the third 1, and then input a space or . It will be stuck (as shown in the figure below, the cursor now is at the position indicated by the red arrow).
    image

  2. press C-g can go back to normal , and get error from Messages :

Symbol-Overlay mode enabled in current buffer
Error during redisplay: (internal--syntax-propertize 44) signaled (quit)
Error during redisplay: (internal--syntax-propertize 57) signaled (quit)
  1. if at step 7 can't reproduce issue, you can move cursor back to the the position after the second 1 , and delete ..c , and input ..c again.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions