From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2BFXMjonqWQb1AAASxT56A (envelope-from ) for ; Sat, 08 Jul 2023 11:07:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AJ4HMjonqWQbhAAAauVa8A (envelope-from ) for ; Sat, 08 Jul 2023 11:07:06 +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 369AC5E239 for ; Sat, 8 Jul 2023 11:07:06 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=U07flYQf; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688807226; 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: 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=7gXoCocN6G4hBho+mixy4bTaY/EVv8QkIlUWpA/O52U=; b=QntmDsJfvkmubl7Ym0QOAxymxafwAkXtu4k6tV2lutBwbP8VEZg57ut2EcKya+q4fFj9BN Gjtq4GmsxUOMqKpz5ZYirspy4wACdpMoGy4UlPAsN4H8a1X7bVoyvLGSpmm6tJp17lxNbX azzbvHo0YKIxaXPpR4XRJCRqq7MStRquFoG0O2dKJ4Dd0Gc/eUoPv15o4tiMMaZuSMkY+d lnwFib7uP0l22Ny5etcjPQbHIewldtlP9tPypBsJQBmgvrwncN3EXCT0JoqWn7sThaJneL cOWU9zdY+NYi1Y6UeBbh0o2F6a3CgBC396omgv1t9UGswCASNzkmyaf8+qmx/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=U07flYQf; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688807226; a=rsa-sha256; cv=none; b=RUDTITUtLPx/nb7ZRGE/3D3FijP3HLPOQ3tYg7GxZEijginVE/JhaAIMuJbkIn2MFVMMul lWDO7zTErL1S5PGAIjmG5XhBgsfHqgrXQfQuVA3dnVtpZLMEtAhgTGu8Ym0IeG1/Le9Vht jlT8f2qsIc3u0pjNlbiRGCTnYK5EtAsKXPurLHh0PpZs6nsR0rU9w9aRxQc3nxsYZ1TKy/ cafsqzAx85IHlkNCu2WSI8biNbIlCc9O9z9liwxD64aHRUPH9IGXD9ITm7izEARIggHbI4 s1nLLFnddx5EggsZSVEBGAAIF70EdSV6UBySALWP068Q0ap0izlwa3atPgEkAA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qI3tJ-0004vg-Ka; Sat, 08 Jul 2023 05:06:10 -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 1qI3tH-0004vS-EC for emacs-orgmode@gnu.org; Sat, 08 Jul 2023 05:06:07 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qI3tF-0002RF-3w for emacs-orgmode@gnu.org; Sat, 08 Jul 2023 05:06:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0E67F240027 for ; Sat, 8 Jul 2023 11:06:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688807162; bh=/qEAAFMchEhgV44ySz5uVVWmy/Ir9b9JthIVfIybyEs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=U07flYQfEou4aw25Hk6UklxHAAkeAZOTbN0Pdrl7yPU2KQOkxtKI2b/GXLGaBXit8 GXshM6T88VOE5AMcli3qAE5ndakquXsE23a8c3CeJLZjVIQSSQ1HaSsng3NwSyCyFd qdGO9bqYnWZru6ErDKxVoqVk51tmBgk7X4jfiL0X8/bYXgWfZiVPWs5rAssKmJpMtv v3l0k1PmbB/NYPot+xD34xBbssRvIQWYV5Ss839rXjM/avFtLjpDCLam/0YtBgRugV gxyGbEqhVaEF9lEtm3Ibrjr1ai/ONnlwawWZ9tdBndXCF1nGFBUHhpLHmxsHLcwTlr DQ1j1KbZ78S9Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qykrn1fPMz9rxB; Sat, 8 Jul 2023 11:06:01 +0200 (CEST) From: Ihor Radchenko To: sebastien.miquel@posteo.eu Cc: emacs-orgmode@gnu.org 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/)]) In-Reply-To: <01d251e9-94ab-4a2e-f1c2-57a2b2428128@posteo.eu> References: <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> <01d251e9-94ab-4a2e-f1c2-57a2b2428128@posteo.eu> Date: Sat, 08 Jul 2023 09:06:04 +0000 Message-ID: <87o7kmai2r.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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-Spam-Score: -7.72 X-Migadu-Queue-Id: 369AC5E239 X-Migadu-Spam-Score: -7.72 X-Migadu-Scanner: mx0.migadu.com X-TUID: Y+C+zO/kTzVk S=C3=A9bastien Miquel writes: > 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. Yup. Sounds reasonable. Although we should not use it blindly; just where necessary. Checking for element at point will create overheads. > This use case is > uncommon and not really compatible with `org-src-preserve-indentation` > though. May you please elaborate? > 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`. I recall struggling with it and ending up with adding spaces manually to the first src line and then using indent-region. `indent-line-function' technically allows force indent, if `tab-always-indent' is set to t, but we have bound to org-cycle, which will take precedence when at #+begin_src. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at