|
From: | JD Smith |
Subject: | buffer-modified-tick and text properties |
Date: | Sat, 20 Apr 2024 08:47:42 -0400 |
I've read plenty of older threads discussing why text property changes mark buffers as modified, recommending people use
in most cases. This prevents buffer-modified-p from flipping, but it surprised me that this does not prevent changes to the buffer-modified-tick: I had hoped to compare a saved and current buffer-modified-tick in a post-command-hook, to tell me whether the command that lead to it had modified the buffer text, but this is not a reliable way to do so when text properties are being changed as a result of non-edit commands (like motion). Plenty of modes compare the buffer tick against a saved value to infer whether the buffer text has been modified since the last update. That logic will be defeated if other modes make text property changes. Is there a way to inhibit changes in the buffer-tick when you are just changing simple text properties? |
[Prev in Thread] | Current Thread | [Next in Thread] |