Hello, Clément Pit-Claudel <cpitclau...@gmail.com> writes:
> 1. Set buffer-offer-save to 'always; this guarantees that C-x s will ask > about the edit buffer. > 2. Add an entry to kill-buffer-query-functions. For example, with-editor > (used by magit) does this: > (add-hook 'kill-buffer-query-functions > 'with-editor-kill-buffer-noop nil t) > > With these, we could leave buffer-file-name to nil. > > WDYT? `buffer-offer-save' is already set to a non-nil value. See `org-src-mode-configure-edit-buffer'. > PS: point (1) shares an issue with the original implementation (it > always prompts during save-some-buffers). One fix to this could be to > add a buffer-modification-hook that marks the source buffer as modified > when the edit buffer is modified, and to make change the source buffer's > write-contents-functions to offer to save edit buffers too. Right. Then we might as well use the second solution instead, and leave out both `buffer-file-name' and `buffer-offer-save'. So, would you want to implement it? Regards, -- Nicolas Goaziou 0x80A93738