Ihor Radchenko <[email protected]> writes:

> Anoncheg <[email protected]> writes:
>
>> Problem:
>> When I  bind TAB to custom functions that call `org-cycle`, this
>> implementation creates recursion. Debugging requires backtrace analysis
>> to distinguish my binding from `org-cycle`'s internal TAB call.
>>
>> Lines 430 and 438 in org-cycle.el contains:
>> `(call-interactively (global-key-binding (kbd "TAB")))`
>>
>> Request:
>> Please prevent `org-cycle` from invoking the TAB key binding directly.
>> This allows me to rebind TAB to custom functions calling `org-cycle`
>> without recursion or unexpected call chains.
>
> Feel free to customize org-cycle-emulate-tab

If you need to maintain an ability to use org-cycle's features, I
recommend let-binding a dynamic variable around the call that causes the
recursion and checking that variable value to detect whether there is
recursive state.

The current design with calling TAB binding directly is intentional and
dropping it potentially breaks user workflows.

Not a bug.
Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to