emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Org for non-users, part 2: `C-c C-e', a.k.a. `org-export-dispatch'


From: Ihor Radchenko
Subject: Re: Org for non-users, part 2: `C-c C-e', a.k.a. `org-export-dispatch'
Date: Tue, 08 Feb 2022 21:40:06 +0800

Eduardo Ochs <eduardoochs@gmail.com> writes:

> On Mon, 7 Feb 2022 at 10:55, Ihor Radchenko <yantar92@gmail.com> wrote:
>
>> >   What are the recommended ways to abort org-export-dispatch without
>> >   letting it destroy the "*Org Export Dispatcher*" window and its
>> >   buffer?
>>
>> You cannot. That window acts similarly to transient, but simpler. You
>> can think of *Org Export Disipatcher* as an extended help for
>> read-char-exclusive.
> What do you mean by "you cannot"?

Sorry if I was not clear. I was answering specifically the question you
asking. Elaborating: you cannot abort org-export-dispatch without
letting it destroy the "*Org Export Dispatcher*" buffer. This is because
"*Org Export Dispatcher*" is created inside unwind-protect form like:

(unwind-protect
        <call to org-export--dispatch-ui that creates the buffer and
        reads user input directly intercepting Emacs even loop via
        read-char-exclusive>
(and (get-buffer "*Org Export Dispatcher*")
     (kill-buffer "*Org Export Dispatcher*")))

Any time you abort org-export-dispatch, the unwind-protect is going to
kill the buffer.

> I was expecting an answer like this:
>
>   That's difficult to do, but the temporary buffer is generated by the
>   function `org-foo-bar'... you can try to make a copy of
>   `org-foo-bar' called `org-foo-bar-hacked-version', add your own
>   debugging functions to that copy - suggestion: the lines 42 and 99
>   are good places for that - and then you can change the function
>   `org-plic-ploc', that is called by `org-export-dispatch', to make it
>   call `org-foo-bar-hacked-version' instead of `org-foo-bar'...

If your question is about debugging, feel free to M-x debug-on-entry
org-export--dispatch-action. That will suspend execution of
org-export--dispatch-ui called by org-export-dispatch right after the
buffer is created but before Emacs even loop is blocked to read user
input. Reading the source code of org-export--dispatch-ui might also
help.

> One possible meaning of "you cannot" is:
>
>   Org is NOT MEANT to be explored in that way, and this "is not meant
>   to" is in a very strong sense. The last time that a person gave
>   technical information of that kind in the mailing list was 4 or 5
>   years ago, and we banished her from the community and excommunicated
>   her. Her name shall not be mentioned.

In my reply, "you cannot" referred to you cannot because of technical
reasons, as I tried to explain above. You appear to interpret the
wording in a strongly negative sense. Note that I was not trying to attack
you in any way and I am always trying my best to follow GNU Kind
Communication Guidelines [1] in my emails. Also note that my wording
might not be ideal. Either because English is not my native language or
because I may misinterpret the message I am replying to. 

[1] https://www.gnu.org/philosophy/kind-communication.html

Best,
Ihor




reply via email to

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