From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56837: 28.1.90; `current-indentation' sometimes returns zero inside invisible text Date: Sat, 30 Jul 2022 14:38:47 +0300 Message-ID: <83ilne6da0.fsf@gnu.org> References: <875yjfrq2w.fsf@localhost> <83r12356fy.fsf@gnu.org> <87v8rfq877.fsf@localhost> <83o7x66hgt.fsf@gnu.org> <87lesargc2.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36604"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56837@debbugs.gnu.org To: Ihor Radchenko , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 30 13:40:27 2022 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 1oHkpW-0009Q4-Qa for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Jul 2022 13:40:27 +0200 Original-Received: from localhost ([::1]:47814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHkpU-0003n1-SZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Jul 2022 07:40:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHkp8-0003mi-KU for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:40:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHkp8-0002rW-Ax for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHkp7-0000gZ-Si for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jul 2022 11:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56837 X-GNU-PR-Package: emacs Original-Received: via spool by 56837-submit@debbugs.gnu.org id=B56837.16591811432561 (code B ref 56837); Sat, 30 Jul 2022 11:40:01 +0000 Original-Received: (at 56837) by debbugs.gnu.org; 30 Jul 2022 11:39:03 +0000 Original-Received: from localhost ([127.0.0.1]:34184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHkoA-0000f3-GX for submit@debbugs.gnu.org; Sat, 30 Jul 2022 07:39:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHko8-0000eY-Hx for 56837@debbugs.gnu.org; Sat, 30 Jul 2022 07:39:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHko3-0002n5-34; Sat, 30 Jul 2022 07:38:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tYzqutWuBkZVkrRusAgWUoQDgbwwjot23s70hPK3sMg=; b=CX26jMyI2yFp EgnHzhLvfErvYPLP6X3CxlM+jEvCbuROg6sbCTzizkntQMQz16NjkbGEYhuQcSE0TS3EYiRqpsqVU 8Lwx8PT5yGByIiicbD2l2sX+mZ9WaKnKfQOfL0ducBugvreMDSGX3cD4zUEFrSXesqS628PfMaivL YvjU+lLaoNurY1/lck4Y+9gWzN6r6jb6O4P7WUvjvDMDB3fW86PT7Ns9bvwf18goCAqEsVWU99qjw 1Fd1PUDuXQ2xcch+87+YLENQ9RFNsJ4+PcTAciMYkygSRJTdXlZMplF0U1rpXK1AgT3w2X0sb1g3O W+mROf9WtOCa/LmJVy8KYg==; Original-Received: from [87.69.77.57] (port=2394 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHko1-0003JO-RO; Sat, 30 Jul 2022 07:38:54 -0400 In-Reply-To: <87lesargc2.fsf@localhost> (message from Ihor Radchenko on Sat, 30 Jul 2022 19:27:09 +0800) 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:238258 Archived-At: > From: Ihor Radchenko > Cc: 56837@debbugs.gnu.org > Date: Sat, 30 Jul 2022 19:27:09 +0800 > > A simpler version would be let-binding buffer-invisibility-spec. Really? > Note that there is similar issue with current-column, though > current-column is much less likely to be used without considering > display properties. These are all display-related, in that their results are supposed to closely reflect what will be shown on display. > Would it be possible to include the "text" versions of > current-indentation and current-column into Emacs? > > Something like > > (defmacro org-current-text-indentation () > "Like `current-indentation', but ignore display/invisible properties." > `(let ((buffer-invisibility-spec nil)) > (current-indentation))) > > (defmacro org-current-text-column () > "Like `current-column', but ignore display/invisible properties." > `(string-width (buffer-substring-no-properties > (line-beginning-position) (point)))) Sounds strange to have this, but if Lars thinks it's useful, I won't object. > If not, could you at least mention the invisible text issues in > `current-indentation' docstring? OK.