femto icon indicating copy to clipboard operation
femto copied to clipboard

Cannot save file with missing parent directories

Open jorge-leon opened this issue 1 year ago • 1 comments

(find-file path/filename) will happly create a buffer. But when the parent directory path does not exists, the buffer cannot be saved.

Emacs would ask the user, if she wants to create the directory and try to create it if the user confirms.

jorge-leon avatar Nov 16 '23 20:11 jorge-leon

GNU Emacs is the standard by which all Emacsen should be judged. But we have to bear in mind that femto is 6K lines of code and GNU Emacs is 358K lines of code. There is no way femto will ever compete with GNU Emacs and it is not intended to either.

To fix this we would need a function to create a path and we could have /dir/dir/dir/dir/filename The prompting in GNU Emacs is done via an elisp script. In femto the file load and save are quite basic and expect the path to already exist.

You can still use C-X C-W to bring up the Save As dialogue in the minibuffer.

If you have a simple fix I will take it. But suspect this is not so easy to solve without quite a bit if thought.

hughbarney avatar Nov 18 '23 20:11 hughbarney