1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

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

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)