Re: LyX version 2.3.0rc2 available
On Wednesday, 21 February 2018 09.35.44 WET Jean-Marc Lasgouttes wrote: > OK, let's a propose a few things: > - always use a period as separator, like we do for export (be > consistent). Or, if we think that the period was a bad idea, use > something else (minus or underscore) consistently. That I can agree with. :-) Honestly the only place where this could give us problem is on windows (I really hate their file association mechanism, I use some .mat files that were matlab/octave data format files and windows associated that with access, grrr). Since the current practice did not lead to any complaint, that I remember, than I think that we are safe and we could go with it. > - if we use a prefix to avoid ambiguity with export, use either > lyx21.lyx~ or fmt123.lyx~. Actually I also agree with you fmt123 is a better suffix than format-123. In this case just for consistency sake. My opinion here is that I would to have a symmetry break between export and backup, they serve different purposes and so there is a justification for a different name scheme. > JMarc > > PS: Do you like my proposed colors for the bikeshed? Actually I do, and also it seems that we are the only persons that care about that particular issue. :-) -- José Abílio
Re: LyX version 2.3.0rc2 available
Le 21/02/2018 à 09:21, José Abílio Matos a écrit : Id this patch is deemed appropriate there is still one small issue. should it be as it is: A) document.lyx -> document-lyx21.lyx or B) document.lyx -> document.21.lyx as it is with the downgrade option format. IIRC it used to be lyx21 but it was considered too verbose. This is exactly the point I wanted to comment on: I would prefer a name like document.21.lyx~, which would be the exact equivalent of the export-to-old format. Of course, this may collide with the backup of a file export et to 2.1.x format of the same name. But is this something that happens? To be frank, I do not really know whether my proposal is correct. OK, let's a propose a few things: - always use a period as separator, like we do for export (be consistent). Or, if we think that the period was a bad idea, use something else (minus or underscore) consistently. - if we use a prefix to avoid ambiguity with export, use either lyx21.lyx~ or fmt123.lyx~. JMarc PS: Do you like my proposed colors for the bikeshed?
Re: LyX version 2.3.0rc2 available
On Tuesday, 20 February 2018 10.43.17 WET José Abílio Matos wrote: > Something like what follows attached? > > I have tested it with several cases and it works. Id this patch is deemed appropriate there is still one small issue. should it be as it is: A) document.lyx -> document-lyx21.lyx or B) document.lyx -> document.21.lyx as it is with the downgrade option format. IIRC it used to be lyx21 but it was considered too verbose. Comments? -- José Abílio
Re: LyX version 2.3.0rc2 available
On Monday, 19 February 2018 11.42.57 WET Jean-Marc Lasgouttes wrote: > Le 17/02/2018 à 14:02, José Abílio Matos a écrit : > > How about the following patch? > > What happens if the format is not from a released version? In this case, > we would like to keep the old naming IMO. I am not sure what your code > intends to do in this case. > > JMarc Something like what follows attached? I have tested it with several cases and it works. -- José Abílio diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 7cabe6fce1..14ddbb4c10 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1327,14 +1327,37 @@ Buffer::ReadStatus Buffer::convertLyXFormat(FileName const & fn, FileName Buffer::getBackupName() const { + mapconst file_formats = { + {544, "23"}, + {508, "22"}, + {474, "21"}, + {413, "20"}, + {345, "16"}, + {276, "15"}, + {245, "14"}, + {221, "13"}, + {220, "12"}, + {218, "1163"}, + {217, "116"}, + {216, "115"}, + {215, "11"}, + {210, "010"}, + {200, "006"} + }; FileName const & fn = fileName(); string const fname = fn.onlyFileNameWithoutExt(); string const fext = fn.extension() + "~"; string const fpath = lyxrc.backupdir_path.empty() ? fn.onlyPath().absFileName() : lyxrc.backupdir_path; - string const fform = convert(d->file_format); - string const backname = fname + "-lyxformat-" + fform; + string backup_suffix; + // If file format is from a stable series use version instead of file format + auto const it = file_formats.find(d->file_format); + if (it != file_formats.end()) + backup_suffix = "-lyx" + it->second; + else + backup_suffix = "-lyxformat-" + convert(d->file_format); + string const backname = fname + backup_suffix; FileName backup(addName(fpath, addExtension(backname, fext))); // limit recursion, just in case
Re: LyX version 2.3.0rc2 available
On 1/30/18, Scott Kostyshakwrote: > Public release of LyX version 2.3.0rc2 > > Ubuntu packages are now available on the PPA: https://launchpad.net/~lyx-devel/+archive/ubuntu/daily Regards, Liviu > We are proud to announce the second public release candidate of the new LyX > 2.3 > series. This pre-release is meant for testing and should not be used for > serious work. For curious users who would like to test in order to help > catch > bugs before the 2.3.0 release, please back up all of your documents and be > prepared for the worst to happen. Most users (who desire a stable LyX > version) > should not use this pre-release. > > The 2.3 series has a rich set of new features compared to the current > stable > series. An overview of the new features can be found here: > > https://wiki.lyx.org/LyX/NewInLyX23 > > You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/. > > We appreciate your help in testing this pre-release! > > If a file from an earlier version of LyX is opened *and saved* with > any version of 2.3.x, then the original file will automatically be > backed up. The backup file will be found in the backup directory, if one > is set under Tools> Preferences> Paths, or else in the same folder as > the original file, if no backup directory is set. The filename of the > backup file will be: > ORIGNAME-lyxformat-NUM.lyx~ > where NUM is the LyX format number of the original file. In the case of > 2.2.x file, this will be 508, but in the case of older files it will be > different. > > The file lib/RELEASE-NOTES lists some known issues and problems compared > to the current stable releases (LyX 2.2.x). We strongly recommend that > packagers of LyX on various platforms and distributions read this file. > > As with any major release, this one comes with a lot of new features but > also some bugs. If you think you have found a bug in LyX 2.3.0rc2, either > email the LyX developers' mailing list (lyx-devel at lists.lyx.org), > or open a bug report at https://www.lyx.org/trac/wiki/BugTrackerHome. > Please specify if the behavior you are reporting is different from behavior > in a previous LyX version. > > If you have trouble using LyX or have a question, consult the > documentation that comes with LyX (under Help) and the LyX wiki, which you > will find at https://wiki.lyx.org/. You can also send email to the LyX > users' > list (lyx-users at lists.lyx.org). > > The LyX team. > https://www.lyx.org > >
Re: LyX version 2.3.0rc2 available
On Monday, 19 February 2018 11.42.57 WET Jean-Marc Lasgouttes wrote: > Le 17/02/2018 à 14:02, José Abílio Matos a écrit : > > How about the following patch? > > What happens if the format is not from a released version? In this case, > we would like to keep the old naming IMO. I am not sure what your code > intends to do in this case. > > JMarc That can be done. :-) Such as it is it a file format that is not from a stable series gets the next stable version suffix because effectively that was the version that produce it and (before the backport of lyx2lyx to the previous stable series) the first lyx version that was able to read it. My point with the code was just to show that this can be attained easily. I am open to suggestions. -- José Abílio
Re: LyX version 2.3.0rc2 available
On Wednesday, 31 January 2018 15.53.41 WET Jean-Marc Lasgouttes wrote: > Le 31/01/2018 à 16:29, José Abílio Matos a écrit : > > My idea, in the last message, was for lyx2lyx to add the -lyxXX suffix > > to the file name by default when called with the --backup option. > > > > E.g. > > > > lyx2lyx --backup myfile.lyx would result in the original file to be > > called myfile-lyxXX.lyx (where XX is version). > > myfile-lyxXX.lyx~, please. > > JMarc How about the following patch? PS: Ignore the last chunk as it is a simple white space change and unrelated to this. Regards, -- José Abílio diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 7cabe6fce1..a16322dd9a 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -137,6 +137,10 @@ int const LYX_FORMAT = LYX_FORMAT_LYX; typedef mapDepClean; typedef map RefCache; +struct Version_file_format { + string version; + int format; +}; } // namespace @@ -1327,14 +1331,41 @@ Buffer::ReadStatus Buffer::convertLyXFormat(FileName const & fn, FileName Buffer::getBackupName() const { + vector const file_formats = { + {"23", 544}, + {"22", 508}, + {"21", 474}, + {"20", 413}, + {"16", 345}, + {"15", 276}, + {"14", 245}, + {"13", 221}, + {"12", 220}, + {"1163", 218}, + {"116", 217}, + {"115", 216}, + {"11", 215}, + {"010", 210}, + {"006", 200} + }; + FileName const & fn = fileName(); string const fname = fn.onlyFileNameWithoutExt(); string const fext = fn.extension() + "~"; string const fpath = lyxrc.backupdir_path.empty() ? fn.onlyPath().absFileName() : lyxrc.backupdir_path; - string const fform = convert(d->file_format); - string const backname = fname + "-lyxformat-" + fform; + string const current_version = convert(lyx_version_major) + convert(lyx_version_minor); + + string original_version = current_version; + for (const auto & ver: file_formats) { + if (d->file_format > ver.format) { + break; + } + original_version = ver.version; + } + + string const backname = fname + "-lyx" + original_version; FileName backup(addName(fpath, addExtension(backname, fext))); // limit recursion, just in case @@ -4710,7 +4741,7 @@ void Buffer::updateBuffer(UpdateScope scope, UpdateType utype) const // cache was invalid, although we didn't find that out until now. So we // have to do it all again. // That said, the only thing we really need to do is update the citation - // labels. Nothing else will have changed. So we could create a new + // labels. Nothing else will have changed. So we could create a new // UpdateType that would signal that fact, if we needed to do so. parit = cbuf.par_iterator_begin(); updateBuffer(parit, utype);
Re: LyX version 2.3.0rc2 available
On Thu, Feb 01, 2018 at 01:58:54PM +, Joel Kulesza wrote: > I would include the link to the mirror listing. Otherwise, I can imagine > frustration of having a slow/failed download causing me to then go hunt for > a better alternative on the website (for a new user, who may not be totally > familiar with it). I added the link to the list of mirrors at 37b5aa1e. I think this was a good change, especially since the upstream FTP was down briefly [1]. I do not think it is worth it to specify that the upstream FTP is based in Paris. I'm not close to Paris and have not found the mirror to be slow, and we have not gotten much feedback about the FTP being slow. Scott [1] https://www.mail-archive.com/search?l=mid=AM3PR04MB1297EE16DF1C3AA9FA54445CDEF60%40AM3PR04MB1297.eurprd04.prod.outlook.com signature.asc Description: PGP signature
Re: LyX version 2.3.0rc2 available
Am 01.02.2018 um 18:21 schrieb Scott Kostyshak: On Thu, Feb 01, 2018 at 02:14:34PM +, emile lunardon wrote: LyX for Windows offers incomplete support for non-TeX fonts. This is the case, for example, of the Gyre Schola font, which although proposed by Miktex 2.9 , is unknown to LyX 2.3 RC2 (this is not the case of LyX 2.3 compiled under Linux Ubuntu 16.04). I cannot reproduce this. After you installed the package "tex-gyre" using MiKTeX's package manager you have to reconfigure LyX (menu Tools->Reconfigure) and then you can select it as roman font. By the way I see that TeX Gyre provides in the meantime also math fonts. Support for them cannot be added for LyX 2.3 because this will be a file format change. regards Uwe
Re: LyX version 2.3.0rc2 available
On Thu, Feb 01, 2018 at 02:14:34PM +, emile lunardon wrote: > LyX for Windows offers incomplete support for non-TeX fonts. This is the > case, for example, of the Gyre Schola font, which although proposed by > Miktex 2.9 , is unknown to LyX 2.3 RC2 (this is not the case of LyX 2.3 > compiled under Linux Ubuntu 16.04). CC'ing our Windows packager. Uwe can you reproduce? Scott signature.asc Description: PGP signature
Re: LyX version 2.3.0rc2 available
On 02/01/2018 12:19 AM, Scott Kostyshak wrote: > On Thu, Feb 01, 2018 at 05:06:52AM +, Joel Kulesza wrote: >> On Tue, Jan 30, 2018 at 11:36 PM, Scott Kostyshakwrote: >> >>> You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/. >>> >>> >> Colleagues, >> >> Given my recent faulty assumption on how the download site and associated >> mirrors work, what are your thoughts on the wording change: >> >> You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/ (based >> in Paris) or a closer mirror listed at: http://www.lyx.org/Download#toc11. > I'm fine with the change if others support it. Fine with me. Richard
Re: LyX version 2.3.0rc2 available
LyX for Windows offers incomplete support for non-TeX fonts. This is the case, for example, of the Gyre Schola font, which although proposed by Miktex 2.9 , is unknown to LyX 2.3 RC2 (this is not the case of LyX 2.3 compiled under Linux Ubuntu 16.04). 2018-01-31 7:36 GMT+01:00 Scott Kostyshak: > Public release of LyX version 2.3.0rc2 > > > We are proud to announce the second public release candidate of the new > LyX 2.3 > series. This pre-release is meant for testing and should not be used for > serious work. For curious users who would like to test in order to help > catch > bugs before the 2.3.0 release, please back up all of your documents and be > prepared for the worst to happen. Most users (who desire a stable LyX > version) > should not use this pre-release. > > The 2.3 series has a rich set of new features compared to the current > stable > series. An overview of the new features can be found here: > > https://wiki.lyx.org/LyX/NewInLyX23 > > You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/. > > We appreciate your help in testing this pre-release! > > If a file from an earlier version of LyX is opened *and saved* with > any version of 2.3.x, then the original file will automatically be > backed up. The backup file will be found in the backup directory, if one > is set under Tools> Preferences> Paths, or else in the same folder as > the original file, if no backup directory is set. The filename of the > backup file will be: > ORIGNAME-lyxformat-NUM.lyx~ > where NUM is the LyX format number of the original file. In the case of > 2.2.x file, this will be 508, but in the case of older files it will be > different. > > The file lib/RELEASE-NOTES lists some known issues and problems compared > to the current stable releases (LyX 2.2.x). We strongly recommend that > packagers of LyX on various platforms and distributions read this file. > > As with any major release, this one comes with a lot of new features but > also some bugs. If you think you have found a bug in LyX 2.3.0rc2, either > email the LyX developers' mailing list (lyx-devel at lists.lyx.org), > or open a bug report at https://www.lyx.org/trac/wiki/BugTrackerHome. > Please specify if the behavior you are reporting is different from behavior > in a previous LyX version. > > If you have trouble using LyX or have a question, consult the > documentation that comes with LyX (under Help) and the LyX wiki, which you > will find at https://wiki.lyx.org/. You can also send email to the LyX > users' > list (lyx-users at lists.lyx.org). > > The LyX team. > https://www.lyx.org > >
Re: LyX version 2.3.0rc2 available
On Thu, Feb 1, 2018 at 6:34 AM, Pavel Sandawrote: > Joel Kulesza wrote: > > Given my recent faulty assumption on how the download site and associated > > mirrors work, what are your thoughts on the wording change: > > > > You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/ > (based > > in Paris) or a closer mirror listed at: http://www.lyx.org/Download# > toc11. > > I'd say wording should be smt like: > > You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/ or > you can use one of the mirrors listed on our web in case the link doesn't > work or is too slow. > I would include the link to the mirror listing. Otherwise, I can imagine frustration of having a slow/failed download causing me to then go hunt for a better alternative on the website (for a new user, who may not be totally familiar with it).
Re: LyX version 2.3.0rc2 available
Joel Kulesza wrote: > Given my recent faulty assumption on how the download site and associated > mirrors work, what are your thoughts on the wording change: > > You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/ (based > in Paris) or a closer mirror listed at: http://www.lyx.org/Download#toc11. I'd say wording should be smt like: You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/ or you can use one of the mirrors listed on our web in case the link doesn't work or is too slow. Pavel
Re: LyX version 2.3.0rc2 available
On Thu, Feb 01, 2018 at 05:06:52AM +, Joel Kulesza wrote: > On Tue, Jan 30, 2018 at 11:36 PM, Scott Kostyshakwrote: > > > > > You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/. > > > > > Colleagues, > > Given my recent faulty assumption on how the download site and associated > mirrors work, what are your thoughts on the wording change: > > You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/ (based > in Paris) or a closer mirror listed at: http://www.lyx.org/Download#toc11. I'm fine with the change if others support it. > I wonder if other users make similarly faulty assumptions (assuming mirror > selection based on proximity or jingoistically assuming a local ftp.lyx.org > server location), and observe/tolerate suboptimal speeds but don't report > them. Could be. Thanks for the idea, Scott signature.asc Description: PGP signature
Re: LyX version 2.3.0rc2 available
On Tue, Jan 30, 2018 at 11:36 PM, Scott Kostyshakwrote: > > You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/. > > Colleagues, Given my recent faulty assumption on how the download site and associated mirrors work, what are your thoughts on the wording change: You can download LyX 2.3.0rc2 from ftp://ftp.lyx.org/pub/lyx/devel/ (based in Paris) or a closer mirror listed at: http://www.lyx.org/Download#toc11. I wonder if other users make similarly faulty assumptions (assuming mirror selection based on proximity or jingoistically assuming a local ftp.lyx.org server location), and observe/tolerate suboptimal speeds but don't report them. Thanks, Joel
Re: LyX version 2.3.0rc2 available
On Wednesday, 31 January 2018 21.43.11 WET Jean-Marc Lasgouttes wrote: > PS: and José will answer that he agrees 1000% and intended to do that > for the start %-] Nah... last time I used gogol, now I will use gogolplex (10^(10^100)) and my share of smiles is over for the day. :-) -- José Abílio
Re: LyX version 2.3.0rc2 available
On 2018-01-31, Jean-Marc Lasgouttes wrote: > Le 31/01/2018 à 07:36, Scott Kostyshak a écrit : >> If a file from an earlier version of LyX is opened *and saved* with >> any version of 2.3.x, then the original file will automatically be >> backed up. The backup file will be found in the backup directory, if one >> is set under Tools> Preferences> Paths, or else in the same folder as >> the original file, if no backup directory is set. The filename of the >> backup file will be: >> ORIGNAME-lyxformat-NUM.lyx~ >> where NUM is the LyX format number of the original file. In the case of >> 2.2.x file, this will be 508, but in the case of older files it will be >> different. > It would be nice if we were able to translate lyxformat values that > correspond to stable release to a nicer name. For example, -22x.lyx~ > instead of -lyxformat-508.lyx~, or even .22.lyx~, a bit like what export > as 2.2.x does. However I do not know where to get this information from. > A solution would be to let lyx2lyx do the backup itself (with a relevant > command) instead of hardcoding it in Buffer.cpp. > Now that I think if it, this is how things should have been done from > the beginning. I don't think so: Currently, the backup is only saved, if the converted file is *saved* by the new LyX version. With backup written by lyx2lyx, we would write a backup with every *opening* of a document with a new LyX version. This would litter the directories with files also when just browsing documents. Am I missing something? Günter
Re: LyX version 2.3.0rc2 available
Le 31/01/2018 à 16:29, José Abílio Matos a écrit : My idea, in the last message, was for lyx2lyx to add the -lyxXX suffix to the file name by default when called with the --backup option. E.g. lyx2lyx --backup myfile.lyx would result in the original file to be called myfile-lyxXX.lyx (where XX is version). myfile-lyxXX.lyx~, please. JMarc
Re: LyX version 2.3.0rc2 available
On Wednesday, 31 January 2018 11.16.26 WET Jean-Marc Lasgouttes wrote: > Yes, it is nice to have a --backup option, but if lyx itself can avoid > to figure out the suffix from the cryptic lyxformat value, it is even > better. FWIW I agree with you. :-) My idea, in the last message, was for lyx2lyx to add the -lyxXX suffix to the file name by default when called with the --backup option. E.g. lyx2lyx --backup myfile.lyx would result in the original file to be called myfile-lyxXX.lyx (where XX is version). That is why I proposed a different option (instead of the original -i --in-place option). > JMarc Apologies if this was not clear from the email exchange (reading again I see that it was not from the context). :-) -- José Abílio
Re: LyX version 2.3.0rc2 available
Le 31/01/2018 à 12:02, José Abílio Matos a écrit : The following is an example from lyx to lyx13: python -tt $$s/lyx2lyx/lyx2lyx -V 1.3 -o $$o $$i OK, I missed the format definition for lyx22 in lib/configure.py. Note that initially the command line option had the original format passed there, I changed (or suggested) to changed those to use the -V option that lyx2lyx knows since 2008. :-) Which is good. > But it would be better to let lyx2lyx figure out the suffix by itself, > wouldn't it? That can be done, my point here is that should not be done by default by lyx2lyx. It could be triggered by an option like --backup, from lyx point of view it does not matter since it could always pass that option when calling lyx2lyx. Yes, it is nice to have a --backup option, but if lyx itself can avoid to figure out the suffix from the cryptic lyxformat value, it is even better. JMarc
Re: LyX version 2.3.0rc2 available
On Wednesday, 31 January 2018 10.35.08 WET Jean-Marc Lasgouttes wrote: > Le 31/01/2018 à 11:11, José Abílio Matos a écrit : > > I am suggesting that > > > > format 508 -> .22.lyx > > > > format 509 -> .23.lyx > > What is the current situation? Is it lyx2lyx that creates the .22.lyx > names? I could not find it in the sources. Nope. I searched for it since it was not obvious just like what you found out. All the format just like .22.lyx, .16.lyx and so on come from file formats that we introduce: Preferences -> File Handling -> File Formats and then we have the rules from lyx to those formats in Preferences -> File Handling -> Converters The following is an example from lyx to lyx13: python -tt $$s/lyx2lyx/lyx2lyx -V 1.3 -o $$o $$i Note that initially the command line option had the original format passed there, I changed (or suggested) to changed those to use the -V option that lyx2lyx knows since 2008. :-) > > I have it also on my list to do this for other scripts, the obvious > > choice (taken from sed man page) is: > > > > -i[SUFFIX], --in-place[=SUFFIX] > > > > edit files in place (makes backup if SUFFIX supplied) > > But it would be better to let lyx2lyx figure out the suffix by itself, > wouldn't it? That can be done, my point here is that should not be done by default by lyx2lyx. It could be triggered by an option like --backup, from lyx point of view it does not matter since it could always pass that option when calling lyx2lyx. > > > José, are you reading this? > > > > This is one of the issues that I had in my list for 2.4, with an eye to > > backport it for 2.3. > > Thanks > > JMarc :-) -- José Abílio
Re: LyX version 2.3.0rc2 available
Le 31/01/2018 à 11:11, José Abílio Matos a écrit : I am suggesting that format 508 -> .22.lyx format 509 -> .23.lyx What is the current situation? Is it lyx2lyx that creates the .22.lyx names? I could not find it in the sources. I have it also on my list to do this for other scripts, the obvious choice (taken from sed man page) is: -i[SUFFIX], --in-place[=SUFFIX] edit files in place (makes backup if SUFFIX supplied) But it would be better to let lyx2lyx figure out the suffix by itself, wouldn't it? > José, are you reading this? This is one of the issues that I had in my list for 2.4, with an eye to backport it for 2.3. Thanks :) JMarc
Re: LyX version 2.3.0rc2 available
On Wednesday, 31 January 2018 09.48.50 WET Jean-Marc Lasgouttes wrote: > It would be nice if we were able to translate lyxformat values that > correspond to stable release to a nicer name. For example, -22x.lyx~ > instead of -lyxformat-508.lyx~, or even .22.lyx~, a bit like what export > as 2.2.x does. However I do not know where to get this information from. FWIW I wholeheartedly agree with you. :-) Even I find it strange to have those numbers there. One option would be to have a map or a list of tuples (data structures) with the information in there, such that if the file format is between two stable versions it gets upgrade to the next version. I am suggesting that format 508 -> .22.lyx format 509 -> .23.lyx This duplicates the information that we have in lyx2lyx but since we only update it once for each stable release it is a more than acceptable compromise. > A solution would be to let lyx2lyx do the backup itself (with a relevant > command) instead of hardcoding it in Buffer.cpp. That can be done, it is quite easy to do it in lyx2lyx. I have it also on my list to do this for other scripts, the obvious choice (taken from sed man page) is: -i[SUFFIX], --in-place[=SUFFIX] edit files in place (makes backup if SUFFIX supplied) If we agree that this is the way to go this can be done easily. We get the filename to convert, rename it with the suffix, and write the converted file to the usual location. > Now that I think if it, this is how things should have been done from > the beginning. +10^100 (a huge +1) :-) > José, are you reading this? This is one of the issues that I had in my list for 2.4, with an eye to backport it for 2.3. > JMarc -- José Abílio
Re: LyX version 2.3.0rc2 available
Le 31/01/2018 à 07:36, Scott Kostyshak a écrit : If a file from an earlier version of LyX is opened *and saved* with any version of 2.3.x, then the original file will automatically be backed up. The backup file will be found in the backup directory, if one is set under Tools> Preferences> Paths, or else in the same folder as the original file, if no backup directory is set. The filename of the backup file will be: ORIGNAME-lyxformat-NUM.lyx~ where NUM is the LyX format number of the original file. In the case of 2.2.x file, this will be 508, but in the case of older files it will be different. It would be nice if we were able to translate lyxformat values that correspond to stable release to a nicer name. For example, -22x.lyx~ instead of -lyxformat-508.lyx~, or even .22.lyx~, a bit like what export as 2.2.x does. However I do not know where to get this information from. A solution would be to let lyx2lyx do the backup itself (with a relevant command) instead of hardcoding it in Buffer.cpp. Now that I think if it, this is how things should have been done from the beginning. José, are you reading this? JMarc