Re: [BUG] Re: when ellipsis are "removed", org-cycle doesn't work "correctly" on list

2022-10-04 Thread Ihor Radchenko
Ihor Radchenko  writes:

> The bug is triggered by incorrect result of org-list-struct.
> In org-list-struct with the above invisibility settings,
> current-indentation incorrectly returns 0 on "a", "b", and "c" items. I
> suspect Emacs bug.

After discussion with Emacs devs [1], I have found where the problem is
coming from. `current-indentation' used by Org parser returns the
_visible_ indentation and has undefined behaviour when the line is
invisible. This undefined behaviour worked in older versions of Emacs,
but not newer.

Fixed.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=9db57aee3e86dc47771840d21a19dc2e21e52299

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56837

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] Re: when ellipsis are "removed", org-cycle doesn't work "correctly" on list

2021-11-19 Thread Ihor Radchenko
tony aldon  writes:

> This is my first communication on this mailing list and I hope I'll do
> it well.

Thanks for reporting and welcome to the mailing list!

> 1) The "bug" (I'm not sure if it is a bug):
>
> When you modify the `buffer-invisibility-spec` replacing
> `'(outline . t)` by `'outline` (in order to remove the `...` when
> headlines, list, etc are collapsed) by evaluating the following form:
>
> (remove-from-invisibility-spec '(outline . t))
> (add-to-invisibility-spec 'outline)
>
> `org-cycle` stopped working "correctly" on lists.

Confirmed

Steps to reproduce:

1. emacs -Q
2. M-x org-mode
3. Insert

- something
  - a
- b
  - c
- something else

4. M-: (remove-from-invisibility-spec '(outline . t)) 
5. M-: (add-to-invisibility-spec '(outline)) 
6. Move point to "something"
7.   the item is folded but not unfolded

The bug is triggered by incorrect result of org-list-struct.
In org-list-struct with the above invisibility settings,
current-indentation incorrectly returns 0 on "a", "b", and "c" items. I
suspect Emacs bug.

Best,
Ihor