* lisp/org-src.el (org-src--contents-for-write-back): Use the
potentially buffer-local value of `org-edit-src-content-indentation'
from the source buffer instead of that from the editing buffer.
---
 lisp/org-src.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 9134d5b5d..b7fe4c0fa 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -422,7 +422,8 @@ Assume point is in the corresponding edit buffer."
         (if org-src--preserve-indentation 0
           (+ (or org-src--block-indentation 0)
              (if (memq org-src--source-type '(example-block src-block))
-                 org-edit-src-content-indentation
+                 (with-current-buffer (marker-buffer org-src--beg-marker)
+                   org-edit-src-content-indentation)
                0))))
        (use-tabs? (and (> org-src--tab-width 0) t))
        (source-tab-width org-src--tab-width)
-- 
2.23.0


Reply via email to