Emacs freezes when changing a file on disk

I am using Emacs v24.3.1 on Windows 8.

I had a file change on disk while I had an Emacs buffer open with this file. As soon as I try to make changes to the buffer, a message appears in the minibuffer.

Fileblah.txt changed on disk; really edit the buffer? (y, n, r or Ch) 

I expect that I will be able to press r to reload the disk version of the file, but nothing happens. Emacs completely stops responding. None of the keys listed work, and no other keys, as far as I can tell. I cannot Cg exit the minibuffer. Alt-F4 does not work, not Close window from the taskbar. I need to kill a process from task manager.

Does anyone know what I'm doing wrong here?

In cases where the different modes are not very pleasant to each other, for reference, my init.el is here . Nothing complicated. Here's a breakdown:

  • better by default (ido-mode, remove menu bar, uniquify buffer `forward, saveplace)
  • recentf mode
  • Custom frame header
  • line-of-sight
  • final newline required and remove trailing spaces while saving
  • Markdown mode with auto-alist mode
  • Flyspell with Aspell backend
  • Powershell mode with auto-alist mode
  • Ruby auto-mode-alist
  • Puppet mode with auto-alist mode
  • Function mode (Gherkin) with auto-alist mode

The specific file was a markdown file with Markdown enabled with Github support and Flyspell mode.

+5
source share
2 answers

As indicated in the comments on the question, the problem was caused by the markdown mode and was not fixed from this answer (April 23, 2015).

I found a workaround on the Internet. I reproduce it here for posterity.

 (defun leo-markdown-fontify-buffer-wiki-links-empty () "Empty replacement for `markdown-fontify-buffer-wiki-links` due to hanging bug." (interactive)) (eval-after-load "markdown-mode" '(progn (fset 'markdown-fontify-buffer-wiki-links 'leo-markdown-fontify-buffer-wiki-links-empty))) 
+2
source

As for debugging, you will have to use the emacs -Q approach to determine what obfuscates the hint. However, to avoid the request, you can use the "auto-revert-mode" mode for each buffer or enable "global-automatic return".

+1
source

Source: https://habr.com/ru/post/1201008/


All Articles