[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] preventing a write with write-hook
From: |
Thomas Dickey |
Subject: |
Re: [vile] preventing a write with write-hook |
Date: |
Thu, 6 Aug 2015 20:03:18 -0400 (EDT) |
----- Original Message -----
| From: "Matthew White" <address@hidden>
| To: "Vile mailing list" <address@hidden>
| Sent: Thursday, August 6, 2015 6:19:41 PM
| Subject: [vile] preventing a write with write-hook
|
| I've made a write-hook that formats some code. If the code formatter
| returns an error, I'd like to prevent vile from writing the buffer.
| So far what I have, but whatever it's doing it doesn't prevent vile
| from writing the buffer. Am I doing something obviously wrong here?
| or does vile not support this particular feature?
I think it's the latter - when vile runs the write-hook, it has already
decided to write the file, and will simply do that. (For instance, it
doesn't check and see if the file has been changed to view- or read-only).
(I would be more active, but most of my free time's been going into a new
release of ncurses...)
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net