From unknown Fri Jun 20 07:27:01 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#56838 <56838@debbugs.gnu.org> To: bug#56838 <56838@debbugs.gnu.org> Subject: Status: 28.1.90; `current-indentation' sometimes returns zero inside invisible text Reply-To: bug#56838 <56838@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:27:01 +0000 retitle 56838 28.1.90; `current-indentation' sometimes returns zero inside = invisible text reassign 56838 emacs submitter 56838 Ihor Radchenko severity 56838 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 30 03:56:28 2022 Received: (at submit) by debbugs.gnu.org; 30 Jul 2022 07:56:28 +0000 Received: from localhost ([127.0.0.1]:33956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHhKm-0004fD-2D for submit@debbugs.gnu.org; Sat, 30 Jul 2022 03:56:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:43986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHhKk-0004f4-1c for submit@debbugs.gnu.org; Sat, 30 Jul 2022 03:56:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHhKj-0001od-Si for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 03:56:25 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:53016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHhKi-000508-9e for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 03:56:25 -0400 Received: by mail-pj1-x102d.google.com with SMTP id ha11so6616456pjb.2 for ; Sat, 30 Jul 2022 00:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=rHfBm4Q78IaSS+zFBC7kCLSKbA6+EzZ+lc4xdZZzgAw=; b=oV0o2G0wJeAWBmqaU9U0G7J33k7MjJiednQnqwM7egp/q515Nm+QPEhrpyupB8VhyN 9UMH+PNZx1Z/hYjJxlFzz4HjfYXQTSH1zeRkysafUN/u9Yc8iegluU7lbmlzdcO82lS/ luMwbQgA1iV8plV4JhdlKPoSbtL1sVJycSl09X/wCDFBezoZviapAVa1g7gSoHt8oNJh y50pY+CSj1oZklU8snh7q5/XYrVLoL+c+pKd/jpA0onj4Z26I+L1YCfACXgm6ar1rUuZ Xt0XL/7et4ptpUFCXM26ZTE8WxtoM5nQs8jFsbHK29pg8z4Xwmkvlpsp1rnuQdoRxIjk h91Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=rHfBm4Q78IaSS+zFBC7kCLSKbA6+EzZ+lc4xdZZzgAw=; b=ikKU4haiXogofg3kcHBfqtRAQ59Oq1AXtl7+bhD8nWdu2D5hxN6Ac5y9qd+VMctC7Z N5t0aHVmSQnHEDC9WkJqODuOVZvZwVsDB4w5h0ZU3QlkQiaVFEN/717SflqYRCV56xzH ZUXtDHrj9QjZO98Y+G9PJfwfPl/xB9Pdrks356eNwf/VivpFQU2hUY8zs74HoZpOVuSs w2v4GZvj+gijqEttVM25viJw14jlc7ZJYeMO0xe+yvJIEMtLGfzqvPu/p4lhD4VuPg9I wg2pkgIgCYj0ZftU1AK6d+0RaVRe/W+notCK9RCpMBr1ZI2HrBz+KAflnFLAX96yI89g arkA== X-Gm-Message-State: ACgBeo1kK7aL9gGK7xC+RgTLwPGYb5Hq3hhI4DBpCBzTdOP/dIzpsiLv CiT4mu6eN3t2PGRZYc03R3zVwzmrzIW/GQ== X-Google-Smtp-Source: AA6agR77UZ99WbeZMSe4cy7neqClRQiVlKXE6ZXoi1QmzPe5/RUiDQ9zcN5Rz+Ua7g77DFvPcDCAxA== X-Received: by 2002:a17:90b:1807:b0:1ef:8aa5:1158 with SMTP id lw7-20020a17090b180700b001ef8aa51158mr8757559pjb.163.1659167782684; Sat, 30 Jul 2022 00:56:22 -0700 (PDT) Received: from localhost ([1.83.155.1]) by smtp.gmail.com with ESMTPSA id n9-20020a056a00212900b0052844157f09sm4176853pfj.51.2022.07.30.00.56.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 00:56:22 -0700 (PDT) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 28.1.90; `current-indentation' sometimes returns zero inside invisible text Date: Sat, 30 Jul 2022 15:57:09 +0800 Message-ID: <874jyzrq22.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Hi, Try to do the following: 1. emacs -Q 2. M-x outline-mode 3. Insert * something a * else 4. Move point to "* something" 5. to fold the outline 6. M-: (save-excursion (search-forward " a") (current-indentation)) ;; => 2 7. M-: (remove-from-invisibility-spec '(outline . t)) 8. M-: (add-to-invisibility-spec '(outline)) 9. M-: (save-excursion (search-forward " a") (current-indentation)) ;; => 0; expected: => 2 First reported in https://orgmode.org/list/87k0h49s7z.fsf@localhost Best, Ihor From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 30 04:07:13 2022 Received: (at control) by debbugs.gnu.org; 30 Jul 2022 08:07:13 +0000 Received: from localhost ([127.0.0.1]:33963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHhVB-0004yI-52 for submit@debbugs.gnu.org; Sat, 30 Jul 2022 04:07:13 -0400 Received: from mail-vs1-f41.google.com ([209.85.217.41]:45626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHhV9-0004y4-AQ for control@debbugs.gnu.org; Sat, 30 Jul 2022 04:07:12 -0400 Received: by mail-vs1-f41.google.com with SMTP id o4so6617175vsc.12 for ; Sat, 30 Jul 2022 01:07:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=BdIKk+ZyD/fOGeim/TSYdpX3edJpgPl2Bb6nB45EiJE=; b=Wk+tVmE3nG45RFYlURrLFJk9304PjW01QiHNRTxPHfYADq17md2LBJ8ajyLWPDCGgX rufJXreTNqn6vzAm9qOVl8gpL2W5EokVRcAKsWn1gfh8f2jMgqpXh+y/dk0g0bu6DCG9 8Ogolxg0RN3EBoklPs6f6h9NsTH+zee86k/SI25bD2OKagtP8/skLcG2xT+Iiy4Gn1G5 hoMKnsPi+aY7O9LNAj3dJmhJZ53y3eeTdi/Mr3GcB+SdIEEuvqb0lzCSJ7gkdTQCA9b+ 3sszV/7IjYi141CD5QrBi1HdqkdvYWcI9Iu6iNTb2tyLpiInqe6tPJPx6rCL5ytNOACP zAjw== X-Gm-Message-State: AJIora9J3c4XHMWMrViPdbr1qUHBFPk+IYmGhFHFpWfDs33oOtOmoWmO Bmx3DOiKBnA+NOb65SdptvR+xCrN11js9BwAbNmDtzIjnv8= X-Google-Smtp-Source: AGRyM1utjg1/M2Z5YBpBheDHfkxyYqsnfd62svYvOIOkj55EklFueri2gauWq6tttjd2V12dh4Zu+rppwsUt+jCN3Lk= X-Received: by 2002:a67:e283:0:b0:35a:1d62:bc12 with SMTP id g3-20020a67e283000000b0035a1d62bc12mr2793666vsf.3.1659168425674; Sat, 30 Jul 2022 01:07:05 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Sat, 30 Jul 2022 10:06:54 +0200 Message-ID: Subject: To: control Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: forcemerge 56837 56838 thanks Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.217.41 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.217.41 listed in wl.mailspike.net] 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: forcemerge 56837 56838 thanks Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.217.41 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.217.41 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager forcemerge 56837 56838 thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 10 03:25:47 2023 Received: (at control) by debbugs.gnu.org; 10 Jan 2023 08:25:47 +0000 Received: from localhost ([127.0.0.1]:38709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pF9x4-0004ds-UI for submit@debbugs.gnu.org; Tue, 10 Jan 2023 03:25:47 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:58587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pF9x3-0004dO-0U; Tue, 10 Jan 2023 03:25:45 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id AFC96C0007; Tue, 10 Jan 2023 08:25:36 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#60692: 29.0.60; current-indentation wrong without outline ellipsis In-Reply-To: <83tu0zo76j.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 09 Jan 2023 21:10:28 +0200") Organization: LINKOV.NET References: <86k01v1y9c.fsf@mail.linkov.net> <83wn5vo8tx.fsf@gnu.org> <83tu0zo76j.fsf@gnu.org> Date: Tue, 10 Jan 2023 10:20:20 +0200 Message-ID: <86k01ulrwl.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: 60692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) forcemerge 56837 60692 thanks > About current-indentation: it skips invisible text, so it's unclear to > me why you expected to see 2. The doc string says: > > Text that has an invisible property is considered as having width 0, unless > `buffer-invisibility-spec' specifies that it is replaced by an ellipsis. > > The "current indentation" on the line of buffer position 8 is entirely > in invisible text, and current-indentation only accounts for _visible_ > whitespace, per the above documentation. Thanks for the reference, it explains the problem. But this is a very strange logic. I don't get it. Why it depends on the presence of the ellipsis and fails without it? Now I see this bug report is a duplicate of bug#56837. This is a problem because modes use 'current-indentation' to get an outline level in 'outline-level' function, e.g. (setq-local outline-level (lambda () "`outline-level' function for Python mode." (1+ (/ (current-indentation) python-indent-offset)))) (setq-local outline-level (lambda () (1+ (/ (current-indentation) ruby-indent-level)))) But this fails when users want to remove an ellipsis.