LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-07-2020, 01:58 AM   #1
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 113

Rep: Reputation: 16
Question Geany: Automatically remove autosaved backup after closing file (gio_unsafe_save_backup method)


Hi,

I want a backup/autosave feature like vim has (by default). So I was reading the Geany wiki article on autosaving (All you never wanted to know about file saving)[1]... and it's unexpectedly inconvenient.

I have chosen to use "gio_unsafe_save_backup" because I think it's the best alternative, since it's not overwriting the original file and uses the same directory, but...

After closing the file in the editor, the backup just stays there.
Is there a way to automatically delete the backup once I press 'Save' or close the editor?

The "Backup Copy" option is interesting, but it uses a fixed directory (like /tmp), and creates multiple files over time (from a single file). If only there was an option to create a single backup of each file and that it gets overwritten in a specified interval, and then deleted after manually saving or closing...

Is there any Geany whiz out here that could help?

If there's not an organic way to solve this, perhaps I should see if I can run a script that automatically deletes the file, right after I close the file in the editor.

Thank you.

[1] https://wiki.geany.org/config/all_yo...ut_file_saving
 
Old 11-07-2020, 05:56 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Geany's features are well documented, and if you din't find something that fulfils your exact requirements, I'd say the answer is clear...

Quote:
Originally Posted by tauro_kpo View Post
After closing the file in the editor, the backup just stays there.
Is there a way to automatically delete the backup once I press 'Save' or close the editor?
This would make the functionality (almost) the same as use_atomic_file_saving.

Quote:
Originally Posted by tauro_kpo View Post
The "Backup Copy" option is interesting, but it uses a fixed directory (like /tmp), and creates multiple files over time (from a single file). If only there was an option to create a single backup of each file and that it gets overwritten in a specified interval, and then deleted after manually saving or closing...
You could write a script that deletes the temporary directory after geany closes?
 
  


Reply

Tags
backup, geany, save, savefile



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Home folder loads slowly due to images autosaved there by Motion webcam security hcl1 Linux - Newbie 6 01-09-2016 06:37 PM
iptables rules autosaved on reboot? postcd Linux - General 2 05-04-2014 07:00 PM
[SOLVED] return text from geany or other editor to IDE after saving and closing the editor mtdew3q Programming 4 05-15-2013 10:40 PM
What is the best backup method to make a backup of a running Ubuntu server ? pmorin Linux - Software 9 09-28-2011 07:12 AM
recovering autosaved OO document cov Linux - Software 5 06-28-2008 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration