Discussion:
export to LyX Archive fails on an unsaved buffer
Scott Kostyshak
2012-08-31 18:51:29 UTC
Permalink
On Ubuntu 12.04 using current trunk I get an error [1] from

1. Start a new document
2. File > Export > Export to LyX Archive

The converter for me is:

python -tt $$s/scripts/lyxpak.py $$r/$$f

Does a new flag need to be created? For example, "promptsave", which
if specified in a converter would prompt the user to save the file
(and $$f would be set to the new filename).

Or is a better approach to save the .lyx file in the temp folder and
pass that filename to lyxpak.py?

Also, is "$$f" missing from the Customization documentation (3.3 Converters)?

Thanks,

Scott

[1]
Running: python -tt "/home/scott/lyx-trunk/lyx/lib/scripts/lyxpak.py"
"/home/scott/"/"newfile4.lyx"
File "/home/scott//newfile4.lyx" not found.
Systemcall.cpp (277): Systemcall: 'python -tt
"/home/scott/lyx-trunk/lyx/lib/scripts/lyxpak.py"
"/home/scott/"/"newfile4.lyx"' finished with exit code 1
Error: Cannot convert file
----------------------------------------
An error occurred while running:
python -tt "/home/scott/lyx-trunk/lyx/lib/scripts/lyxpak.py"
"/home/scott/"/"newfile4.lyx"
Enrico Forestieri
2012-08-31 22:08:46 UTC
Permalink
Post by Scott Kostyshak
On Ubuntu 12.04 using current trunk I get an error [1] from
1. Start a new document
2. File > Export > Export to LyX Archive
python -tt $$s/scripts/lyxpak.py $$r/$$f
Does a new flag need to be created? For example, "promptsave", which
if specified in a converter would prompt the user to save the file
(and $$f would be set to the new filename).
Yes, this would be the best approach. A flag specifying that a modified
file has to be saved before the converter can operate.
Post by Scott Kostyshak
Or is a better approach to save the .lyx file in the temp folder and
pass that filename to lyxpak.py?
No, this would not work as expected. The file has to be saved to its
proper place in order to reproduce the wanted structure in the archive.
Post by Scott Kostyshak
Also, is "$$f" missing from the Customization documentation (3.3 Converters)?
Probably.
--
Enrico
Scott Kostyshak
2014-09-19 18:26:08 UTC
Permalink
Post by Enrico Forestieri
Post by Scott Kostyshak
On Ubuntu 12.04 using current trunk I get an error [1] from
1. Start a new document
2. File > Export > Export to LyX Archive
python -tt $$s/scripts/lyxpak.py $$r/$$f
Does a new flag need to be created? For example, "promptsave", which
if specified in a converter would prompt the user to save the file
(and $$f would be set to the new filename).
Yes, this would be the best approach. A flag specifying that a modified
file has to be saved before the converter can operate.
Post by Scott Kostyshak
Or is a better approach to save the .lyx file in the temp folder and
pass that filename to lyxpak.py?
No, this would not work as expected. The file has to be saved to its
proper place in order to reproduce the wanted structure in the archive.
A hackish but easy temporary solution would be to disable export to
this file format within LyX if the buffer is not saved.

(I'm reviving this old email because the subject came up indirectly,
http://www.lyx.org/trac/ticket/9268#comment:5, and I am still planning
to take a look at this "someday" if no one else does)

Scott

Loading...