16

I use Kate for coding and note-taking. Sometimes it crashes - often when I've got a lot open. Unsaved 'real' documents (eg, ones backed by files, that have been saved at some point) usually have a backup/autosave type recovery file, that more-or-less works. Unfortunately, I've gotten in the habit of using untitled buffers (eg, pressing Ctrln in Kate) to store temporary notes.

Kate just crashed and I lost half a dozen of these. Does Kate store backups for 'new' files anywhere? I checked, ~/.kde/share/apps/kate/ and didn't see anything obvious ...

kate-editor 3.8.5
KDE 4.8.5
Ubuntu 12.04 (Don't remember if Kubuntu or Ubuntu + KDE, in case that makes a difference)
8
  • What made you think it's possible to recover?
    – daisy
    Mar 25, 2013 at 8:09
  • How do I not have 'tumbleweed' for this? (I'd prefer an answer, just sayin ....)
    – hunter2
    May 29, 2013 at 7:48
  • Best place to ask for this feature is kde's bugzilla. Jun 6, 2013 at 21:12
  • Maybe, or Kate's or (K)Ubuntu's. Unless you had a specific link?
    – hunter2
    Jun 7, 2013 at 5:00
  • 1
    Yeah, guess I didn't catch what you meant - I was asking if this is an extant feature, not asking for it to be added. And, although it seems like it would be an easy one to add (the buffer is already somewhere, right?), for my purposes I think breaking a dumb habit is easier than submitting a feature request on this one.
    – hunter2
    Jul 1, 2013 at 9:49

3 Answers 3

14

Being one of the Kate Developers, I can explain the workflow like this:

When Kate or the system crashes, you loose all text buffers that were never saved. However, if you are working on a text file (that exists as file on disk), a swap file is created next to the file, called .filename.kate-swp. Now, if Kate starts again, Kate searches for these swap files. If found it replicates all edit actions that were recorded in this swap file, and your data is fully restored.

Rule of thumb: Always (and I repeat: alawys) work with files, not unsaved text buffers. That is good practice with everything you do on a Computer.

4
  • 2
    Accepting this A, b/c I think you're confirming that I can not do what I asked (that I lose "all text buffers that were never saved"). Yes, it was a bad habit/practice, which I've mostly stopped doing.
    – hunter2
    Jul 19, 2014 at 15:10
  • 4
    “Rule of thumb: Always (and I repeat: alawys) work with files, not unsaved text buffers” — sorry, but I can't agree with that. You claim that features of specific software (or even bugs of specific software) should define patterns of a user's behavior. But in fact it should go the opposite way: patterns of the users' behavior should be taken into account when designing software.
    – sasha
    Oct 19, 2020 at 16:12
  • 1
    Agreed, but currently fact is no one implemented this. We'd happily accept a patch, though! :)
    – dhaumann
    Oct 20, 2020 at 19:57
  • 1
    I second @sasha. This could be a feature request. I note that Notepad++ does this, and I found it most useful. May 28, 2021 at 9:08
0

Without knowing anything about Kate in particular, I found [1] for vim. Both being unix programs, could there be something similar there?

(Just found similar unnamed file usage of another user.)

My sources:

[1]https://superuser.com/questions/195894/where-does-vim-gvim-macvim-keep-swap-files-for-unsaved-unnamed-buffers

3
  • Yes, there could, and that's what I am/was hoping for. But they are entirely different programs, and the answers there do not seem to apply here. I tried to test what it said there (in particular, I hadn't seen "~/tmp/" before), with no luck. If you'd like, add more detail ... (Is there a specific reason to think one of those dirs works (and I'm blind - quite possible), or that KATE has a recovery feature I missed?)
    – hunter2
    Jul 26, 2013 at 3:42
  • 'Of course' I no longer have the original situation, nor am I in a hurry to replicate it. This time, my test was to create new buffers, put some gibberish in them, and check the directories mentioned. // (Although it would always be good to have the answer, the original situation was a few months ago, now, and I've tried to simply not let it happen again - at least take notes in a file that exists in a known location.)
    – hunter2
    Jul 26, 2013 at 3:47
  • Unfortunately, I don't have more knowledge on these programs. I just happened to find that post that somehow related. Bad luck that it did not serve the answer still.
    – mico
    Jul 26, 2013 at 4:42
0

first of all make all files visible (I mean hidden files) and try to search in the same dir files with "~" or like that.

1
  • Perhaps you could explain how?
    – slm
    Jan 7, 2014 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.