GNU bug report logs -
#19576
24.4; Broken function in `window-size-change-functions' cause `write-file' to write the wrong buffer
Previous Next
Reported by: Anders Lindgren <andlind <at> gmail.com>
Date: Mon, 12 Jan 2015 23:39:02 UTC
Severity: normal
Found in version 24.4
Done: Anders Lindgren <andlind <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> about a year ago I reported that `write-file' sometimes writes the wrong
> buffer to the destination file. Unfortunately, I had no feedback regarding
> this. When I checked today, the bug is still there.
Sorry. I could have sworn we fixed that then.
> The problem occurs when a function on the hook
> `window-size-change-functions' change the current buffer. The functions in
> this hook are executed when `y-or-n-p' is called, which is used by
> `write-file' to verify that it is OK to overwrite an existing file. One
> such function is `follow-window-size-change' in follow.el.
>
> This problem is not limited to `write-file' -- all functions calling
> `y-or-n-p' are affected by this!
>
> Of course, it would be relatively straight forward to modify the offending
> function (and all other similar functions). However, a more robust solution
> would be for the code that calls the functions on the hook to ensure that
> it isn't derailed when the buffer is changed.
>
> Personally, I don't know that part of the code well enough to do this
> change. Martin, is this something that you could look into, or suggest
> someone who can?
Conceptually it should be easy to do that. Save/restore current buffer,
selected window and frame. But Alan (concerned about ‘follow-mode’),
Pip (who unfortunately disappeared) and Eli are currently discussing how
to fix ‘window-size-change-functions’ in various other ways as well.
I'll try to get the fix of this bug applied there too.
martin
This bug report was last modified 9 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.