From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8DbeCYR1rWQtpgAASxT56A (envelope-from ) for ; Tue, 11 Jul 2023 17:30:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MFt7CIR1rWStwgAAG6o9tA (envelope-from ) for ; Tue, 11 Jul 2023 17:30:12 +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 F336243A9F for ; Tue, 11 Jul 2023 17:30:11 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CPzCLqv2; 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=1689089412; 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=7+lfuASUcNGLuBjEen+o+QgFkfGMiwZ/KqWmiAGDHg0=; b=TNFiJ277RF2bY+4Gg/booCOSQT9w7qprOCro4AyQxUk7fNrZUwRELfIu+HwmKcj0CLaCI0 e+Y4RzUQrfBb8K36cqZtcYCNE5lInfs4AW1Cz3whpDrE5e+RGhKIHy5hs08zSqIGS8tzyr 13zJ9k08Pq3RmoNjreVhGz4EUV6W53FOXYg/EXdNlHkRyKO3Ei9X7Ab5kxFa9E+vZtl3rY UBXa/TO0jNsoVA9sfwfY2TdgND8aL/wIjozy60GnB5Z8ApPpv6DveP3DGIMeM5ILANSHk8 ne8aWH64eeqMGUkJvBIyXgNT03iEM9W6lkvJxX4sUHl5fSnAFUYF09G6zQBYVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CPzCLqv2; 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=1689089412; a=rsa-sha256; cv=none; b=B1j/ooiJcGtC5SECS4d46UFPV9hLwSPCWB4zXzpVPsJSPmZqqVEyGVJ7bpyCdhQBniF+gT WK+pcPVvxYJfrxQYBZco9sqs7lMNWyKpIj5Tv45Wh8xH6wl1GPgJDr6PfE7Q8z11x8Pe+c qc+/rnx7F8xaevKlXpHicYairqGxXvZnEQQbM4elN1DX8kl7GH2Tr62uSAp67v3RybRexj HoGXrTW6/B6dsBUL1FsBGbMXsMhhQLTYS7otOAAsUV2E8qMPgfVw4CQk85496RFQ3uX8Dr tZy6e4sg/aC7sTs7fZzXnY2Z6Ijl8noL6DSy4pCWrTC6G9K117nbPJ50gZTlSQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJFIh-0004Fh-Vc; Tue, 11 Jul 2023 11:29:15 -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 1qJFIg-0004FZ-0x for emacs-orgmode@gnu.org; Tue, 11 Jul 2023 11:29:14 -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 1qJFIa-0004BP-OT for emacs-orgmode@gnu.org; Tue, 11 Jul 2023 11:29:13 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0C87E240104 for ; Tue, 11 Jul 2023 17:29:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689089344; bh=U1oulTGysu2DJYTcws+nkONkuSXjQ8HpHGsrCdnb8Qs=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Disposition:From; b=CPzCLqv2jGKxpsm1np52dS5DTSi8vkLNeiv7/wUYpXbznI3ONUF8vbaCfq7Bx0tTV ArK0ow6Sv79EOxpP++SCxmLnAKQJLM3Qod/Ms70uGFwlo+Jf06OcghbmktNJfZeEOO txguPYgYsqkJsTrukJx1hhQQSVAzGal70BXC2eu57XjUtDPcFzOrR9Q8Flf2Fy6jwg XdJyQ/55mJ/1xyE3TS7nVBls7FoONAeiK0VDbX/Dbn90aHsKoxdDeFI5YyHpeUg95T Tq5JvzjAFTEX9DeCJuMCBTyfOZOQifcu41IF5Lj3I0k5tz+3qV/dzRXhDKSM6Hihi6 IZk0RLaWP3slw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R0lCM2J7Qz9rxW; Tue, 11 Jul 2023 17:29:03 +0200 (CEST) Date: Tue, 11 Jul 2023 15:29:02 +0000 From: Hammer Hu To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] Incorrect indentation when there are invisible/diplay properties on the line [9.6.7 ( @ /home/huzf/.cache/emacs_configs/default/elpa.28/org-9.6.7/)] Message-ID: References: <87mt027klw.fsf@localhost> <44rsvv2dwp2cnpbikqs7kysct5ylsxivm3scirj55efm7qvwat@flec34dbbdbb> <87fs5u7fcp.fsf@localhost> <87cz0y7agn.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87cz0y7agn.fsf@localhost> Received-SPF: pass client-ip=185.67.36.66; envelope-from=hammer@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-Spam-Score: -9.27 X-Spam-Score: -9.27 X-Migadu-Queue-Id: F336243A9F X-Migadu-Scanner: mx1.migadu.com X-TUID: Qajo7aAQ255l Thanks for your accommodations. Is it possible to introduce a feature to align all blocks to the begining to the lines when indenting? I thing it helps when copying contents from a org file without emacs installed. Best, --------------------------------------------- From: Ihor Radchenko Sent: 11.07.2023 15:07 To: Hammer Hu Subject: Re: [BUG] Incorrect indentation when there are invisible/diplay properties on the line [9.6.7 ( @ /home/huzf/.cache/emacs_configs/default/elpa.28/org-9.6.7/)] Hammer Hu writes: > Please change bug.el to > > (add-hook 'org-mode-hook #'org-modern-mode) > (setq-default org-adapt-indentation t) > > Select the region and M-x indent-region multiple times. Thanks! A simpler reproducer: 1. /tmp/bug.org #+begin_quote foo #+end_quote 2. emacs -Q -L /path/to/compat/ -L /path/to/org-modern/ -l compat -l org-modern /tmp/bug.org 3. M-x org-modern-mode 4. Move to the beginning of #+begin_quote line 5. M-: (indent-line-to 3) 6. M-: (indent-line-to 3) 7. 8. M-x org-modern-mode 9. Observe overindentation The reason why this happens is the following: 1. indent-line-to tries hard to create indentation and move the beginning of visible text to column 3. 2. indent-line-to notices (at point (5)) that line is not indented at all. 3. It computes that it should insert " " to indent to column 3 and inserts these spaces. 4. org-modern-mode notices modification and re-hides spaces 5. indent-line-to is fires one more time at point (6) 6. indent-line-to notices that line is indented, but the leading whitespace is invisible. 7. It computes that it should yet insert extra " " to move the text to column 3 visually (because the existing spaces are hidden). 8. It inserts the extra spaces 9. org-modern-mode notices modification and re-hides added spaces. I believe that it is org-modern's fault. Indentation works are it supposed to and tried hard to align text visually to third column. org-modern fights against. Note that indenting visually is Emacs' convention that applies everywhere. Canceled. Not an Org mode bug. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at