emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Orm Finnendahl <orm.finnendahl@selma.hfmdk-frankfurt.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: multipage html output
Date: Mon, 12 Aug 2024 17:10:25 +0000	[thread overview]
Message-ID: <87le11is5a.fsf@localhost> (raw)
In-Reply-To: <ZrnJbM5cIQ0zCoab@orm-t14s>

Orm Finnendahl <orm.finnendahl@selma.hfmdk-frankfurt.de> writes:

>  I made the changes Ihor suggested and made all docstrings compliant
> with checkdoc. Please check whether this is now how you imagined it.

Thanks! I still have comments, but let's not focus on this minor issue
yet.

> Concerning the options stored in the org-page properties rather than
> in info I mentioned in an earlier mail, I found out it actually
> doesn't really change anything substantially or clarifies/reduces the
> code, so I decided against it.  ATM it doesn't make all that much
> sense to me.

Ok, but I am seeing

> (defun org-export-transcode-org-page (org-page _ info)
> ...
>     (let* ((body-only (org-element-property :body-only org-page))
> ...
> (put-text-property
>          0 1 :output-file (org-element-property :output-file org-page) final-output)

which is still relying upon custom properties.

> If we're nearing code completion, we could also start tackling the
> documentation. I think there should be an addition for the multipage
> filter in ox.el (under "Filter System") and maybe some other additions
> to explain the mechanism for multipage output (where?)

> Maybe I can also get some assessment what's needed in org-manual and
> what to change in order to make the doc additions proposals I made
> compliant with the rest of org-manual.

No, we are not nearing code completion.
I am just getting started on the review process.
We still need to decide and finalize the changes to export system that
we need to adapt globally, without tying it to ox-html exporter.
We are still at high-level review stage.

See the next set of comments below

> (defun org-export--annotate-info (backend info &optional subtreep visible-only ext-plist)
> ...
>     (when (plist-get info :multipage)
>       (setq tree (org-export-filter-apply-functions
>                   (plist-get info :filter-multipage)
>                   (funcall
>                    (plist-get info :multipage-split-function) tree info)

:multipage-split-function should be added to the :translate-alist I
think.  It should be documented what :multipage-split-function is
supposed to do in the docstring of `org-export-define-backend'.

I do not feel like :multipage-split-function is supposed to be export
_option_. It is more internal. That's why :translate-alist, where the
internals like templates and transcoders lie.

> (defun org-export-transcode-org-page (org-page _ info)
> ...
    > (let* ((body-only (org-element-property :body-only org-page))
    >        (info (cl-list* ;; add :tl-headline and :tl-headline-number to info
    >               :tl-headline headline
    >               :tl-headline-number
    >               (alist-get
    >                headline
    >                (plist-get info :headline-numbering))
    >               info))

May you please explain what is the purpose of constructing custom INFO
plist, what all these parameters do, and why you re-do the export again
in the transcoder discarding the CONTENTS argument provided?

> (defun org-export-transcode-org-data (data body info)
>   "Transcode DATA with BODY.  Return transcoded string.
> DATA is the top `org-data' node of the parse-tree.  INFO is the
> communication channel plist."
>   (if (plist-get info :multipage)
>       ;;; for multipage output the `org-data' node contains `org-page'
>       ;;; pseudo elements as contents, so we call `org-export-data' on
>       ;;; each of them and return the collected results.
>       (mapcar (lambda (org-page)
>                 (org-export-data org-page info))
>               (org-element-contents data))

This is not a transcoder's job to export its contents.
Please move special handling of org-page AST nodes to `org-export-data'.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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	other threads:[~2024-08-12 17:10 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03  9:44 multipage html output Orm Finnendahl
2024-07-03 10:33 ` Dr. Arne Babenhauserheide
2024-07-03 10:58 ` Christian Moe
2024-07-03 11:05   ` Ihor Radchenko
2024-07-03 14:34     ` Christian Moe
2024-07-04  9:50     ` Orm Finnendahl
2024-07-04 11:41       ` Ihor Radchenko
2024-07-04 13:33         ` Orm Finnendahl
2024-07-04 16:20           ` Ihor Radchenko
2024-07-07 19:33             ` Orm Finnendahl
2024-07-08 15:29               ` Ihor Radchenko
2024-07-08 19:12                 ` Orm Finnendahl
2024-07-09 17:55                   ` Ihor Radchenko
2024-07-10 18:03                     ` Orm Finnendahl
2024-07-10 18:53                       ` Ihor Radchenko
2024-07-07 20:50             ` Orm Finnendahl
2024-07-08 15:05               ` Ihor Radchenko
2024-07-08 15:41                 ` Orm Finnendahl
2024-07-08 15:56                   ` Ihor Radchenko
2024-07-08 19:18                     ` Orm Finnendahl
2024-07-09 18:08                       ` Ihor Radchenko
2024-07-10 19:37                         ` Orm Finnendahl
2024-07-11 12:35                           ` Ihor Radchenko
2024-07-13  7:44                             ` Orm Finnendahl
2024-07-13 10:13                               ` Ihor Radchenko
2024-07-13 11:01                                 ` Orm Finnendahl
2024-07-23  8:56                                 ` Orm Finnendahl
2024-07-23 10:24                                   ` Ihor Radchenko
2024-07-23 11:35                                     ` Orm Finnendahl
2024-07-23 12:52                                       ` Ihor Radchenko
2024-07-23 14:56                                         ` Orm Finnendahl
     [not found]                                         ` <Zp_EhDDxxYRWKFPL@orm-t14s>
     [not found]                                           ` <874j8g2lvq.fsf@localhost>
2024-07-23 15:36                                             ` Orm Finnendahl
2024-07-23 14:13                                       ` Ihor Radchenko
     [not found]                                         ` <Zp_b2lL2SzDswa-w@orm-t14s>
2024-07-23 17:10                                           ` Ihor Radchenko
2024-07-23 20:35                                             ` Orm Finnendahl
2024-07-24 10:20                                               ` Ihor Radchenko
2024-07-24 11:24                                                 ` Orm Finnendahl
2024-07-25  9:49                                                 ` Orm Finnendahl
2024-07-25  9:57                                                   ` Ihor Radchenko
2024-07-25  9:57                                                 ` Orm Finnendahl
2024-07-25 10:04                                                   ` Ihor Radchenko
2024-07-25 14:59                                                     ` Orm Finnendahl
2024-07-27 19:24                                                     ` Orm Finnendahl
2024-07-27 19:39                                                       ` Ihor Radchenko
2024-08-05 16:52                                                         ` Orm Finnendahl
2024-08-05 18:22                                                           ` Ihor Radchenko
2024-08-06  7:19                                                             ` Orm Finnendahl
2024-08-06 18:47                                                             ` Orm Finnendahl
2024-08-06 20:04                                                               ` Orm Finnendahl
2024-08-10 12:32                                                               ` Ihor Radchenko
2024-08-11 10:54                                                                 ` Orm Finnendahl
2024-08-11 13:47                                                                   ` Ihor Radchenko
2024-08-11 14:44                                                                     ` Orm Finnendahl
2024-08-12  8:35                                                                       ` Orm Finnendahl
2024-08-12 17:10                                                                         ` Ihor Radchenko [this message]
2024-08-12 18:58                                                                           ` Orm Finnendahl
2024-08-17  7:21                                                                             ` Rudolf Adamkovič
2024-08-17 14:05                                                                             ` Ihor Radchenko
2024-08-19 16:31                                                                               ` Orm Finnendahl
2024-08-22 12:27                                                                                 ` Ihor Radchenko
2024-07-26  8:22                                                 ` Orm Finnendahl
2024-07-27 13:01                                                   ` Ihor Radchenko
2024-07-27 14:25                                                     ` Orm Finnendahl
2024-07-23 14:19                                       ` Ihor Radchenko
2024-07-23 15:13                                         ` Orm Finnendahl
2024-07-23 16:20                                           ` Ihor Radchenko
2024-07-23 17:02                                             ` Orm Finnendahl
2024-07-23 17:13                                               ` Ihor Radchenko
2024-07-23 19:00                                                 ` Orm Finnendahl
2024-07-03 21:11 ` Rudolf Adamkovič
  -- strict thread matches above, loose matches on Subject: below --
2024-07-06  5:47 Pedro Andres Aranda Gutierrez
2024-07-06  9:04 ` Orm Finnendahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le11is5a.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=orm.finnendahl@selma.hfmdk-frankfurt.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).