org-src: Allow writing remote edit buffers to file

* lisp/org-src.el (org-src-mode-configure-edit-buffer): Do not treat
  each save as meant to save source buffer.

Reported-by: David Dynerman <david@block-party.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/106998>
This commit is contained in:
Nicolas Goaziou 2016-05-11 23:18:38 +02:00
parent 702bab9ee2
commit 1c923b9ae7
1 changed files with 1 additions and 6 deletions

View File

@ -613,12 +613,7 @@ See also `org-src-mode-hook'."
(setq buffer-offer-save t)
(setq buffer-file-name
(concat (buffer-file-name (marker-buffer org-src--beg-marker))
"[" (buffer-name) "]"))
(if (featurep 'xemacs)
(progn
(make-variable-buffer-local 'write-contents-hooks) ; needed only for 21.4
(setq write-contents-hooks '(org-edit-src-save)))
(setq write-contents-functions '(org-edit-src-save))))
"[" (buffer-name) "]")))
(setq buffer-read-only t))))
(org-add-hook 'org-src-mode-hook #'org-src-mode-configure-edit-buffer)