bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56837: 28.1.90; `current-indentation' sometimes returns zero inside


From: Ihor Radchenko
Subject: bug#56837: 28.1.90; `current-indentation' sometimes returns zero inside invisible text
Date: Sat, 30 Jul 2022 19:49:50 +0800

Eli Zaretskii <eliz@gnu.org> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]