Menu

#501 Auto-save untitled buffers

none
closed-accepted
nobody
None
5
2017-05-30
2015-08-12
No

Hi,

I'm missing a feature from Notepad++/SublimeText that I find very useful. In those editors when you create a new buffer, enter text but do not save to file, when you exit the editor the buffer is saved automatically somewhere, and when you open the editor again, it is automatically reloaded.

This is incredibly useful for "persistent scratch buffers".

Is this something that jEdit already supports (5.2) and I just can't find it, or is it a feature that could be added?

Maarten

Discussion

  • Maarten Boekhold

    I'm willing to have a look at implementing this myself, but I could use some pointers to get started. I did some testing, and had an initial look at the source code:

    • Currently auto-save is done in whatever directory the file browser is. That's a problem if you use remote filesystems. IMO auto-save (eg the #Untitled-1# files) should be located in a central 'autosave' directory on the local filesystem.
    • On exit of jEdit, it asks if you want to save the untitled buffers. There's no way to tell it "no, I don't want to save as real file but keep the autosave file".

    Both of these should be easy to solve, but probably requires some discussion as it would change the existing behavior of jEdit.

     
  • Hrotkó Gábor

    Hrotkó Gábor - 2017-02-17
     
  • Alan Ezust

    Alan Ezust - 2017-05-30
    • status: open --> closed-accepted
     
  • Alan Ezust

    Alan Ezust - 2017-05-30

    Committed to jEdit 5.5pre1

     

Log in to post a comment.