Rasmus <ras...@gmx.us> writes: > Do you mean to change org-cycle-internal-local as in this patch or to make > a hook around it?
The former. However, a hook is OK too, but I couldn't find an acceptable candidate. Funnily, `org-end-of-subtree' does the exact opposite: it hard-codes behaviour and switch to the slow, outline.el, function when in a different mode. Other functions do not even have a fast path (e.g. `org-forward-heading-same-level'). We could make these functions faster, but we first need to decide how to proceed when it happens. After all, maybe the most simple path is good ole advice. Since `orgstruct-mode' already hijacks bindings, the next step would be to do the same for functions. WDYT? > Maybe the exception should be if orgstruct is detected rather than if > org is not detected. Not really, because you can have orgstruct on even in an Org buffer. > + (org-with-limited-levels > + ;; `orgstruct-mode' does not work well with > + ;; `org-show-children'. Thus, use `show-children' unless in > + ;; org-mode. Nitpick: "unless in Org mode" or "unless major mode is `org-mode'". Thank you for the patch. Regards,