I want to save the current file under a new name without changing the name of the file in focus.
It would be like the export macro except that it 'exports' to a plain text file under a name I choose.
It would be like the 'save as' function except that the file in edit focus retains the name it was opened under.
It would be a "write backup" function. Very nice to have would be a default versioning applied to the filename but there be devils there so...
Currently I must either 'save as' and then reload, or drop out to terminal to copy from there. These solutions do the job but are a break in the work flow.
What exactly is your use-case? To save the _file_ so all the on_save changes (tabs, trailing spaces, newlines, plugin changes) and conversions (BOM, encoding) get done or to save the _buffer_ which is just writing the bytes somewhere to be reloaded later, somewhat like a bulk undo.
The former needs to be done in Geany, and because the whole file writing thing is messy and convoluted would probably (from only limited evaluation) be a fair bit of work.
The latter (and the reload) could easily be done in a plugin, if there is enough demand maybe even the core `saveactions` plugin.
Ah I see. Yes. A lot under the hood.
An export to text would be perfect. Would that be more straightforward.
After more thought I see more of what you're saying. The question of unsaved changes. Sorry I missed that.
What I'm doing is copying the file from disk to a new file. I'd like to be able to make a quick backup *before* I save this file. I could commit to git I know but then recovery /compare etc is more complicated. So I'm not expecting unsaved changes with all the undo etc. I would never ask that of you.
The idea of saving unsaved changes to another file so that I can undo what I have and carry on as if all that never happened. Hm. That would be a wonderful feature to have but I've never had occasion.
Though now that you mention it...
Oh, you want a backup of the existing file pre-save, not the buffer. To do that "somebody" just needs to make a version of https://www.geany.org/manual/current/index.html#backup-copy that saves _before_ save not after.
Oh I see I see... Well yes, of course.
github-comments@lists.geany.org