hi, Is there any way to have auto save option for .txt files in Fedora. Means, if we write something, in some seconds (fixed, e.g., 10 secs) that after which it automatically saves the name.txt files while creating any new file in Fedora.
On Sat, 21 Aug 2010 23:38:05 +0530 Parshwa Murdia b330bkn@gmail.com wrote:
hi, Is there any way to have auto save option for .txt files in Fedora. Means, if we write something, in some seconds (fixed, e.g., 10 secs) that after which it automatically saves the name.txt files while creating any new file in Fedora.
That depends on what you are using to write the .txt file.
In gedit: Preferences->Editor tab check the autosave box and set your time.
I couldn't find anything in Kwrite
vim apparentlt doesn't do it: http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl#5.9
I don't know about emacs.
Steve
On Sun, Aug 22, 2010 at 12:20 AM, Steve Blackwell zephod@cfl.rr.com wrote:
In gedit: Preferences->Editor tab check the autosave box and set your time.
I got it in:
Applications -> System Tools -> Configuration Editor -> / -> Apps -> gedit-2 -> preferences -> editor -> save
And there in the left side, I checked the box for auto_save but auto_save_interval is already set to 10 and there is no option for it to edit, however, it is good time interval. But I guess that Callaghan said correct that the auto save is for editors and not FILENAME.txt files. Because after implementing this also, I am not able to get the auto save working in .txt files.
On Saturday 21 August 2010 11:52 PM, Parshwa Murdia wrote:
On Sun, Aug 22, 2010 at 12:20 AM, Steve Blackwellzephod@cfl.rr.com wrote:
In gedit: Preferences->Editor tab check the autosave box and set your time.
I got it in:
Applications -> System Tools -> Configuration Editor -> / -> Apps -> gedit-2 -> preferences -> editor -> save
And there in the left side, I checked the box for auto_save but auto_save_interval is already set to 10 and there is no option for it to edit, however, it is good time interval. But I guess that Callaghan said correct that the auto save is for editors and not FILENAME.txt files. Because after implementing this also, I am not able to get the auto save working in .txt files.
What editor are you using? gedit or something else?
On Sun, Aug 22, 2010 at 12:47 PM, Suvayu Ali fatkasuvayu+linux@gmail.com wrote:
What editor are you using? gedit or something else?
When I type the following:
]$ gedit FILENAME.txt
I am able to write something in the popped up file.
On 22 August 2010 00:52, Parshwa Murdia b330bkn@gmail.com wrote:
On Sun, Aug 22, 2010 at 12:47 PM, Suvayu Ali fatkasuvayu+linux@gmail.com wrote:
What editor are you using? gedit or something else?
When I type the following:
]$ gedit FILENAME.txt
I am able to write something in the popped up file.
I think you are misunderstanding how auto save works with editors on linux. The file you are editing is usually saved as a different file. So if you are editing "myfile.txt" then the older version of the file is kept as "myfile.txt~" and the autosaved file is usually saved as #myfile.txt#. This 2nd part differs depending on what editor you are using. I am not very familiar with gedit's behaviour to give any more details.
GL
--
Regards, Parshwa Murdia
On Sun, Aug 22, 2010 at 2:34 PM, suvayu ali fatkasuvayu+linux@gmail.com wrote:
I think you are misunderstanding how auto save works with editors on linux. The file you are editing is usually saved as a different file. So if you are editing "myfile.txt" then the older version of the file is kept as "myfile.txt~" and the autosaved file is usually saved as #myfile.txt#. This 2nd part differs depending on what editor you are using. I am not very familiar with gedit's behaviour to give any more details.
Oh I see, you must be correct and I am using 'gedit' editor. But in the terminal I use vi-editor to create and save the files.
On Sat, 2010-08-21 at 14:50 -0400, Steve Blackwell wrote:
vim apparentlt doesn't do it: http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl#5.9
Though, if I've had a crash, or some other interruption (e.g. loss of network connection). When I restart vim to edit the same file, or re-open the same file in vim, it finds the swap file it was previously using, and offers to let me recover from where I left off.
On Sun, Aug 22, 2010 at 12:23 PM, Tim ignored_mailbox@yahoo.com.au wrote:
Though, if I've had a crash, or some other interruption (e.g. loss of network connection). When I restart vim to edit the same file, or re-open the same file in vim, it finds the swap file it was previously using, and offers to let me recover from where I left off.
And the technical reason might be only be autosave vim!
On Sun, 22 Aug 2010 16:23:42 +0930 Tim ignored_mailbox@yahoo.com.au wrote:
On Sat, 2010-08-21 at 14:50 -0400, Steve Blackwell wrote:
vim apparentlt doesn't do it: http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl#5.9
Though, if I've had a crash, or some other interruption (e.g. loss of network connection). When I restart vim to edit the same file, or re-open the same file in vim, it finds the swap file it was previously using, and offers to let me recover from where I left off.
Ahh, yes, vim -r, where r stands for recovery. I had forgotten about that.
Steve.
On Sun, Aug 22, 2010 at 7:59 PM, Steve Blackwell zephod@cfl.rr.com wrote:
Ahh, yes, vim -r, where r stands for recovery. I had forgotten about that.
Oh.
Parshwa Murdia wrote:
hi, Is there any way to have auto save option for .txt files in Fedora. Means, if we write something, in some seconds (fixed, e.g., 10 secs) that after which it automatically saves the name.txt files while creating any new file in Fedora.
Just keep in mind that a file, if open, may be in some state only a mother could love. You really have to be selective about saving open files, or eventually you will save a file which is not in a useful state.
That said, you can find files modified since the last save and save them with whatever means you wish, such as rsync.
This is an example, remember I just made it up: touch next-save find . -name *.txt -mnewer last-save -mmin +10 >save-list rsync -a --files-from=save-list DESTINATION && mv next-save last-save
Save files modified since the previous save, but untouched for ten minutes, since that improves your chance that the file is in a useful state, retry until the backup succeeds.
Run that as a script every hour or so.
NOTE: this is one of dozens of solutions, unless the data in the files is vastly valuable I'd just back them all up once a day. That's me, the cost of backup should not be greater than the cost of recreation.
On Sun, Aug 22, 2010 at 1:56 AM, Bill Davidsen davidsen@tmr.com wrote:
Just keep in mind that a file, if open, may be in some state only a mother could love. You really have to be selective about saving open files, or eventually you will save a file which is not in a useful state.
Nothing relevant to the present scenario!
That said, you can find files modified since the last save and save them with whatever means you wish, such as rsync.
Would search about it ('rsync').
This is an example, remember I just made it up: touch next-save find . -name *.txt -mnewer last-save -mmin +10 >save-list rsync -a --files-from=save-list DESTINATION && mv next-save last-save
I try this example.
Save files modified since the previous save, but untouched for ten minutes, since that improves your chance that the file is in a useful state, retry until the backup succeeds.
Run that as a script every hour or so.
NOTE: this is one of dozens of solutions, unless the data in the files is vastly valuable I'd just back them all up once a day. That's me, the cost of backup should not be greater than the cost of recreation.
Yes, thanks for this information. I would try these.
On Sat, 2010-08-21 at 23:38 +0530, Parshwa Murdia wrote:
hi, Is there any way to have auto save option for .txt files in Fedora. Means, if we write something, in some seconds (fixed, e.g., 10 secs) that after which it automatically saves the name.txt files while creating any new file in Fedora.
Autosave isn't a property of files. It's a property of editors.
poc
On Sun, Aug 22, 2010 at 3:29 AM, Patrick O'Callaghan pocallaghan@gmail.com wrote:
Autosave isn't a property of files. It's a property of editors.
Yes, it may be correct.
On Sat, 2010-08-21 at 23:38 +0530, Parshwa Murdia wrote:
Is there any way to have auto save option for .txt files in Fedora. Means, if we write something, in some seconds (fixed, e.g., 10 secs) that after which it automatically saves the name.txt files while creating any new file in Fedora.
Despite auto-save features being in many programs, I tend to avoid it. After many years of computing, I'm used to hitting a "save" hotkey every few minutes, to keep what I've done safe. It also gives me a good undo, if I've messed up. Auto-saving loses that advantage, it's saved your mistakes (if you've made any), without an easy to way to undo them. Anything from cat on keyboard, to trying a re-write of your document, then deciding you preferred the prior version.
On Sun, Aug 22, 2010 at 12:54 PM, Tim ignored_mailbox@yahoo.com.au wrote:
Despite auto-save features being in many programs, I tend to avoid it. After many years of computing, I'm used to hitting a "save" hotkey every few minutes, to keep what I've done safe.
I also do the same, I just click Ctrl+S. But my query generating seeing the analogy in 'gmail compose message' option.
It also gives me a good undo, if I've messed up. Auto-saving loses that advantage, it's saved your mistakes (if you've made any), without an easy to way to undo them. Anything from cat on keyboard, to trying a re-write of your document, then deciding you preferred the prior version.
Yes, that is dis-advantage with auto save.