emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Ability to specify :html-head as a function


From: Ihor Radchenko
Subject: Re: [PATCH] Ability to specify :html-head as a function
Date: Tue, 02 Jul 2024 11:59:49 +0000

Nathan Nichols <nathannichols454@gmail.com> writes:

> Ok here's an updated patch. Please let me know if there's anything else.

Thanks!

> Subject: [PATCH] Added ability to specify :html-head as a string or function

Please add changelog to the commit message.
See https://orgmode.org/worg/org-contribute.html#commit-messages

> --- a/lisp/ox-html.el
> +++ b/lisp/ox-html.el
> @@ -1531,7 +1531,8 @@ style information."
>  This variable can contain the full HTML structure to provide a
>  style, including the surrounding HTML tags.  You can consider
>  including definitions for the following classes: title, todo,
> -done, timestamp, timestamp-kwd, tag, target.
> +done, timestamp, timestamp-kwd, tag, target.  Can be a string, or
> +a function that accepts the project p-list and returns a string.
> ...
>  (defcustom org-html-head-extra ""
>    "More head information to add in the HTML output.
>  
> -You can set this on a per-file basis using #+HTML_HEAD_EXTRA:,
> -or for publication projects using the :html-head-extra property."
> +You can set this on a per-file basis using #+HTML_HEAD_EXTRA:, or
> +for publication projects using the :html-head-extra property.
> +Can be a string, or a function that accepts the project p-list
> +and returns a string."

We usually say INFO plist or INFO channel. "Project p-list" is not a
term we use.
  
>    :group 'org-export-html
>    :version "24.4"
>    :package-version '(Org . "8.0")

Please change :package-version to 9.8. This slot indicates the most
recent version when the meaning of default value of the option has been
changed.

> +(defun org-html-normalize-string-or-function (input &rest args)
> +  "Normalize INPUT function or string.  Return a string or nil.

"String or nil" is not accurate, actually. Because
`org-element-normalize-stirng' either returns the argument unchanged or
returns a string. Maybe better just drop "Return a string or nil"
completely.

-- 
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 via email to

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