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#56837: 28.1.90; `current-indentation' sometimes returns zero inside invisible text Date: Sat, 30 Jul 2022 19:49:50 +0800 Message-ID: <87ilnerfa9.fsf@localhost> References: <875yjfrq2w.fsf@localhost> <83r12356fy.fsf@gnu.org> <87v8rfq877.fsf@localhost> <83o7x66hgt.fsf@gnu.org> <87lesargc2.fsf@localhost> <83ilne6da0.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="36320"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 56837@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 30 13:49:10 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 1oHkxy-0009Hp-2T for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Jul 2022 13:49:10 +0200 Original-Received: from localhost ([::1]:54896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHkxx-00009q-5c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Jul 2022 07:49:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHkxq-00008N-Jf for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHkxq-0004Ik-B8 for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHkxq-0000yz-7Y for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:49: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: Sat, 30 Jul 2022 11:49:02 +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.16591817373767 (code B ref 56837); Sat, 30 Jul 2022 11:49:02 +0000 Original-Received: (at 56837) by debbugs.gnu.org; 30 Jul 2022 11:48:57 +0000 Original-Received: from localhost ([127.0.0.1]:34207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHkxk-0000yh-V3 for submit@debbugs.gnu.org; Sat, 30 Jul 2022 07:48:57 -0400 Original-Received: from mail-pl1-f172.google.com ([209.85.214.172]:43725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHkxh-0000yM-HP for 56837@debbugs.gnu.org; Sat, 30 Jul 2022 07:48:54 -0400 Original-Received: by mail-pl1-f172.google.com with SMTP id y15so6660295plp.10 for <56837@debbugs.gnu.org>; Sat, 30 Jul 2022 04:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=11H1KIar8t3vf/T+rRYuMb3+fg1AnyBc6SF9S4I0LWY=; b=MDupwDJmRKmedNFKGAIzGvPowKkrbJtrb+0c6CWyd/kGMUNEicmDd6wuphH7gRzIJY +cHGiijXWvaAhJsPZawkZ8+Yf3UBwHK2VQOR8dkczA+hcSzZVAgSfYK3EKUggw8t6RRg SGBN5hgECrm9m0yeXcJDwDar1bN7ZlQ2RlLuVdyJdd7i5+w+xRPKsuE7Q/21PyTI3u3c 8mrHEU+fY2av6lDPOR71quTU4bE4ABhsKt9a+ubU/sBndsoBtBKdzaWLVlyNzJSlXiZI bsSjiZVjeFF+TXDfmc0G/9BeuGOBEc4ThlYq0Un3gXNKmBOvuYKeWep1Ztn+2lLNSGqA Xqkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=11H1KIar8t3vf/T+rRYuMb3+fg1AnyBc6SF9S4I0LWY=; b=NiFO8hzkey652bShhE50GBSJ0l5tueZ5SsRdIHkZuBw/fKxONa69RfUVZ8eNou4zth yb+lqL4zlzZ1IyOhwDaXHRq9gH5Jqa1cfUQdPNPUxL47rAgDqWFfq2l+uAie5RT0h5Z7 a0QvavHdc6gxnYG2Y9Hru/qSqM52TLZ/wdFXIv53qgsPIuVxSDe7K5cuJq9K0T7s179u 7TsvAjvCnOa0JAZKBwwGsUNdPh8L/waQLA8ZYyhaiu5rT9bVRlGlx1l9N2e3tPwrGHJC yqqdWU5gESrFG2Umg3SXXZXdKlcIRHYIKFQg7MyxSnOac3PBDN3Z1wOMqLGfuvjrMPsh fplQ== X-Gm-Message-State: ACgBeo1yED+1l1TRhzYjVKVdRUuz4i3P3fMn+e51+MHHRY4gN7Zvv0Mo T48F/K6iJrSeDBSQ3Qxphf4= X-Google-Smtp-Source: AA6agR5JY+mTekIaA7PMCEkwonaUehDdlqnKNxcpPHJ/V2SLOIdGE7zMddXkOYfpbJkv65yohgEd0w== X-Received: by 2002:a17:90b:1c82:b0:1ee:eb41:b141 with SMTP id oo2-20020a17090b1c8200b001eeeb41b141mr9026482pjb.143.1659181727312; Sat, 30 Jul 2022 04:48:47 -0700 (PDT) Original-Received: from localhost ([2409:8a70:217:4f80:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id j12-20020a170903024c00b0016c50179b1esm5593563plh.152.2022.07.30.04.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 04:48:46 -0700 (PDT) In-Reply-To: <83ilne6da0.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" Xref: news.gmane.io gmane.emacs.bugs:238262 Archived-At: Eli Zaretskii writes: >> A simpler version would be let-binding buffer-invisibility-spec. > > Really? Could you please elaborate? Do I miss something? I tested let-binding, and it does work if you try to let-bind buffer-invisibility spec around the calls to `current-indentation' in my reproducer. AFAIK, remove-from-invisibility-spec simply does (setq buffer-invisibility-spec ...) let-binding is less cumbersome and not limited to outline spec which is not even used by Org. Org uses multiple specs + other font-lock staff may set more arbitrary specs in third-party packages. >> 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. I understand. current-column even express it clearly in the docstring (unlike, current-indentation). However, as I tried to explain, display-independent versions can be useful during parsing. And not only in Org mode. If you think otherwise, we will simply implement the required versions in Org. >> If not, could you at least mention the invisible text issues in >> `current-indentation' docstring? > > OK. Thanks! Best, Ihor