From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iGPDAIzrg2ZcgwEAqHPOHw:P1 (envelope-from ) for ; Tue, 02 Jul 2024 11:59:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id iGPDAIzrg2ZcgwEAqHPOHw (envelope-from ) for ; Tue, 02 Jul 2024 13:59:08 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=TF5w3F2b; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719921547; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=NRcJdoTEt//VTBNtFXzkEGNiM8QeOLopRIc7UL0jfo0=; b=A5YMg2meTw0bglLBuVNF3G1a7xQaPYCto1EbmjEV9WdzhkKkU0K0aFL0jNv+GzbFT8ZKmD WOn0dOaaSoCFJc3nRH0/3HQAgDKX5gXPLq3CKEVrKaMfUj8n9pEWzwrAqBJpxxb3SYeyH6 58ymsG60hEj0uWN5ul8uARvAUTO7xu2g7T131XJZ2tJs9/zReOAjVXKUjNUm+MJxFntYj8 zB7fop6y0RzpYma00tJXmMwmvShjwV0Leeqc7gXDi2SPI99uvrxBYLpwerbxNRvliT/Vgn jzygguzIZ3rtYPCTOoaIsLoHtidMxgwzFuosXKUFBe7gVokUjvCGpV/+PPf4Cw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=TF5w3F2b; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719921547; a=rsa-sha256; cv=none; b=uUSU91M6zZ1YwAaFkEr7YvBWTFVUHI8HuITqf8hM0+j3YaG+b9hZJP5PChC5KrqK9UHM6A bTDNBC2134C7ijrUiUmJIVr+KG9MjikSX+GIY/m5PMU3kFqeZ93bZVU47I2LcymZd01ZHs IR7T1GO8L6d+6YBnhNUS5l/5wSew7PLLkZf2kRtdMQblZlcZL/Xx3xr3MQOvi+kankSpuF b7B5HWq/NdxgHab9Q/EQhnteSDpkyboGvxznf3Rl69Y7nRhTsn2xDsjls/IG1LtFopFsux uPjmolGsbuvRHRZOK2c3+LQIZ6H7QdXf8bbqs8xWAG4sHHmgF9H6rYX7rgPs0Q== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9BED069C3C for ; Tue, 2 Jul 2024 13:59:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOc9M-0007rR-TT; Tue, 02 Jul 2024 07:58:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOc9K-0007r9-RM for emacs-orgmode@gnu.org; Tue, 02 Jul 2024 07:58:18 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOc9I-0004iL-Ca for emacs-orgmode@gnu.org; Tue, 02 Jul 2024 07:58:18 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A4078240028 for ; Tue, 2 Jul 2024 13:58:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719921492; bh=eV1hfYapjSLDB9QTDn3EVrBRzAr6XGtqctAsOsfQjr0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=TF5w3F2bkTO2haALtTzwBljTqklZGJuaJkqCJ37C38dAkJ8KCE0SS39dw63rcK8IH kJIOupdqSoOZ1jkMH26PKdKyqt28iGFEiGmjwcUfGDy0ZjjWpob7gggTzKXPYyS+9q IRhhQQuCsQmAxaAoLft5Gky7e4Y4jZrcCNbtt33unBN6p9DjWZ8C5gdju/TR3AjM/Z 7BOJOb0ljX0fwHwmO1QGiAQnuboCI9yyWynD0sZV3ryV3eWUo6ulgqb1C6AjrevNJv IxyXXApOE+79oJrosoTru9ricelojfF+jQVGhN2tLZUgoGgfd55C10udkHlOA9TVyT 2AbZS+djkgYpw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WD1dH6t4bz6txR; Tue, 2 Jul 2024 13:58:11 +0200 (CEST) From: Ihor Radchenko To: Nathan Nichols Cc: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= , emacs-orgmode@gnu.org Subject: Re: [PATCH] Ability to specify :html-head as a function In-Reply-To: References: <87zfstenxc.fsf@localhost> <87zfriscml.fsf@localhost> <87v824904a.fsf@localhost> <87bk3v78zq.fsf@localhost> <87jziiptoh.fsf@localhost> <87a5jdi29k.fsf@localhost> Date: Tue, 02 Jul 2024 11:59:49 +0000 Message-ID: <87v81ohumi.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 9BED069C3C X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -9.60 X-Spam-Score: -9.60 X-TUID: wAeFJ/yZFpUq Nathan Nichols 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 . Support Org development at , or support my work at