Fanael / edit-indirect

Edit regions in separate buffers
99 stars 23 forks source link

Enhance "save-buffer" behavior #8

Closed ryanprior closed 2 years ago

ryanprior commented 6 years ago

When I edit in an indirect buffer and try to save-buffer I get prompted for a file name to save to, which reminds me that what I really wanted to do is to C-c '.

However, is anybody really saving their indirect buffers to disk? It seems to me like the more expected and useful behavior would be to replace the code block we're indirect-editing and mark the indirect buffer as saved, but not close it.

If what you really want is to write to disk, you should write-file instead of save-buffer. Does that make sense?

Flupp commented 2 years ago

Isn’t this fixed by de645d8144e8a08f039a9c88185121ec81d957ef?

wbolster commented 2 years ago

seems so indeed, but ideally it should be using a [remap] binding instead.

Fanael commented 2 years ago

@wbolster That's a good point, I simply forgot remap bindings existed. Should be fixed now.

ryanprior commented 2 years ago

Just tried this the other day, works great! Thank you @dakra & @Fanael this package is a long time favorite!