emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Infinite loop in whitespace-buffer-trailing-cleanup


From: Romain Francoise
Subject: Infinite loop in whitespace-buffer-trailing-cleanup
Date: Sun, 03 Jul 2005 14:13:35 +0200

There is a bug in `whitespace-buffer-trailing-cleanup' when trying to
remove trailing whitespace in a non-writable file with
`kill-read-only-ok' set to t.

Steps to reproduce this bug:
1. Create a file with only whitespace, e.g. echo -e "\n\n\n\n" >/tmp/foo
2. Make it non-writable: chmod a-w /tmp/foo
3. Open /tmp/foo in Emacs
4. M-x set-variable RET kill-read-only-ok RET t RET
5. M-: (require 'whitespace) RET
6. M-: (whitespace-buffer-trailing-cleanup) RET
7. Wait, don't interrupt.

In Emacs 21.4, this results in a segmentation fault after a few
seconds.  In Emacs from CVS, it results in the following backtrace:

Debugger entered--Lisp error: (error "Lisp nesting exceeds 
`max-lisp-eval-depth'")
  x-set-cut-buffer("\n" t)
  x-select-text("\n" t)
  kill-new("\n")
  copy-region-as-kill(3 4)
  byte-code("� \"ˆ�ƒ





reply via email to

[Prev in Thread] Current Thread [Next in Thread]