On Wed, 2025-08-06 at 00:14 +0200, Adrien Rebollo wrote: > (In the process, I discovered that you can't force update a lyx file to the > newer file format via the command line. I think it would be a good feature to > have: it makes it easier to create a text script and perform a batch operation > on lyx files.)
Do you mean something like `sed -i` (--in-place)? That can be done, in particular the suffix part can be used directly from lyx. > For my part, the problem is solved, but I think there is room for improvement. > Actually, I don't understand the purpose of keeping a setting for the old > encodings, when all the files are Unicode: I don't see a situation where it > can be useful, but I'm surely missing many use cases. The reason is the one explained by Jürgen. Something that we could do is the equivalent of a local plugin for conversions. Unlike the development version where we have a conversion for each file format change we could do it just for each stable release. In this particular case we could simply do something like this: ```python def convert_encoding_to_utf8(document): document.inputencoding = 'utf8' return document ``` I am taking a slightly change here because I am using something that is not yet fully implemented (but it could be using @property. We would need than to define what is the way to add this plugin to the conversion mechanism. I have thought about this before but I have never consider it urgent enough to do this. :-) -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-devel