]> git.lyx.org Git - lyx.git/commitdiff
updatedocs.py: more robust save with LyX binary
authorScott Kostyshak <skostysh@lyx.org>
Tue, 20 Dec 2022 17:42:34 +0000 (12:42 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Tue, 20 Dec 2022 17:43:02 +0000 (12:43 -0500)
The "force" argument is more robust than trying to make an edit and
then inverse the edit.

The "force" argument exists since fe09ddf1.

development/tools/updatedocs.py

index 41fe091ac47a0f10a4a478af0b8ab62eaf95f785..1448e8d42355a9b649dd5f738501804d494f11b7 100755 (executable)
@@ -40,10 +40,7 @@ def convertdir(docdir, prefix, lyx2lyx, lyx, systemlyxdir):
         sys.stderr.write('Converting %s\n' % os.path.join(prefix, i))
         subprocess.call(cmd)
         if lyx != '':
-            # This is a hack, but without modifying the doc LyX refuses to save and stays open
-            # FIXME: Is self-insert a; char-delete-backward always a noop?
-            #        What if change-tracking is enabled?
-            cmd = [lyx, '-f', '-x', 'command-sequence self-insert a; char-delete-backward; buffer-write; lyx-quit', i]
+            cmd = [lyx, '-f', '-x', 'command-sequence buffer-write force; lyx-quit', i]
             subprocess.call(cmd)
     os.chdir(olddir)