From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Miele Subject: [PATCH] Respect buffer-local value of `org-edit-src-content-indentation' Date: Mon, 14 Oct 2019 23:30:17 +0000 Message-ID: <87eezelxbq.fsf@gmail.com> Reply-To: sebastian.miele@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48003) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK9nA-0003MF-Pu for emacs-orgmode@gnu.org; Mon, 14 Oct 2019 19:30:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iK9n9-0003pp-SS for emacs-orgmode@gnu.org; Mon, 14 Oct 2019 19:30:20 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:44271) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iK9n9-0003pG-Mk for emacs-orgmode@gnu.org; Mon, 14 Oct 2019 19:30:19 -0400 Received: by mail-wr1-x443.google.com with SMTP id z9so21509831wrl.11 for ; Mon, 14 Oct 2019 16:30:19 -0700 (PDT) Received: from tisch ([2a02:908:175c:4260:5ffc:7882:6024:ca5b]) by smtp.gmail.com with ESMTPSA id z9sm154287wrv.1.2019.10.14.16.30.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 16:30:18 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org * 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