Giter Site home page Giter Site logo

2 BackUps about latexindent.pl HOT 10 CLOSED

cmhughes avatar cmhughes commented on May 27, 2024
2 BackUps

from latexindent.pl.

Comments (10)

cmhughes avatar cmhughes commented on May 27, 2024

Thanks for the feedback, and sorry for my delayed response (will respond more quickly in the future).

That's a nice idea, perhaps a switch like, 'maxNumberOfBackUps: 2' in defaultSettings.yaml? I'll look into it, it should work be fairly easy to implement :)

from latexindent.pl.

Tchiller avatar Tchiller commented on May 27, 2024

Yes, this is exactly, what I mend. Thanks for looking at this and at my other two feature requests.
Glad, you found your "issues area" :-) I guess, so latexindent will become even more awesome in the next time.

Good work, Tchiller

from latexindent.pl.

cmhughes avatar cmhughes commented on May 27, 2024

Have a look at the latest version :)

from latexindent.pl.

Tchiller avatar Tchiller commented on May 27, 2024

Hi, thanks for your edit and for informing me. Actually it does not work as expected. Sorry. I'll try to explain:

First of all, the use of "overwrite" and "maxNumberOfBackups" (in my case "2") is a bit irritating, as it yields 3 backup files. I found, that it is my mistake, as it is explained in chapter "backupExtension". Nevertheless, it would be more intuitive to get just 2 backups.
Now I have .backup0 from the "overwrite" process and backup1 and backup2 from the "maxNumberOfBackUps = 2" option.

The real error (if I may say so), is that backup1 and backup2 are not the last two versions. Only backup2 gets overwritten every time giving me the same functionality (and risk) as with only one backup file.

I hope, that was understandable. If not, let me know and I do an example.

Thanks you!

from latexindent.pl.

cmhughes avatar cmhughes commented on May 27, 2024

Thanks for the follow-up.

I think I understand your point. So, if maxNumberOfBackUps is set, would you like the subsequent backs up to work sequentially from the beginning?

For example, let's say you have myfile.tex and you get myfile.bak0, myfile.bak1, myfile.bak2. It sounds like you would like the script to overwrite myfile.bak0, and then myfile.bak1, and then myfile.bak2, and then cycle through again- is that correct?

At the moment, it only overwrites the most recent backup (which I think you described).

from latexindent.pl.

Tchiller avatar Tchiller commented on May 27, 2024

Yes, you got it right. What I would expect with my settings is:

maxNumberOfBackups = 2

  1. run with "overwrite":
    myfile.bak1 is written (the default .myfile.bak0 for the "overwrite" routine is not needed, as I explicitly told the script to write backups (2) for me)
  2. run with "overwrite":
    myfile.bak2 is written (if this run shows me, that latexindent.pl has destroyed my document in "1. run", I can get back to myfile.bak1 afterwards)
  3. run with "overwrite":
    myfile.bak2 gets renamed to myfile.bak1, overwriting the old myfile.bak1
    myfile.bak2 is written (that leaves me with my desired two backups and still with the possibility to undo errors by latexindent.pl, which have been done in "2. run".

I think, that would make sure, nothing can ever happen. Implying that latexindent.pl will ever do any error. Until now it works great even for my preamble.

Thanks, Tchiller

from latexindent.pl.

cmhughes avatar cmhughes commented on May 27, 2024

Thanks for the follow-up; I understand your thought process now. I'll try and get this implemented in the next version. Remember that there is an option to ignore the preamble.

from latexindent.pl.

Tchiller avatar Tchiller commented on May 27, 2024

Thank you.
About the preamble. I know, I switched it off. Works like a charm.

from latexindent.pl.

cmhughes avatar cmhughes commented on May 27, 2024

Hi Tchiller,
I've just committed a version of latexindent.pl that has the option to
cycleThroughBacUps, which has the scheme you described previously.

The latest version has quite a few new features- I hope you enjoy them!
I'll upload to ctan once I've tested it a bit more, for now you can find it
on github :)

Best

Chris

On Tue, Nov 12, 2013 at 11:25 PM, Tchiller [email protected] wrote:

Thank you.
About the preamble. I know, I switched it off. Works like a charm.

Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-28372247
.

from latexindent.pl.

Tchiller avatar Tchiller commented on May 27, 2024

Hi Chris,

thank you very much. I've got it installed and it seems to work perfectly for now. Great. I will test in in daily use (which I don't have at the very moment) and keep you updated if something does not work as expected. I am looking forward to check out the new features.

All the best, Tchiller

from latexindent.pl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.