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: Nathan Nichols
Subject: Re: [PATCH] Ability to specify :html-head as a function
Date: Fri, 21 Jun 2024 15:21:05 -0400

> This looks like a copy-paste of `org-element-normalize-string'.
> Why not simply calling `org-element-normalize-string'?

I changed it at one point, but then changed it back and didn't realize that it was ultimately unchanged. 
Here's a patch that uses `org-element-normalize-string` instead.

> Also, may we move this discussion to Org mailing list? I prefer the
> discussions and development to be public (it helps future maintainers).

Yes, of course. I think I just forgot to hit "reply all".

On Fri, Jun 21, 2024 at 4:47 AM Ihor Radchenko <yantar92@posteo.net> wrote:
Nathan Nichols <nathannichols454@gmail.com> writes:

> Subject: [PATCH] Added ability to specify :html-head as a string or function
> ...
> +(defun org-html-normalize-str (s)
> +  "Return S, or evaluate to a string ending with a single newline character.
> +If S isn't a string or a function, return it unchanged.  If S is the empty
> +string, return it.  Otherwise, return a new string with a single
> +newline character at its end."
> +  (cond
> +   ((not (stringp s)) s)
> +   ((string= "" s) "")
> +   (t (and (string-match "\\(\n[ \t]*\\)*\\'" s)
> +        (replace-match "\n" nil nil s)))))

This looks like a copy-paste of `org-element-normalize-string'.
Why not simply calling `org-element-normalize-string'?

Also, may we move this discussion to Org mailing list? I prefer the
discussions and development to be public (it helps future maintainers).

--
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>

Attachment: 0001-Added-ability-to-specify-html-head-as-a-string-or-fu.patch
Description: Text Data


reply via email to

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