emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,


From: Jean Louis
Subject: Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,
Date: Wed, 4 Jan 2023 20:51:03 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

> Can you send to me - here to the mailing list - a version of
> `org-export-dispatch', and also of other functions if needed, in which
> the parts that call `read-char-exclusive' are replaced by something
> non-blocking?

There is no Org version of menu that does not block. That it is there
is due to initial notion that some functions should be run on single
key, which is not bad in itself. Then people followed and continued
developing on that foundation creating tangled functions.

(find-function 'org-export--dispatch-ui)

So in Org, currently, there is only the blocking way. Functions in Org
Export or Org Agenda, can't be inspected interactively by using
commands like {C-h k}, you can inspect sources directly.

What you are asking is what my package offers:

GNU Emacs package: rcd-org-export.el -- use Org to export Org:
https://gnu.support/gnu-emacs/packages/GNU-Emacs-package-rcd-org-export-el-use-Org-to-export-Org-76272.html

You may inspect how functions look like:
(find-function 'org-html-export-as-html)

Then description:

org-html-export-as-html is an autoloaded interactive byte-compiled
Lisp function in ‘ox-html.el’.

(org-html-export-as-html &optional ASYNC SUBTREEP VISIBLE-ONLY
BODY-ONLY EXT-PLIST)

Basically ASYNC, SUBTREEP, VISIBLE-ONLY and BODY-ONLY are expected to
be either NON-NIL or NIL, and by using those switches, you use the
function to export.

What the function:

(find-function 'org-export--dispatch-ui) 

does is making sure to "highlight" (irony) when user press this or
that key, like when user press the highlighted "h", that then the
subsequent key like "H" appears highlighted, indicating to user that
after pressing first key, there are just few other options left.

Then in general Org Export works like this:

First the underlying information:

- It recognizes which export are available. What is worse, because of
  the not well taught design every OTHER package for Org export lean
  on the same blocking interface foundation, and keep adding to it!

  This is because developers of extensions for Emacs do not have other
  choice, or their package would not be included in
  org-export-dispatch

  Bad design, dictates more bad design.

  And if you ask me, of course that even simple change to interface
  creates havoc in all of those known and unknown Org export packages.

  Then there is the Org Broom that makes sure some apparently large,
  objectively small problems, end up under the carpet.

Then visibly what Org Export does for user is following:

- Show to user options to toggle variables like ASYNC, SUBTREEP,
  VISIBLE-ONLY, BODY-ONLY, they are supposed to be handled in real
  time. 

- Recognize which various exports among hundreds of them are available
  and display them for user to press one among hundreds of possible
  key combinations

- Then export function is invoked with paramenters ASYNC SUBTREEP
  VISIBLE-ONLY BODY-ONLY EXT-PLIST, while some exports not support all
  of them

To develop export library requires adapting to previously embedded or
hard coded expectation of mainstream Org. 

Notion is now that the interface will be changed to transient, which
does something similar more or less. I don't know of mouse support in
transient, but what I have seen, it does not look like it.

For you to make eev based export is easy, just toggling of variables
and recognizing which export options are there, generating temporary
eev buffers as usual.

Objective reality points
------------------------

- Within Emacs there are many multi key commands. If user wish to see
  which key follows which key, can use packages like `which-key' or
  similar. 

  Thus, it is superficial to involve some kind of highlighting single
  keys. That idea could have work very good for developer who made
  it. If I get used to it and acquire habit of it, I will keep using
  it and develop more by same principle.
  
- That toggling variables need blocking screen is not coherent, as it
  doesn't. A derived mode may define any keys, and instead of "C-b"
  there can be simply "b" for "body-only" toggling. 

- Using control key, like C-b, to toggle variables makes sense only in
  writable buffers.

- For each single export users are forced by design to again click
  "C-c C-e" and again invoke "h H" or other similar functions. This
  fact alone makes Org less usable.

- Using emacsclient during Org Export is not feasible.

- Emacs get blocked.

- It ignores mouse and normal keyboard movements, it blocks Emacs and
  invoking emacsclient during Org Export or Org Agenda gives
  surprising impossible looking effects; this will not change with
  transient adoption.

- Usability get forgotten.

- Package RCD Org Export, proves, that export screen may remain all the
  time visible, without blocking Emacs, and user may within seconds
  export to various different formats.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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