|
From: | Antonio Diaz Diaz |
Subject: | Re: Warn when editing read-only files |
Date: | Fri, 17 Nov 2023 14:01:15 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 |
Dan Jacobson wrote:
"PJ" == Paul Jackson<pj@usa.net> writes:PJ> might have intended only to read a file, not write it OK, no warning then upon opening a read only file. Fine. But ah ha, how about a warning upon using a "a" or "i" etc. command?
The other editor I maintain (GNU moe) does exactly this; if you try to modify a read-only file it complains with "Read only". So this should be doable in GNU ed as soon as we find a way to reset the 'read_only' flag. Maybe by changing the name of the file with 'f'?
Suggestions are welcome. Antonio.
[Prev in Thread] | Current Thread | [Next in Thread] |