Bug 127224 - Trigger file.save every n minutes
Summary: Trigger file.save every n minutes
Status: RESOLVED DUPLICATE of bug 65509
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-29 19:49 UTC by stephenboston
Modified: 2020-04-28 18:27 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stephenboston 2019-08-29 19:49:00 UTC
Simple sleep loop to trigger the File.Save event every n minutes, where n is a user-configurable value.
Comment 1 Oliver Brinzing 2019-08-30 10:15:09 UTC
Thank you for reporting the bug. 

LO has already a AutoRecovery feature.
Please check Menu Tools/Options/Load/Save/General/
Save
[ ] Save AutoRecovery information every x Minutes

Does that correspond to your ideas?

I have set the bug's status to 'NEEDINFO'. 
Please change it back to 'UNCONFIRMED' once the requested info is provided.
Comment 2 stephenboston 2019-08-30 12:45:54 UTC
I have issues when using remote version control.

If I check in with unsaved changes those changes will not be recovered when I checkout to a different device.

I am a frequent saver but still there are those odd moments -- say I'm about to checkin then make a quick change to a file and then checkin without saving the file.

I do understand that such cases are instances of operator error -- I do I do -- but every other word processor I've used offers this feature and in these days with our fast disks even a large file saves instantly.

I've read that previous attempts to provide this feature wiped out the file's history for undo, but I do not find that a simple save of the file has this effect.

It should be possible to do this with a macro but I had difficulty with the macro framework and running context, and I don't have the time to learn unfortunately.
Comment 3 QA Administrators 2019-09-02 09:38:50 UTC Comment hidden (obsolete)
Comment 4 Xisco Faulí 2019-10-29 09:45:09 UTC
(In reply to stephenboston from comment #2)
> I have issues when using remote version control.
> 
> If I check in with unsaved changes those changes will not be recovered when
> I checkout to a different device.
> 
> I am a frequent saver but still there are those odd moments -- say I'm about
> to checkin then make a quick change to a file and then checkin without
> saving the file.
> 
> I do understand that such cases are instances of operator error -- I do I do
> -- but every other word processor I've used offers this feature and in these
> days with our fast disks even a large file saves instantly.
> 
> I've read that previous attempts to provide this feature wiped out the
> file's history for undo, but I do not find that a simple save of the file
> has this effect.
> 
> It should be possible to do this with a macro but I had difficulty with the
> macro framework and running context, and I don't have the time to learn
> unfortunately.

Hi,
How is it called in the other word processor? Word for instance ?
Comment 5 stephenboston 2019-10-29 20:03:39 UTC
In other word processors I have used there is an 'Autosave' option in the settings. When enabled we can specify a time -- in minutes usually. When a file is open and has unsaved changes for that specified time, then the system will trigger a 'save' action on that file.
Comment 6 QA Administrators 2019-10-30 03:38:11 UTC Comment hidden (obsolete)
Comment 7 Xisco Faulí 2019-12-12 12:53:48 UTC
(In reply to stephenboston from comment #5)
> In other word processors I have used there is an 'Autosave' option in the
> settings. When enabled we can specify a time -- in minutes usually. When a
> file is open and has unsaved changes for that specified time, then the
> system will trigger a 'save' action on that file.

Please, see comment 1, I believe it's what you want, isn't it ?
Comment 8 stephenboston 2019-12-12 15:57:04 UTC
Auto-recovery is not an acceptable solution for this requirement. 

Consider this scenario:

- I neglect to manually save a document
- I check in the directory
- On another host I make changes to the same file -- attempting to reconstruct the lost changes
- Back on the home host I checkout those changes
- Open the document in LO
- Auto recovery overwrites the changes

Now admittedly there are steps along the way this could have been avoided, and many people may insist that sinners must suffer the consequences of their sins. 

However other people may argue, I among them, that it is not the place of software to play the scold. 

This is a feature that many people have requested and that is persistently denied for reasons that are not clear. On the face it seems a simple request. A timed loop that triggers the file.save function on dirty files.
Comment 9 QA Administrators 2019-12-13 03:43:13 UTC Comment hidden (obsolete)
Comment 11 stephenboston 2020-04-27 20:20:35 UTC
This does not satisfy the requirement. 

The suggested macro saves a *backup* of the file when I manually trigger a file.save. 

I'm looking for a feature that will *automatically* save a file I have open that is modified.

Expressed simply: 

- consider the File.Save item on the File menu -- the event handler that responds to that trigger
- every n minutes *automatically* fire that event handler. 

This could be implemented by a simple timed loop that checks if a file is modified and if it is then trigger the File.Save event.  


The suggested solution -- the macro -- adds an additional process to the file.save event and a useful feature that is indeed.  

However that solution does not satisfy the requested requirement. 

Thank you.
Comment 12 Buovjaga 2020-04-28 06:06:22 UTC
Then use Tools > Options > LibreOffice > Advanced ... Expert Configuration .. search for AutoSave
Comment 13 stephenboston 2020-04-28 07:17:28 UTC
That autosave is for autorecovery. That is not the same thing. Autosave saves an image that I restore through autorecovery that overwrites the file in place. This runs into problems with a version control program.

People have been asking for this for many years yet the LO development community is resistant. There may be a very good reason for this resistance but it has never been explained to me.

To be clear: the autorecovery process does not work for my workflow. I need a process that saves the file I'm working on. If Microsoft can do it...
Comment 14 Buovjaga 2020-04-28 07:21:31 UTC
(In reply to stephenboston from comment #13)
> That autosave is for autorecovery. That is not the same thing. Autosave
> saves an image that I restore through autorecovery that overwrites the file
> in place. This runs into problems with a version control program.

No, the one in expert config is not autorecovery. Did you try it? The boolean is false in my expert config, while autorecovery is enabled. I believe autosave was moved to expert config from the visible UI at some point.
Comment 15 stephenboston 2020-04-28 07:32:58 UTC
Are you sure? It is set to true in mine with an interval of 1.

I went through this  a year or so ago. My version is the latest as delivered through the Ubuntu repository. 6.4.4.2. 

Perhaps there is an issue with Linux?
Comment 16 Buovjaga 2020-04-28 08:03:04 UTC
(In reply to stephenboston from comment #15)
> Are you sure? It is set to true in mine with an interval of 1.
> 
> I went through this  a year or so ago. My version is the latest as delivered
> through the Ubuntu repository. 6.4.4.2. 
> 
> Perhaps there is an issue with Linux?

Let me reconstruct the expert config structure here for AutoSave:
> org.openoffice.Office.Common
>   Save
>     Document AutoSave boolean false
>     Document AutoSavePrompt boolean true
>     Document AutoSaveTimeIntervall long 10

Then, we have a separate preference for AutoRecovery:
> org.openoffice.Office.Recovery
>   AutoSave Enabled boolean true
>   AutoSave TimeIntervall long 10
>   AutoSave MinSpaceDocSave long 5
>   AutoSave MinSpaceConfigSave long 1
>   AutoSave UserAutoSaveEnabled boolean false

Can you comment on how they are for you?
Comment 17 stephenboston 2020-04-28 12:42:17 UTC
org.openoffice.Office.Common
   Save
     Document AutoSave boolean true
     Document AutoSavePrompt boolean true
     Document AutoSaveTimeIntervall long 1


org.openoffice.Office.Recovery
   AutoSave Enabled boolean true
   AutoSave TimeIntervall long 1
   AutoSave MinSpaceDocSave long 5
   AutoSave MinSpaceConfigSave long 1
   AutoSave UserAutoSaveEnabled boolean true
Comment 18 Buovjaga 2020-04-28 14:23:28 UTC
Ok I found an older issue.

You have to use the macro solution and it is anyway better to have incremental versions of the files. Less risk of damaging a single copy.

*** This bug has been marked as a duplicate of bug 65509 ***
Comment 19 stephenboston 2020-04-28 15:38:23 UTC
As far as I can see the macro requires a manual trigger. This is not what I need. 

I want a timed automatic event that triggers the same process as I will trigger when I press the save button. The macro does not provide that. 

It is not for you to tell me that what you want is better than what I want.

Can you explain why this feature is so difficult for LO to implement? The function exists as a response to the File.Save event. All I want is a timed loop that does exactly the same thing. 

Now there may be a very good reason why this impossible but I am yet to hear it. I receive condescension and correction but no explanation. It's a simple request and all I get back from the LO dev community is a dismissal insisting that I don't really want what I want. 

This suggests a charge of arrogance and indifference to users. Users are losers is a refrain I'm familiar with through my time as a developer. The LO community is beginning to show itself as that kind of culture. 

I hope to be proven wrong.
Comment 20 Buovjaga 2020-04-28 17:34:36 UTC
It seems I hastily gave bad links to the AskLibO answers - to the revision history instead of the answers. I can't find a way to link to the answers themselves so:
https://ask.libreoffice.org/en/question/75460/libo-515-on-debian-85-writer-close-without-asking-to-save-in-need-of-an-automatic-incremental-saving-function/?answer=75547#post-id-75547

The answer by mark_t has a TimeAutoBackup document, which contains the macro module and documentation. Quoting from the file:

"Copy the three modules from the Standard Library of this document or from the module code sections of the text of this document.

In the “TimedBackup” module set “Const iBackupTimeSeconds” to the desired delay between automatic saves in seconds. Recommended 900 = 15 minutes.

Under “Tools”, “Customise...”, select save in LibreOffice and assign the macro “Standard.TimedBackup.TriggerAutomaticBackup” to the events for "Document loading finished" and "Document has been saved as". 

In “AutoBackup” module, set sPathBackupFolder to select the location for saving timed backups. The default "\BackupDocs" will save timed backups to a subfolder "BackupDocs" of the current documents location."

I think it is outrageous that you accuse me of condescension and arrogance when I am helping you in my free time, as user to user.
Comment 21 stephenboston 2020-04-28 18:20:45 UTC
I apologise. Sincerely. I am so very sorry. I am grateful for your help. I am.

I thought you were a member of the dev team. I welcome your opinion as a user. I hope you understand where I'm coming from. 

I have found this very frustrating. Once again, I apologise. 

Thank you for your help. 

In light of this conversation perhaps you will allow this feature request to remain open. Although the macro is very useful it is not what I am looking for. I don't want a backup I want the file I'm working on to be saved under its own name, replacing the file on disk that I opened. 

Please accept my apology and reconsider my request.
Comment 22 Buovjaga 2020-04-28 18:27:53 UTC
(In reply to stephenboston from comment #21)
> In light of this conversation perhaps you will allow this feature request to
> remain open. Although the macro is very useful it is not what I am looking
> for. I don't want a backup I want the file I'm working on to be saved under
> its own name, replacing the file on disk that I opened. 

Bug 65509 is about the AutoSave feature being broken, so that is why I closed your report as a duplicate. It is unfortunate that the report has languished since 2013, but we have thousands of bug reports and requests and a limited number of developers.