blu.org  wiki

text editor with auto-save feature

View: New views
11 Messages — Rating Filter:   Alert me  

text editor with auto-save feature

by Tom Metro-16 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Any recommendations for a Linux GUI text editor that will automatically
save unnamed buffers?

In other words, you can do "File | New", type some text, have a system
crash, reboot, and recover the typed text.

There are plenty of editors that will autosave a named buffer, but
almost none that will also do it for an unnamed buffer. (I've used a
couple of Windows-only editors that have this feature. You'd think crash
recovery would be an expected standard feature on all GUI apps., but
sadly it isn't.)

  -Tom

--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by Kevin D. Clark-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Tom Metro writes:

> Any recommendations for a Linux GUI text editor that will automatically
> save unnamed buffers?

How about:

xemacs -vanilla /tmp/unamed-file-created-on-`date '+%Y-%m-%d-%H-%M-%S'`

It's not exactly what you asked for, but it might accomplish your
goal.

Regards,

--kevin
--
GnuPG ID: B280F24E                God, I loved that Pontiac.
alumni.unh.edu!kdc                -- Tom Waits
http://kdc-blog.blogspot.com/     
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by Bugzilla from greg@freephile.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, May 21, 2009 at 2:03 AM, Tom Metro <tmetro-blu@...> wrote:

> Any recommendations for a Linux GUI text editor that will automatically
> save unnamed buffers?
>
> In other words, you can do "File | New", type some text, have a system
> crash, reboot, and recover the typed text.
>
> There are plenty of editors that will autosave a named buffer, but
> almost none that will also do it for an unnamed buffer. (I've used a
> couple of Windows-only editors that have this feature. You'd think crash
> recovery would be an expected standard feature on all GUI apps., but
> sadly it isn't.)
>
>  -Tom

Have you tried Quanta?

"Qantas never crash" - Dustin Hoffman in Rainman
http://www.youtube.com/watch?v=kJZQkslDBjM

Ooops, that's Qantas the airline (but I love that scene).

Quanta, the editor, certainly has crashed.  Add to that it's suffering
from very slow development to get onto the KDE4 bandwagon.  Still, it
has an auto-save feature.  I wasn't able to check if it does it on an
unnamed buffer - but I'm 90% sure that it does.

caveat: one of the great features of Quanta is that it allows
transparent network operations through KIO slaves.  That means you can
edit files on your server using
file->open->fish://user@.../path/to/file  In that scenario, I
know I've lost contents on a crash - or at least had to go looking for
them on the local disk because quanta didn't look in it's remote file
cache the same way it looks in it's local file cache.

~ Greg

--
Greg Rundlett
Web Developer - Initiative in Innovative Computing
http://iic.harvard.edu
camb 617-384-5872
nbpt 978-225-8302
m. 978-764-4424
-skype/aim/irc/twitter freephile
http://profiles.aim.com/freephile

_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by Jerry Feldman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 05/21/2009 08:41 AM, Kevin D. Clark wrote:

> Tom Metro writes:
>
>  
>> Any recommendations for a Linux GUI text editor that will automatically
>> save unnamed buffers?
>>    
>
> How about:
>
> xemacs -vanilla /tmp/unamed-file-created-on-`date '+%Y-%m-%d-%H-%M-%S'`
>
> It's not exactly what you asked for, but it might accomplish your
> goal.
>
>  
Again with xemacs,  a bare xemacs and GNU emacs comes up in a *scratch*
buffer that is not saved. But, if you want to create a buffer ^x^f lets
you either read an existing file or create a buffer with a file name.
And at that point, a save file is created in the current directory. So,
if your system crashes because of a hardware problem (because we all
know that neither Linux nor Emacs ever crashes) you will have at least a
partial file. Additionally, if you start vi (eg. vim) and start editing,
a .swp file is created, since there is no file name associated. Normally
a <filename>.swp is created.


--
Jerry Feldman <gaf@...>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846



_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by Tom Metro-16 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greg Rundlett wrote:
> Have you tried Quanta?

No, hadn't heard of it.


> ...it's suffering from very slow development to get onto the KDE4
> bandwagon.

As I'm using GNOME, that doesn't concern me, but as packaged for Ubuntu,
Quanta depends or recommends CVS, which seems a bit antiquated. Looks
like it recommends cervisia, which is apparently a CVS front-end. I
guess this is a side effect of the recent Ubuntu policy change where
they automatically install recommended packages. I didn't think that
change would bother me, but now I'm having second thoughts...

Quanta is pretty insistent about its recommended packages. I removed
cervisia and on startup it put up a dialog warning me that it was
absent, and also complaining that KImageMapEditor (oddly not in the
recommended list) was absent. So I guess Ubuntu packaging doesn't get
all the blame for being too inclusive.


> Still, it has an auto-save feature.  I wasn't able to check if it
> does it on an unnamed buffer - but I'm 90% sure that it does.

Easy enough to test. Lets see...I started it, opened a couple of
buffers, typed some text in each, waited a few minutes, and then killed
the process. On restart it prompted me with a dialog asking if I wanted
to restore /Untitled1 and /Untitled2. I said yes, and it worked.

Apparently the files are stored in ~/.kde/share/apps/quanta/backups/,
which gets disclosed in the title bar for the restored files.

I took a look at that directory after the restore, and it was empty.
Good that it cleans up after itself, but...killing the process and
restarting it resulted in the files being lost. That seems like a bug.

I created another new buffer with some text and watched the backup
directory. It took a few minutes for a file to appear. I didn't see any
obvious setting in the preferences to control the autosave frequency.


I'll play around with Quanta some more, but it is striving to be a web
developer's IDE, which gives it a cluttered UI. I'm looking for a fairly
light weight general purpose editor.


Kevin D. Clark wrote:
> How about:
> xemacs -vanilla /tmp/unamed-file-created-on-`date '+%Y-%m-%d-%H-%M-%S'`

Saving the file in /tmp would be a bad idea if you want it to survive a
system crash (reboot), but it's not a bad idea in general. This kind of
commend could be executed from a desktop icon, and should work with just
about any editor (providing it has traditional autosave functionality).
You just need to train yourself to use the icon instead of File|New when
creating new files.

Where it falls short is in the area of housekeeping. A properly
implemented feature integrated into the editor will automatically get
rid of the temporary file when the unnamed buffer gets saved under a
real name. Here you'd have to periodically sift through the temp files
manually, or come up with some heuristics for identifying what's orphaned.


Jerry Feldman wrote:
> [In xemacs and GNU emacs] if you want to create a buffer ^x^f lets
> you...create a buffer with a file name. And at that point, a save file is
> created in the current directory.
> ...if you start vi (eg. vim) and start editing, a .swp file is
> created, since there is no file name associated.

Thanks for the tip, but I'm trying to steer clear of the stone-age
editors for this need. :-)

Though you have to give them credit for having a feature that is sadly
absent from most modern GUI editors.

Crashes are inevitable. Seems silly that we don't design most software
to anticipate that and automatically guard against it.

Someone ought to create a Linux desktop centered around the idea of
crash proofing and state preservation. It wouldn't have to be a whole
new desktop. It could be a patched GNOME, KDE, or whatever, and a suite
of applications that have all been tested that they comply.

  -Tom

--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by John Abreau-18 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, May 22, 2009 at 2:58 AM, Tom Metro <tmetro-blu@...> wrote:

> Jerry Feldman wrote:
>> [In xemacs and GNU emacs] if you want to create a buffer ^x^f lets
>> you...create a buffer with a file name. And at that point, a save file is
>> created in the current directory.
>> ...if you start vi (eg. vim) and start editing, a .swp file is
>> created, since there is no file name associated.
>
> Thanks for the tip, but I'm trying to steer clear of the stone-age
> editors for this need. :-)
>
> Though you have to give them credit for having a feature that is sadly
> absent from most modern GUI editors.
>


Another way to phrase it:  you're trying to steer clear of mature,
robust editors for this need, though you have to give them credit for
being reliable tools rather than shiny new fragile toys.  :-)


--
John Abreau / Executive Director, Boston Linux & Unix
AIM abreauj / JABBER jabr@... / YAHOO abreauj / SKYPE zusa_it_mgr
Email jabr@... / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by Tom Metro-16 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John Abreau wrote:
>> Though you have to give them credit for having a feature that is sadly
>> absent from most modern GUI editors.
>
> Another way to phrase it:  you're trying to steer clear of mature,
> robust editors for this need, though you have to give them credit for
> being reliable tools rather than shiny new fragile toys.  :-)

Exactly. They may not be pretty, but they got the important stuff right
a long time ago.

  -Tom

--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by Randy Cole :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Thanks for the tip, but I'm trying to steer clear of the stone-age
> editors for this need. :-)
>
> Though you have to give them credit for having a feature that is sadly
> absent from most modern GUI editors.
>
> Crashes are inevitable. Seems silly that we don't design most software
> to anticipate that and automatically guard against it.
>
> Someone ought to create a Linux desktop centered around the idea of
> crash proofing and state preservation. It wouldn't have to be a whole
> new desktop. It could be a patched GNOME, KDE, or whatever, and a suite
> of applications that have all been tested that they comply.
>
>   -Tom
>  
Even Microsoft Word provided autorecovery. I have the same need, and
want recovery for gedit and tomboy-notes.

I've been really dissapointed with Linux recovery from hibernate not
working. Didn't it used to work years ago? And how do I get my laptop to
shutdown when it is overheating (when shutdown fails but I've already
stowed the laptop. This has happened twice).

Randy.

_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by Brendan Kidwell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tom Metro-16 wrote:
Any recommendations for a Linux GUI text editor that will automatically
save unnamed buffers?
JEdit has the feature you want. "Autosave untitled buffers".

Re: text editor with auto-save feature

by Tom Metro-16 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Brendan Kidwell wrote:
> Tom Metro wrote:
>> Any recommendations for a Linux GUI text editor that will automatically
>> save unnamed buffers?
>
> JEdit has the feature you want. "Autosave untitled buffers".

I already had JEdit installed, as I evaluated it for suitability as a
programmers editor a while back, but I wasn't keen on the UI appearance
(being written in Java, everything from menus to dialogs are different,
and usually not better, than the GNOME equivalents).

I found the setting your referred to, checked that it was enabled, and
tested it. On restart nothing happened, and I found no evidence that the
buffers were written to disk. I tried again while I monitored file I/O
with lsof, and tried specifying a backup directory, in case that
mattered, but still nothing.

Oh wait, I see it did write #Untitled-1# and #Untitled-2# to the root of
my home directory, but it doesn't detect their presence on restart.
What's worse is if you restart, type some text in the newly created
unnamed buffer, it'll overwrite the existing #Untitled-1# without
warning. (If you're a regular user of this editor, you might want to
submit a bug report on this.)

Thanks for the pointer, but I'll keep looking.

  -Tom

--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: text editor with auto-save feature

by Tom Metro-16 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Kevin D. Clark wrote:
> Tom Metro writes:
>> Any recommendations for a Linux GUI text editor that will automatically
>> save unnamed buffers?
>
> How about:
> xemacs -vanilla /tmp/unamed-file-created-on-`date '+%Y-%m-%d-%H-%M-%S'`

Thanks for the suggestion. This is more or less what I ended up using. A
few wrapper scripts around Gedit, plus using its external tools
interface to invoke the scripts from the menu.

I've documented the workarounds in this Gedit bug that requests the
addition of a proper autosave feature for unnamed buffers:
http://bugzilla.gnome.org/show_bug.cgi?id=485471

  -Tom

--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss