unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Infinite loop in whitespace-buffer-trailing-cleanup
@ 2005-07-03 12:13 Romain Francoise
  2005-07-03 13:00 ` Romain Francoise
  0 siblings, 1 reply; 4+ messages in thread
From: Romain Francoise @ 2005-07-03 12:13 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 826 bytes --]

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("Ä\b	\"ˆÅ\x12\vƒ\x11

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-05 18:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-03 12:13 Infinite loop in whitespace-buffer-trailing-cleanup Romain Francoise
2005-07-03 13:00 ` Romain Francoise
2005-07-04 14:51   ` Richard M. Stallman
2005-07-05 18:22     ` Romain Francoise

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).