<div dir="ltr">** when ellipsis are &quot;removed&quot;, org-cycle doesn&#39;t work &quot;correctly&quot; on list<br><br>Hey everyone,<br><br>This is my first communication on this mailing list and I hope I&#39;ll do<br>it well.<br><br>1) The &quot;bug&quot; (I&#39;m not sure if it is a bug):<br><br>When you modify the `buffer-invisibility-spec` replacing<br>`&#39;(outline . t)` by `&#39;outline` (in order to remove the `...` when<br>headlines, list, etc are collapsed) by evaluating the following form:<br><br>(remove-from-invisibility-spec &#39;(outline . t))<br>(add-to-invisibility-spec &#39;outline)<br><br>`org-cycle` stopped working &quot;correctly&quot; on lists.<br><br>You still can collapse lists but you can get them to show the list<br>content again.<br><br>For instance, with the following list (and the ellipsis removed), with<br>the point on the first item (- something), press TAB (`org-cycle`):<br><br>- something<br>  - a<br>    - b<br>  - c<br>- something else<br><br>You&#39;ll obtain the first item collapsed:<br><br>- something<br>- something else<br><br>but if you hit TAB (`org-cycle`) again, you won&#39;t see the content (a,<br>b, c), the first item will stay collapsed.<br><br>note-1: I don&#39;t know if it can be considered as a &quot;bug&quot; because I<br>imagine that most org-mode users won&#39;t remove the visual feedback<br>offered by the ellipsis.<br><br>note-2: This &quot;bug&quot; was reported as an issue on github<br>(<a href="https://github.com/tonyaldon/org-bars/issues/5">https://github.com/tonyaldon/org-bars/issues/5</a>) by jonathanmfung,<br>regarding a section on the README where I wrote how to remove the<br>ellipsis, knowing that `org-bars` offers dynamic stars that inform<br>the visibility of subtrees.  Maybe it wasn&#39;t a good idea.<br><br>2) a fix of the &quot;bug&quot;<br><br>I was really interested in knowing why changing the<br>`buffer-invisibility-spec` in the way previously described has an<br>impact on `org-cycle`.<br><br>I added a small patch (that modifies `org-list-struct`) to this email<br>that makes `org-cycle` work with `buffer-invisibility-spec` changed<br>in order to remove ellipsis.<br><br>The outline of the patch is as follow:<br><br>The command `org-cycle`, when in an item list, calls<br>`org-cycle-internal-local`.  And `org-cycle-internal-local` computes<br>the local var `eos` (end of subtree or item) via the call of the<br>function `org-list-struct`.<br><br>(defun org-cycle-internal-local ()<br>  ;;...<br>  (let ((goal-column 0) eoh eol eos has-children children-skipped struct)<br>    (save-excursion<br>      (if (org-at-item-p)<br>          (progn<br>            (beginning-of-line)<br>            (setq struct (org-list-struct))<br>            (setq eoh (point-at-eol))<br>            (setq eos (org-list-get-item-end-before-blank (point) struct))<br>            (setq has-children (org-list-has-child-p (point) struct)))<br>        ;; ...<br>        )<br>      ;;...<br>      )))<br><br><br>And the problem comes from the use of the function<br>`current-indentation` in `org-list-struct` that doesn&#39;t compute<br>correctly in that context the indentation when ellipsis are removed.<br><br>The patch replaces this specific call of `current-indentation`.<br><br>note-3: I don&#39;t understand why the function `current-indentation`<br>doesn&#39;t compute &quot;correctly&quot; the indentation in that context.<br><br>note-4: In a default org buffer, with the items either collapsed or<br>not, with the following content and point on the first item,<br><br>- [X] first item<br>  1. sub-item 1<br>  5. [@5] sub-item 2<br>  some other text belonging to first item<br>- last item<br>  + tag :: description<br><br>evaluating `(org-list-struct)` gives the following structure (as<br>written in the docstring):<br><br>((1 0 \&quot;- \&quot;  nil \&quot;[X]\&quot; nil 97)<br>  (18 2 \&quot;1. \&quot;  nil nil nil 34)<br>  (34 2 \&quot;5. \&quot; \&quot;5\&quot; nil nil 55)<br>  (97 0 \&quot;- \&quot;  nil nil nil 131)<br>  (109 2 \&quot;+ \&quot; nil nil \&quot;tag\&quot; 131))<br><br>But if you removed the ellipsis (as specified previously), and you<br>collapse the first item, evaluating `(org-list-struct)` with point on<br>the first item gives you:<br><br>((1 0 &quot;- &quot; nil &quot;[X]&quot; nil 18) (18 0 &quot;1. &quot; nil nil nil 34) (34 0 &quot;5. &quot; &quot;5&quot; nil nil 55))<br><br>3) Thank you for all your work on org-mode, I enjoy using it every day :)<br><br><br>Have a nice day,<br>Tony Aldon<br><br>Done with: GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+<br>Version 3.22.30, cairo version 1.15.10) of 2021-06-09<br></div>