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 MEr+BC7AnmTYlQAASxT56A (envelope-from ) for ; Fri, 30 Jun 2023 13:44:46 +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 CPPiAy7AnmTa7wAAG6o9tA (envelope-from ) for ; Fri, 30 Jun 2023 13:44:46 +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 55906D5D8 for ; Fri, 30 Jun 2023 13:44:45 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=f0gkJSXl; 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=1688125485; a=rsa-sha256; cv=none; b=ijJ1jVbrb1ahiOsGCEnkYCj7I7rkIf8fJUB4K7zfT33w+FcZJ41YuO+mHnMtpRVHIOD6a9 dggrQsprtsid22mm7p98UVpc0vN+ofzuX3lRQQx5sdEKDyKtklBsCfkuLQp57NcQlIbllv Z8DhmDIKhbE/bnhKYoaXbNZgrxecqbGU/0jN9vd8V+64lLBZdfYEHOaoe1ATr53CQf1rO9 zpUX/TQIr4sSfGJPbh26Ms2ViJPOHm/RiRYfpAN0/WXvZChsvB4fbSeD4cSD6zq5wL/sY4 iARauwBo/ErR3OhpG/hn4jOqIG+EJJMU/zzafZFs9m5smJWFutbzVaokyldKsA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=f0gkJSXl; 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=1688125485; 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=RzPGUzX/5w9fgMD0DZ1mpQYtWEpalCHNrp0HlWOfIhk=; b=GglKK57R/0Xf7oiGzJRBpik4GF3Kp6EEaJ6xsMo0F3HHwW66uFa/7KjgKBSNE/tm4T+yJm 7ifVM7znghkumaAz0Ivhm2J9cK5y8vcBbAljeSekdLsa9m0U2jVX90uDlj3VwSBB8NFqN3 82GNp/iFEl/2y4DNaTm87UmP93GE7/8bQBAD7Kp1+s93TSpg8ZXZgulXLmU5N0u6khI0cA NUeI1E8AC6pFMDJ2AbUePQCtDwHSQcXkjRD69ojj4SN5rB5HUqKhqMu7dJM98/i0+eThNu PzNDvi5loEOEePKCm3v6dvFeYLbIZxjxy4/RbAoT4qloprm1z1sTkojBrEkw3g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFCXO-00059r-7K; Fri, 30 Jun 2023 07:43:42 -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 1qFCXL-00059C-Ul for emacs-orgmode@gnu.org; Fri, 30 Jun 2023 07:43:40 -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 1qFCXI-0003u9-24 for emacs-orgmode@gnu.org; Fri, 30 Jun 2023 07:43:39 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 75C73240028 for ; Fri, 30 Jun 2023 13:43:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688125412; bh=JKv4g+PX6JmVJ4f+tCeg63PbSnlDGJwBaD6nzTRAjtA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=f0gkJSXlzrdr8YqjXDAE7nQeaoPqwbrzX2QSfAGNC/7VjcrG2MudElc2V7EayLRbP pxSf/+CKw2dXkKgA24ZFSI8S4umFRpDo5H2cdWFSEvZ3t8iw43ZypboA1jqEbrsu7z QrP7suDK8PNUGqWi6TlqM5KLHXvBUCcENJlKUUnBtzZRAdm8AtoDN5dDFLgiBwg8CO RdGsSi4wOVxrWa37rniUPQPiPDTLbm1RC2WglRu17bM9a5CC+Q8iiSVymvByvXNuOW nfdFjIyULrkLhfMFLNZsXTzOckG7G1v1IHzAFrn7Nh9cbx5p1q0o7t9wF/e5NX3z9E BqtKazGvLdOlA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QstkC3B4Lz9rxB; Fri, 30 Jun 2023 13:43:31 +0200 (CEST) From: Ihor Radchenko To: sebastien.miquel@posteo.eu Cc: wolf , emacs-orgmode@gnu.org Subject: Re: [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: <1d145455-2047-2b7a-8222-8eadc2529c8c@posteo.eu> References: <87ttva8chx.fsf@localhost> <8d8642c9-ced3-b254-0f49-f7b9c06311ff@posteo.eu> <87352p9g13.fsf@localhost> <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> Date: Fri, 30 Jun 2023 11:43:26 +0000 Message-ID: <87edltqiox.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-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.23 X-Migadu-Queue-Id: 55906D5D8 X-Spam-Score: -6.23 X-TUID: UjRDh2N5Hl4d S=C3=A9bastien Miquel writes: > + ;; Trim contents: `org-src--contents-for-write-back' may have > + ;; added indentation at the beginning, which we remove. May you also mention that we remove the indentation to avoid adding spaces to latex fragments in the middle of a paragraph? >>> + (when (or (not (eolp)) ; not an empty line >>> + ;; If the current line is empty, we may >>> + ;; want to indent it. >>> + (and (eq (point) (marker-position marker)) >>> preserve-blank-line)) >> Do we still need this dance with special case for current line? > > Yes. This is fragile, but what it does is, if the line from which the > original edit was called was blank and not empty, and the line from > which the edit is ended is empty, we assume these two lines are the > same, and we add the common block indentation to this empty line. > This, and the pre-indentation in =3Dorg-indent-line=3D, make `TAB` work > to indent an empty line. But why do we need to avoid indenting empty lines? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at