Hello, ** Nicolas Goaziou [2016-05-15 09:40:03 +0200]: > Hello, > > Vladimir Lomov <lomov...@gmail.com> writes: > >> I have small example that worked before the commit, please see attached >> Org document. > > While it's true this worked before, I don't consider it to be > a regression. There was no guarantee that `save-buffer' would save the > source buffer. In fact, I think instrumenting `save-buffer' is not > a good idea, because it is surprising. Usually, minor modes change > bindings instead of altering functions. > > You can bind `org-edit-src-save' to F2 in this case.
Correct me if I understand you wrong, but you suggest to bind ~F2~ key to ~org-edit-src-save~. But then this will work only in Org buffer, and how about LaTeX mode then. Or I should bind ~F2~ to something like that: (global-set-key [f2] (if (functionp org-edit-src-save) org-edit-src-save save-buffer)) (don't test this code, just idea, may be this code won't work or even there is more elegant code and idea). On second thought, I considered org-src buffer as auxiliary buffer, depending on (main) Org document buffer, so saving org-src buffer should save Org document buffer. I agree that there should be possibility to save org-src buffer and if ~write-buffer~ works it is Ok and it is Ok to call it manually. This is just my thoughts. > > Regards, > > -- > Nicolas Goaziou --- WBR, Vladimir Lomov -- Q: Why does Washington have the most lawyers per capita and New Jersey the most toxic waste dumps? A: God gave New Jersey first choice.