From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gF5pOqzbp2RzBwAASxT56A (envelope-from ) for ; Fri, 07 Jul 2023 11:32:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cM1WOazbp2SgsQAAG6o9tA (envelope-from ) for ; Fri, 07 Jul 2023 11:32:28 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 97FC5E2E2 for ; Fri, 7 Jul 2023 11:32:28 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=dATdRyPm; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688722348; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZmMLp53I3VtMB7DaPNBcfgLpoyX75Xfg9f2YzTI0Qf0=; b=tBn0F1gLKtv+w9kZ0K5utIkXTQJYMHjcTOt8ICpew+6byT7/aEgSE/11V3lZERaIVfRB+T ve9Y+wVXTm/NCbaSUN0W8lSKpUBXc4Z3Gq3WL+b79fVH9DtwkZi/yNMd1bl0kXj7mVbAV6 9depx7HXvLu1HQWrZREpTcYyH+Atn9p+gyggn3kl+bHfxJmDFcDJoLcdfZN/ES3OtE4mic JnKkiK77JVE3jT+yBrT6+C1CRZgX9sWMMvxjQS4P5h1QG5veRbZupS2v1YyZ2tt0lfT+vw sqJkXUk+MNUFG2o1bjowjYq7B+cmjl+gkHq/UTtMovrwamMpKM7B12kojv7ZXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=dATdRyPm; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688722348; a=rsa-sha256; cv=none; b=ob7RRWHwS/qLunwUTjgkSvuY1VeqGIsOSJ+4PUNAOLByz/PG3pOrpB5rQ+lMhaihj/wxSl pRN6CfcpCGbzx828ErfQega4END2STOks4kTjMfCHRnRzRk43wMBvXDMUhfFB2pB04bGQn uQEiu5/hwLz8sf+1GvuphGg2dHTWJLPX3iiXN93mOq7Os6W2QDd8RAvuGFETz5231OP/0H MHTZIloaZjO6YbBPSN0ZFJeWrzFYR1jkxBOOQWT8Ye2fGr0sm9XVByM5Lc1r2RZXy8XluJ Fqx9KIvtNkfJcAhdcodeTGQuDhiRSlE+pAvuXBneIlKanpkXdYM1t9+it/2jNg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHhoM-0004vR-6N; Fri, 07 Jul 2023 05:31:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHhoK-0004qO-RZ for emacs-orgmode@gnu.org; Fri, 07 Jul 2023 05:31:32 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHhoI-0000n7-OS for emacs-orgmode@gnu.org; Fri, 07 Jul 2023 05:31:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DA824240104 for ; Fri, 7 Jul 2023 11:31:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688722288; bh=tBwJaYQ3GtdZTtIwgKU5V3sXcqa0ITZp2TC5K8k0Lfs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=dATdRyPmJLSFJoz2f/48jVki0kf8PioSafzUgdWXooPjvrHpCTmXPnGJq6/WmpLLB zuYaPFCbCOya2rIDWc0SXDPZf19mLghxR0pV4oxJoSP8IYl5kFJdgEGcHTvBudo6Vk weR0YRY/4a9/Eh7V0LLFL/ShexzYs1ITvW2Z7rZLMnIoPbUHfeF7qdKKYLbXYoSmcl tfVvATWDW2mpMjt9zDPRGLAztTjc52WwszJnxMuAn9gTQuE7Ux3wNnpkc2Z2A6YxVH gR+bMOTiNervtJsr7PdIrlr/64J8fz54lCdeoIKgPjANOK4l2tH6axmnQ4IpYlv2xd bv3++Srdf8zNg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qy7Sb6xwlz9rxM; Fri, 7 Jul 2023 11:31:27 +0200 (CEST) From: Ihor Radchenko To: sebastien.miquel@posteo.eu Cc: emacs-orgmode@gnu.org, wolf Subject: [BUG] org-list-struct-apply-struct overrides src block indentation (was: [BUG] Source block indentation does not work properly for yaml-mode [9.6.6 ( @ /home/user/.emacs.d/elpa/org-9.6.6/)]) In-Reply-To: References: <87zg4vsof6.fsf@localhost> <37d86bbf-c0e2-6337-efc2-cdf63dbf4580@posteo.eu> <87sfamsb7m.fsf@localhost> <274bbd61-790d-8e19-d3a0-0793126c3bb0@posteo.eu> <87cz1itp8k.fsf@localhost> <1a97917c-bbab-4d7f-b629-0c84807448f2@posteo.eu> <87a5wmtmug.fsf@localhost> <87o7l0vt5z.fsf@localhost> <1d145455-2047-2b7a-8222-8eadc2529c8c@posteo.eu> <87edltqiox.fsf@localhost> <87sfa7opo9.fsf@localhost> <4eb9a5ad-2d91-15ae-ccd9-894c0303cca2@posteo.eu> <874jml8ggm.fsf@localhost> <8d6dd95e-5bce-44c3-638a-52351b69cc66@posteo.eu> <87cz19gn6i.fsf@localhost> <40b8bf4b-2c1c-ad5b-7109-e0684973bf81@posteo.eu> <87a5wcez7e.fsf@localhost> Date: Fri, 07 Jul 2023 09:31:28 +0000 Message-ID: <87cz14xe33.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -6.34 X-Spam-Score: -6.34 X-Migadu-Queue-Id: 97FC5E2E2 X-TUID: U5NuvXcgBDgS Using a similar example, another indentation bug has been revealed: 1. emacs -Q 2. Create an Org file with the following contents: - 1 - 2 - 3 - 4 - 5 #+begin_src yaml a: b: c: d: #+end_src Everything indented using spaces, including "d:" that uses 8 spaces, which should remain spaces since yaml-mode uses spaces for indentation. 3. M-x whitespace-mode 4. Move point to item 5 and press M- 3 times 5. Observe "d:" indented using two tabs with all the spaces replaced by tabs. The cause is the following line in `org-list-struct-apply-struct' [[file:~/Git/org-mode/lisp/org-list.el::indent-line-to (+ (org-current-text-indentation) delta)))]] It calls `indent-line-to' that replaces spaces with tabs according to current value of indent-tabs-mode in Org buffer. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at