From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christoph Arenz Newsgroups: gmane.emacs.bugs Subject: bug#43587: move-to-column behaves differently when text has invisible property Date: Tue, 29 Sep 2020 17:56:45 +0200 Message-ID: References: <7e243d01-6d98-bda3-94bf-c0841a32f4ac@web.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------B65CB00DA4619B3355098D58" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15615"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: 43587@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 29 17:58:55 2020 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 1kNI1m-0003uH-Ur for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Sep 2020 17:58:55 +0200 Original-Received: from localhost ([::1]:58110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNI1l-0006DB-0N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Sep 2020 11:58:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNHzy-0005lx-NI for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 11:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNHzy-0006BJ-EH for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 11:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kNHzy-0007lM-E1 for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 11:57:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <7e243d01-6d98-bda3-94bf-c0841a32f4ac@web.de> Resent-From: Christoph Arenz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Sep 2020 15:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43587 X-GNU-PR-Package: emacs Original-Received: via spool by 43587-submit@debbugs.gnu.org id=B43587.160139501729830 (code B ref 43587); Tue, 29 Sep 2020 15:57:02 +0000 Original-Received: (at 43587) by debbugs.gnu.org; 29 Sep 2020 15:56:57 +0000 Original-Received: from localhost ([127.0.0.1]:56982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNHzs-0007l3-Rz for submit@debbugs.gnu.org; Tue, 29 Sep 2020 11:56:57 -0400 Original-Received: from mout.web.de ([212.227.15.4]:57299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNHzo-0007kn-AU for 43587@debbugs.gnu.org; Tue, 29 Sep 2020 11:56:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1601395006; bh=QLekRRUQNwWKRum6TK59k8xnkym9LfLHh6c8aaNgSZk=; h=X-UI-Sender-Class:To:From:Subject:Date; b=MR9AoHUAe8LR9CL0RLpbJcs22dSMkRMMsUAJQSjMFOoWWxZDHxSZkGP6fgGMH6BDF JrTUoYcZDnIr5TRPpkFyyY3c+hcnKw8dG7Ky5Hb/kg5uMrzoaLeI6zCh/wPyNFk2zC sZU28TzGOzf5rNa1NUk/BUxyyjUa6bSILZOmpAhc= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from [192.168.1.106] ([185.44.135.237]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MaHHc-1k7oTV3fBI-00Jq7P for <43587@debbugs.gnu.org>; Tue, 29 Sep 2020 17:56:45 +0200 Content-Language: en-US X-Provags-ID: V03:K1:YDIf+2SEoF34t5/4UaCBCMUB6eq6mJqFUNPi8hVpwOlXZTtWSSh 0u/NBuaU0WbRiNojqnx315D67/VLSuLGVunHoCe9qLKFx6Icj2FrLC5lEVSWgs6Ow/HlTvU NAtv5HaBNCpwDMHjnWqVGw151gzuhN1O0b8tVQ+A1DkO+zKaBEAa6s/dDIZm4IYDBwtZPi2 4BPWLzciUYH8Mss4FLrBQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:lbUR33H9Cjw=:zOcF7VotxG2AqMPz4ciS2G 4zae2+C3sO6ZYCYM+xU6YXoiFrLAQ2VElHHuFv9C/q+Kh3kChwGoBtCX8ZJcjO3fuLQCpY3KZ WyKPfYUoxQsFgzu6pG7KFHFW40s66gAvoWx8sLRaBh3ItQEyYFoUb17nY6VrVs0nyAMmjQQp0 eQW+dGAIUHmuLDuNre7oYA815pMw6UlRvZavPXzkb+8mTuZQSZyLYryHifJOBTsA9FH2Lfry4 7yKE9tnv3cxIVW3uUIJ2ZzT+KLc4CaqJxD8u4IPyfvKbrzDtn4+W4zmxmXTqVFvhhlowc72Jo dh/eSglpJ7OLRznENxm0FOVrtX7DEVKE1IJLoBC6MyAn+Q6H9pBS0x8anf5B1LbJ1ZWIOIeB8 9/XforGCiRee258J7HfYuIY4RhPZXoyxv1uUrph2zWiJ1vtTv6dOXZTATM/a07bY1MT6YlYzK lo5WBoACmm8x3iJr3addpYH78nwEv75rjuT+TM/GD2cRFdO6avticlQ7V/hWOFuHyLqRO1PUW 82nF/akGGmEApdluewFuI647w94ZgmjNegnWpYeTdIec5Gw3AqkKplT+qNr6J7JKe9Q12Tprq 21cXiqKRhO+RBFgLw+lYe9HjPwS94ZM7FwnWqReAr2FKfXu6CCyZwFRRDZzlfjBWULaLPFTzA L3FuTn9388ib0PhG43lNa8CDZK29BGtL1SdcPVwofsF+9rRx8WIQjPCYdOxOENKEslg3bnuFz BxjrB52vvHYdtgGOmKPlLfkrhIfZEGJge+5DHoDGOshrAx+bww3BO2qYDel23kydpoWjQYpv 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" Xref: news.gmane.io gmane.emacs.bugs:189278 Archived-At: This is a multi-part message in MIME format. --------------B65CB00DA4619B3355098D58 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Digging deeper into bug 43587, it seems to be related to move-to-column behaving slightly different when the text in a line has the invisible property set. Here is how to recreate. According to the documentation for move-to-column, I would not expect any difference between the two lines: > Optional second argument FORCE non-nil means if COLUMN is in the middle of a tab character, change it to spaces. For the first line, the tab has not been changed to spaces... Am I overlooking something? Kind Regards, Christoph (progn =C2=A0 (switch-to-buffer "indent-test.txt") =C2=A0 (erase-buffer) =C2=A0 (insert "\tLine starting with INVISIBLE text after TAB\n") =C2=A0 (insert "\tLine starting with visible text after TAB\n") =C2=A0 (insert "\nUsing move-to-column to move 'into' TAB, using the FORC= E parameter on both lines\n") =C2=A0 (whitespace-mode 1) =C2=A0 (add-text-properties 2 21 '(invisible t)) =C2=A0 (beginning-of-buffer) =C2=A0 (move-to-column 7 t) =C2=A0 (forward-line) =C2=A0 (move-to-column 7 t)) --------------B65CB00DA4619B3355098D58 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Digging deeper into bug 43587, it seems to be related to move-to-column behaving slightly different when the text in a line has the invisible property set.

Here is how to recreate. According to the documentation for move-to-column, I would not expect any difference between the two lines:

> Optional second argument FORCE non-nil means if COLUMN is in the middle of a tab character, change it to spaces.

For the first line, the tab has not been changed to spaces...

Am I overlooking something?

Kind Regards,
Christoph

(progn
=C2=A0 (switch-to-buffer "indent-test.txt")
=C2=A0 (erase-buffer)
=C2=A0 (insert "\tLine starting with INVISIBLE text after TAB\n")<= br> =C2=A0 (insert "\tLine starting with visible text after TAB\n") =C2=A0 (insert "\nUsing move-to-column to move 'into' TAB, using t= he FORCE parameter on both lines\n")
=C2=A0 (whitespace-mode 1)
=C2=A0 (add-text-properties 2 21 '(invisible t))
=C2=A0 (beginning-of-buffer)
=C2=A0 (move-to-column 7 t)
=C2=A0 (forward-line)
=C2=A0 (move-to-column 7 t))


--------------B65CB00DA4619B3355098D58--