cornelis icon indicating copy to clipboard operation
cornelis copied to clipboard

Loading of read-only modules fails

Open phijor opened this issue 2 years ago • 0 comments

Loading an Agda module in a read-only file (such as one in a system location) fails with the following error:

ErrorResult vim_command (ObjectArray [ObjectInt 0,ObjectString "Vim(write):E45: 'readonly' option is set (add ! to override)"])

I think the culprit is this line:

https://github.com/isovector/cornelis/blob/bfada15978fc7c0f0797ec3977c5069be4a22b0e/src/Plugin.hs#L85

Maybe the correct thing to do here is to execute the write silently (:h :silent!) and thus ignore any errors?

phijor avatar Mar 05 '23 15:03 phijor