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: Thu, 20 Jul 2023 09:10:02 +0000 Message-ID: <87jzuvq785.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19112"; 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 Thu Jul 20 11:11:28 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 1qMPh2-0004lA-23 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Jul 2023 11:11:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMPgh-00022K-LT; Thu, 20 Jul 2023 05:11:07 -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 1qMPgd-000222-LN for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 05:11:03 -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 1qMPgd-0001ZW-9o for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 05:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMPgc-0007m0-7G for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 05:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jul 2023 09:11:02 +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.168984420529798 (code B ref 64696); Thu, 20 Jul 2023 09:11:02 +0000 Original-Received: (at 64696) by debbugs.gnu.org; 20 Jul 2023 09:10:05 +0000 Original-Received: from localhost ([127.0.0.1]:57662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMPfg-0007kU-Bw for submit@debbugs.gnu.org; Thu, 20 Jul 2023 05:10:05 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:37773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMPfa-0007jp-Vd for 64696@debbugs.gnu.org; Thu, 20 Jul 2023 05:10:02 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C5E3A24002A for <64696@debbugs.gnu.org>; Thu, 20 Jul 2023 11:09:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689844192; bh=kxbw0WztD5k3dcwAO+uFocGZbNxdbtwhqn+ZZTt49s4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=q65IaUpQDDNNzHteLggzw9VW0QFgdKk3onVh9RrOjXp1Q5Q9Mc2p3BFwN9UWls800 1Q5VUsEvKJhmxVUIQHjA/9rYQQW+Jg9Z7n8fwMcZ8yyeFREKTljjScV6RlVSTyAxih xmULaDbCWzOMqMPynC1AmlmEUYNQTreKXvW25TWrBMyclkVjA7xr9VulDJZhwAImV4 iHcSVrSCfnfj4IPxJteOWpJaod/QZ4DHwiu+/n3vfjyEpnDEkdRpFMTTa4zCTowcUN Qnm/Gpz5W8lu2Fw9iX+NHd9/x2qxQPP+WR9LlrVqFypKYfxfRI2Xv63JOV5IJIeh/g Yank6fEeE1lwQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R66Mg4nnzz6tw0; Thu, 20 Jul 2023 11:09:51 +0200 (CEST) In-Reply-To: <831qh459sy.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:265577 Archived-At: Eli Zaretskii writes: >> > Invisible text is skipped by current-column. >> >> I am not sure if I understand what you mean by "skipped". > > "Skipped" means that the invisible text is not counted as occupying > columns on display. It is skipped without incrementing the column > count. See this part of scan_for_column: In my tests, invisible overlay property does not appear to affect things. >> Consider the following file in outline-mode: >> [...] > > Please make it easier for me to follow the questions you are asking > and provide helpful responses by (a) making the recipes as simple as > possible, and (b) by describing them in full detail. "Folded", > "unfolded heading", "applied invisible text property", etc. -- all > those might be crystal clear to you, but they aren't so to me, and > require me to guess (and err) what exactly did you do and how. Sure. You can do M-x yant/full-test after evaluating the code below (defun yant/test-indent-columns () (visible-mode -1) (search-forward "word") (warn "Moved point after first 'word'") (warn "1:: current-column = %d" (current-column)) (redisplay) (warn "redisplayed") (warn "2:: current-column = %d" (current-column)) (indent-to 50) (warn "Indented to column 50") (warn "3:: current-column = %d" (current-column)) (redisplay) (warn "redisplayed") (warn "4:: current-column = %d" (current-column)) (visible-mode +1) (warn "Enabled visible mode") (warn "5:: current-column = %d" (current-column)) (redisplay) (warn "redisplayed") (warn "6:: current-column = %d" (current-column)) (visible-mode -1) (read-char "Press any key") (kill-buffer)) (defun yant/test-init-buffer () (switch-to-buffer (get-buffer-create "*Test*")) (delete-other-windows) (unless (eq major-mode 'outline-mode) (outline-mode)) (erase-buffer) (insert "\n") (insert "* Test\n") (insert "word word\n") (goto-char (point-min))) (defun yant/full-test () (interactive) (when (get-buffer "*Warnings*") (with-current-buffer "*Warnings*" (with-silent-modifications (erase-buffer)))) (yant/test-init-buffer) (warn "We are going to indent second 'word' to column 50 and check `current-column'.") (outline-show-all) (warn "Test #1:: Everything visible.") (read-char "Press any key to start the test") (yant/test-indent-columns) (yant/test-init-buffer) (warn "Test #2:: 'word' is inside folded heading (hidden using overlays).") (outline-cycle-buffer) (read-char "Press any key to start the test") (yant/test-indent-columns) (yant/test-init-buffer) (warn "Test #3:: 'word' is hidden applying 'invisible text property to heading body.") (outline-show-all) (save-excursion (search-forward "Test") (with-silent-modifications (put-text-property (point) (point-max) 'invisible t))) (read-char "Press any key to start the test") (yant/test-indent-columns) (yant/test-init-buffer) (warn "Test #4:: 'word' is hidden applying non-sticky 'invisible text property to heading body.") (outline-show-all) (save-excursion (search-forward "Test") (with-silent-modifications (put-text-property (point) (point-max) 'invisible t)) (with-silent-modifications (put-text-property (point) (point-max) 'rear-nonsticky '(invisible)))) (read-char "Press any key to continue") (yant/test-indent-columns)) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at