Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File is not stored on disk upon saving in TextMate #87

Open
besi opened this issue Feb 3, 2024 · 2 comments
Open

File is not stored on disk upon saving in TextMate #87

besi opened this issue Feb 3, 2024 · 2 comments
Labels

Comments

@besi
Copy link

besi commented Feb 3, 2024

Hy there I enjoy using rmate a lot.

Actual behaviour

I did run into an issue today:

  1. I want to create a new script

     rmate /home/user/bin/myscript.sh
    
  2. Rmate opens and I merrily edit the script and test code snippets parallel in a bash line by line

  3. I save in TextMate

  4. I think all went well, until I realise much later that there was actually no file being created in the desired path. I realise my mistake that there was no folder to begin with where rmate could have saved the file in.

My script was quite short, but this behaviour might turn out to be veeery annoying if I would spend hours working on a file, saving every now and then, thinking the file is actually saved on disk and then realising that all my edits go up in a puff of "/dev/null smoke".

Expected Behaviour

I suggest that rmate will abort the process if the folder is not present. There could also be an option like with mkdir -p /home/user/some/new/folders/that/are/created.
I also do not have a problem with rmate creating folders for me (maybe printing out that it did so).

Please note that for example nano does a good job warning the user that the folder does not exist:

Screenshot 2024-02-03 at 10 41 28
@besi
Copy link
Author

besi commented Feb 3, 2024

I see that rmate does this already if the user does not have write permission for a file:

File /etc/wpa_supplicant/wpa_supplicant.conf is not writable! Use -f to open anyway.

@aurora
Copy link
Owner

aurora commented Feb 14, 2024

Hi, thanks for your bug-report - i'll have a look into this!

@aurora aurora added the bug label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants