From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IIeOBvUWqGQVTAAASxT56A (envelope-from ) for ; Fri, 07 Jul 2023 15:45:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oAAdBvUWqGQ6ewEAauVa8A (envelope-from ) for ; Fri, 07 Jul 2023 15:45:25 +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 B19573CB2F for ; Fri, 7 Jul 2023 15:45:24 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHlkm-0002ZZ-Hn; Fri, 07 Jul 2023 09:44:08 -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 1qHlkh-0002Z7-ER for emacs-orgmode@gnu.org; Fri, 07 Jul 2023 09:44:03 -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 1qHlkf-00061m-Fc for emacs-orgmode@gnu.org; Fri, 07 Jul 2023 09:44:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 00C5F240101 for ; Fri, 7 Jul 2023 15:43:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.eu; s=2017; t=1688737439; bh=PBiuaIxnfY97zzwETkxqNd5uegtjxhKXLSx7VdPKKmM=; h=Message-ID:Date:MIME-Version:Reply-To:Subject:To:Cc:From: Content-Transfer-Encoding:From; b=Ssj88AHSRUfmDqD41lzB38spXitprOmP+oraVNdCYbcbemZWpyt0+mhhl2zE/7hnP YtC1JbSIes1LMffNhSqxaB+nxoE+SIvlQ9JRqrPxQDpW+3hIEyHBjCmRj01ZYdxK8R ftRE26pEDndcCPk8isX0AnoZugiYMNePXpuodegV13WMmGEmpwEbt6928Zh4pz6Jfx TfB3ry1OpatVWrbSpIejVv9e9YiLWr4nCsN5VcpperxnGcGwNVMrA8B7LhatonNcQH YT8aQm2BkeXgXuqNMbFiAQHh6KbqJ8jheHecek1T/mAZmrlu7Ea+xztOYsGZ7pbELR OPAX77PfEApPQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QyF3y3NFRz9rxN; Fri, 7 Jul 2023 15:43:58 +0200 (CEST) Message-ID: <01d251e9-94ab-4a2e-f1c2-57a2b2428128@posteo.eu> Date: Fri, 7 Jul 2023 13:43:57 +0000 MIME-Version: 1.0 Subject: Re: [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/)]) Content-Language: fr To: Ihor Radchenko Cc: emacs-orgmode@gnu.org 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> <87cz14xe33.fsf@localhost> From: =?UTF-8?Q?S=c3=a9bastien_Miquel?= In-Reply-To: <87cz14xe33.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=sebastien.miquel@posteo.eu; 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: , Reply-To: sebastien.miquel@posteo.eu 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688737524; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tzQPaEEn1o8Y82b+MarTpp71oGEADtbFgovFDP7MB38=; b=Im4tVCR6NphkfLrsfJugyAZAE/EYAfllhFpO7I5T4gpBvNymqkbi5K0JxNxHCW+mVf8G0O Bpo1wIya2uqofgh2O7YjuV31wQW2OCatpYxTuQISAIrMF6BVtt0R/KJmZRA8YChPRRpFw+ dg4c7I5Pev8CkqmUOESm+lMPwaItLli/CDKO03TynbUrJ8T5JSBzYge7aX0UzLmzBJrD3q 4j9ZBRKgXTvrje+yFNWgSjhn8IScozD9j8MkmkvseQJIMIlJVQarPwh0Q0XG3ZlXlsmZwf TtZc2iE9gRWLuiJvsha5lf/hI3Oqzdrbt5qTh3pyFD1yWrKsmMYOt7Vz4RzGKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=Ssj88AHS; dmarc=pass (policy=none) header.from=posteo.eu; 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=1688737524; a=rsa-sha256; cv=none; b=AgV6GXrQ9WQHV59qP4lx5dTLbzvyFiGwYAVFMlFPs/Sk44nSYGK1nBSo1gus9XlulnIgzG q7ddxRytyQUX9gzkWbv89F69Ao/wVm8AU0EnjRR5OaiueRzGOW37zgeJc7ZKzuD15mSgNm Uz+9LaaCZ/7zBrUDaIkIipZmDDLR7CDsrfYcwcO6wZooMFnXXpsxVUs10K0vyITLD1aMDa XoQeDHVW1VZ0Y1v6wL2Q8bCEUDAKDcLF2FthyNicNSclyPxSIRU0bwHnsyoNeJcfQwA86Q gN5ohBOUAuFU3IP5DC1izaa2EVvJiftaFrrcarYAdm3nxzq5m4PTb0kWBoussA== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -5.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=Ssj88AHS; dmarc=pass (policy=none) header.from=posteo.eu; 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" X-Migadu-Queue-Id: B19573CB2F X-Spam-Score: -5.13 X-TUID: 3ey72iw7gUyj Ihor Radchenko writes: > 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. There are a few other instances of `indent-line-to` in the code. I guess the right fix is to un-obsolete `org-indent-line-to`, use it and make a special case if point is in a src block. This use case is uncommon and not really compatible with `org-src-preserve-indentation` though. Somewhat more common possibility: say one has a src block at 0 indentation, and wants to make it part of an org list. Is there any proper org way to do this ? I can use `indent-rigidly`, but again, this might break an org-src indentation. No easy fix to this beside providing a simple org version of `indent-rigidly`. The issues above do not seem too bad. They are uncommon, and an indent-region call should fix the indentation. -- Sébastien Miquel