emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Respect buffer-local value of `org-edit-src-content-indentation'
@ 2019-10-14 23:30 Sebastian Miele
  2019-10-16  0:50 ` Adam Porter
  2020-02-12 17:51 ` Bastien
  0 siblings, 2 replies; 14+ messages in thread
From: Sebastian Miele @ 2019-10-14 23:30 UTC (permalink / raw)
  To: emacs-orgmode

* 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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-02-14 10:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 23:30 [PATCH] Respect buffer-local value of `org-edit-src-content-indentation' Sebastian Miele
2019-10-16  0:50 ` Adam Porter
2019-10-17  0:34   ` Sebastian Miele
2019-11-03 21:24     ` Nicolas Goaziou
2019-11-03 22:25       ` Sebastian Miele
2019-11-19 10:39         ` Nicolas Goaziou
2019-11-20  6:12           ` Sebastian Miele
2019-11-20 21:30             ` Nicolas Goaziou
2020-02-12 17:51 ` Bastien
2020-02-12 18:35   ` Sebastian Miele
2020-02-12 19:10     ` Bastien
2020-02-12 19:28       ` Sebastian Miele
2020-02-13 19:31         ` Sebastian Miele
2020-02-14 10:02           ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).