porcupine
porcupine copied to clipboard
Error handling for non-existent files
https://github.com/Akuli/porcupine/blob/a3bb0e8786fa03964175c8a14711f89834f7cf70/porcupine/tabs.py#L703-L707
This message box has several problems:
- I have never clicked "retry" here. It's a useless option. "Save the deleted file" would be more useful, because I once deleted a file accidentally with Git and needed to get out of this message box to get it back.
- Also needs a "Close all deleted files" option in case there are multiple. It's annoying to click through these dialogs when you have switched to a branch that is missing a bunch of files from your previous branch.
- It is possible to press Ctrl+W to close the tab while the message box is open. It causes errors, but Porcupine keeps working as usual.
I have an idea for making this not-annoying. When the file doesn't exist, the text widget is hidden, and instead there's some text explaining what happened and a button to save from text widget to file. When a tab like this is closed with Ctrl+W or the X button, it should close without asking anything.
Besides, I would quite often like to start editing a new file by invoking
$ python -m porcupine file
It's very annoying when Porcupine just whines about the non-existence.