From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible Date: Sun, 23 Jul 2023 07:30:34 +0000 Message-ID: <87bkg3rso5.fsf@localhost> References: <87fs5l3b3g.fsf@localhost> <83ilah79aq.fsf@gnu.org> <87jzux2zg8.fsf@localhost> <83351l74ci.fsf@gnu.org> <87a5vt2vx8.fsf@localhost> <831qh56vvz.fsf@gnu.org> <871qh52nlw.fsf@localhost> <83pm4p5er8.fsf@gnu.org> <874jm0mhgb.fsf@localhost> <831qh459sy.fsf@gnu.org> <87jzuvq785.fsf@localhost> <835y6ca1ah.fsf@gnu.org> <87zg3o8m2a.fsf@localhost> <83wmys8a2g.fsf@gnu.org> <87v8ecrqib.fsf@localhost> <83bkg481g5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10787"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 64696@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 23 09:31:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qNTYn-0002gW-Cc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Jul 2023 09:31:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNTYW-0007CP-Kq; Sun, 23 Jul 2023 03:31:04 -0400 Original-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 1qNTYU-0007Bz-4W for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 03:31:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qNTYT-0005EX-Sz for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 03:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNTYT-0001lf-P4 for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 03:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jul 2023 07:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64696 X-GNU-PR-Package: emacs Original-Received: via spool by 64696-submit@debbugs.gnu.org id=B64696.16900974306757 (code B ref 64696); Sun, 23 Jul 2023 07:31:01 +0000 Original-Received: (at 64696) by debbugs.gnu.org; 23 Jul 2023 07:30:30 +0000 Original-Received: from localhost ([127.0.0.1]:37877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNTXx-0001kv-Rx for submit@debbugs.gnu.org; Sun, 23 Jul 2023 03:30:30 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:48417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNTXv-0001kh-Hs for 64696@debbugs.gnu.org; Sun, 23 Jul 2023 03:30:28 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DEAEE240103 for <64696@debbugs.gnu.org>; Sun, 23 Jul 2023 09:30:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690097421; bh=3KavXumFzdXbR3h+DYVlLGkew5JRuEBCL232JIrMn6w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=bK8sRLV0xkj7YZOGfgUTR+IiMjaWX6MiPysRRD067v/5v1FuA2dOHSYdTk9V8geFl Ozx4jp7V9i6bY6ASii6gtt0Tc6xieAMTONI1OniOrdgFv/iXngPB/aVb/FvaJf2LLp FJMW8gV4IEOS2aIPSxMpzLwl4K31OeT7mpaxONGw/Y5PYh231TVngYL/oxKjmzmDyJ w2hqfpqGI3pzpj0jhXN2anyFk1p6LrrJfac2r5OQT03NhrEp8ci6trPjhWUa06HCpW 4qm+t/Y+pZjLVTNgBOooAqTWuwK3YyiqDipUwldS1RVz4D7x/b7bgoPc2caRTM19ow 7/1OjugpVQtsA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R7w1S5vMKz9ryk; Sun, 23 Jul 2023 09:30:20 +0200 (CEST) In-Reply-To: <83bkg481g5.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265866 Archived-At: Eli Zaretskii writes: >> > With the patch below, Test #2 shows "current-column = 6", which is >> > correct, since the cursor is shown after "* Test", with all the rest >> > invisible. >> >> This will definitely break indentation code. > > But is correct, don't you agree? Depends on the usage of `current-column' and design of Emacs indentation. On one hand, Emacs' indentation is nicely aligning text as is it actually displayed in the buffer, taking into account all kinds of bells and whistles that alter the displayed text width. On the other hand, such visual indentation is not always good. Visuals present in one Emacs config may not be enabled in another config. And code/text nicely aligned on one machine will suddenly look ugly on other. For example, see http://endlessparentheses.com/using-prettify-symbols-in-clojure-and-elisp-without-breaking-indentation.html In Org mode, visual indentation is also not necessarily good thing: 1. Org mode is generally aiming for the produced Org files to be readable as unfontified plain text. So, quirks related to visual indentation generally tend to mess things up. 2. Org mode uses indentation as part of the syntax. I had to get rid of using `current-column' and calculated "true textual indentation" manually to avoid breakage after `current-column' started to take into account invisibility. (bug#56837) >> I am pretty sure that it is not the only breakage. > > I don't insist in making that change. Quite the opposite, actually. > I also expect it to break gobs of indentation code where invisible > text is involved. Indentation code should probably temporarily remove > the invisibility spec, while indenting, or something. That would make sense, yes. > The main motivation to fix scan_for_column to consider more visual > effects was so vertical cursor motion works as expected when large > portions of text are hidden. What about having something like `current-visual-column' that will be used when we really need to examine which display column the cursor is it, accounting for all the display-affecting properties? Or maybe even have `use-visual-columns' variable that will modify how `current-column' behaves ('visual, 'textual, 'visual-ignore-invisible, etc) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at