[LyX/master] updatedocs.py: more robust save with LyX binary

Scott Kostyshak skostysh at lyx.org
Tue Dec 20 16:46:33 UTC 2022


commit 29ae7b31c2cc64a1620655de1d8cfd70a8e044b7
Author: Scott Kostyshak <skostysh at lyx.org>
Date:   Tue Dec 20 12:42:34 2022 -0500

    updatedocs.py: more robust save with LyX binary
    
    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 |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/development/tools/updatedocs.py b/development/tools/updatedocs.py
index 41fe091..1448e8d 100755
--- a/development/tools/updatedocs.py
+++ b/development/tools/updatedocs.py
@@ -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)
 


More information about the lyx-cvs mailing list