[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] buffer-file-name in [* Org src *] buffers
From: |
Nicolas Goaziou |
Subject: |
Re: [O] buffer-file-name in [* Org src *] buffers |
Date: |
Wed, 14 Mar 2018 20:57:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Clément Pit-Claudel <address@hidden> 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