From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gLk6J7OV2V9iJQAA0tVLHw (envelope-from ) for ; Wed, 16 Dec 2020 05:05:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SMAGI7OV2V83bQAAB5/wlQ (envelope-from ) for ; Wed, 16 Dec 2020 05:05:55 +0000 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 C853A940148 for ; Wed, 16 Dec 2020 05:05:54 +0000 (UTC) Received: from localhost ([::1]:53906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpP0a-0003V5-Gt for larch@yhetil.org; Wed, 16 Dec 2020 00:05:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpOzu-0003TR-4z for emacs-orgmode@gnu.org; Wed, 16 Dec 2020 00:05:11 -0500 Received: from mail-il1-x141.google.com ([2607:f8b0:4864:20::141]:40511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kpOzq-0002xx-9k; Wed, 16 Dec 2020 00:05:09 -0500 Received: by mail-il1-x141.google.com with SMTP id g1so21442114ilk.7; Tue, 15 Dec 2020 21:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tr7EvRQZADdh7M8baXCTE+O0NPZt0/SXgweTEuM4ht4=; b=VtDd5yP/um15NM2ALyW+zLFpil2Ba3U3cvkjlhL6BqC2BLtCWngfJc9g1ccCzkT48o j+irqTKMvKYQnExdcdjWRqJ03IW3LbU5wNFJs4dBicsvrZyj/SPFCw1+/QFPwkqW9WvH un+vPjeZFKAuvhzsE2mTdQtlK6KIMy1mZX1g9GPdH8o5mhzKLAwXC80h4JY9RY9eEqop DI1yYCEJtM4leDYRs7QJtUiuTHQkkOX2P9xNXqPkimuBWCFhG/OWJ5X7nyKnxBMyXyxs 3nDO+FeUDiCyNSDFqNTAf1NjeNQ5NoWk/UsNNNCwGcID6gzopXBrulLkYj1SocluWnN2 ht0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tr7EvRQZADdh7M8baXCTE+O0NPZt0/SXgweTEuM4ht4=; b=Fsq2xJAYJK/40Hb1BiGpt7QR7uwcVcyOlNPZqB7wi80GbP+oJLnYpHnam909ByrFqG R3w8BM7FQTNvBajcz184s2/PE/8AV7PZQfKShr6ZiNsO/ljI5PLtROYAzT01vMmSudj/ qJFTj4k6jblMdCa1KiQvqPwQM2ToGxa0Er56JWgBJTRRpRDQ5WjgBweY0qWv2/wYj2ZF KnJFsMwvrHlToTO00grTKu+kcQHc1VhRr1n171FGOqWn7fhc5vrcvNDY92DYi8EdQ52H IlkXNA9TBi2z0U2QBqXNzUKZoKCDr1R4+AC8KQLIrbG1+G5m1cu226ms6GI81/9nRuHP dhZw== X-Gm-Message-State: AOAM532bewmesgnfkOoWQwWQV/p+hjdLNloBU+CxjhVQE5NswOqZQSAG ofxseWzzmQb2OTZ9Ap3gU1nsXFVFIP54bpbI8eg= X-Google-Smtp-Source: ABdhPJyMpjtxX0IU3yLHlFCE8K0HWUJD29ASFFuIWEzVfuxK7Z1las6pkzjw9m4CCOydHdwmNUYcVslAK4r9S7XgM+w= X-Received: by 2002:a05:6e02:20ce:: with SMTP id 14mr3625539ilq.6.1608095104304; Tue, 15 Dec 2020 21:05:04 -0800 (PST) MIME-Version: 1.0 References: <87pn6kfr19.fsf@gmail.com> <87v9gcz9ge.fsf@wi.uni-muenster.de> <87lfh8fkj1.fsf@gmail.com> <87zh5n1p3s.fsf@wi.uni-muenster.de> <87tuvl3fyc.fsf@gmail.com> <878scvs0z7.fsf@wi.uni-muenster.de> <87wo0fktjs.fsf@gmail.com> <874knjrtg9.fsf@wi.uni-muenster.de> <87tuvjkqzl.fsf@gmail.com> <87sgb28gd8.fsf@wi.uni-muenster.de> <87blexel9f.fsf@gmail.com> <87im94ordh.fsf@gnu.org> <87tusolntx.fsf@wi.uni-muenster.de> <873607uw3y.fsf@gmail.com> In-Reply-To: From: Timothy E Chapman Date: Wed, 16 Dec 2020 13:04:52 +0800 Message-ID: Subject: Re: [PATCH] Enhance org-html--build-meta-info To: Tom Gillespie Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::141; envelope-from=tecosaur@gmail.com; helo=mail-il1-x141.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Lechtenboerger , Bastien , org-mode-email Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.51 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=VtDd5yP/; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: C853A940148 X-Spam-Score: -1.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: rXxISylIFr2a Hi Tom, > Why not just use #+html_head: > possibly with a macro to fill in variable values? That is fully > extensible and doesn't overload keywords. For title, date, author, > etc. those can have clearly defined mappings to the html, but > everything else seems to be handled more sanely with #+html_head:. Am > I missing something? I doubt the use case that prompted me to make this an option is the only one that would benefit, but it should give you an example of the potential utility of this. There's some metadata I /always/ want added to my exported documents. Some of it is static (e.g. ("name" "theme-color" "#77aa99")), but I also have opengraph metadata which is based on the title/author/etc. See https://tecosaur.github.io/emacs-config/config.html#extra-header-content,code--2 I can't imagine any non-irritating way to have this occur without making use of this exposed functionality, and I doubt I'm the only one who has something they'd like to do which makes use of this. Thanks to the code cleanup / refactoring in the first commit, this option is pretty trivial to expose, so I thought why not! Does this help clarify the purpose to you? Timothy. p.s.I'd rather not have to copy-paste (evern by template expansion) several lines like this into every file I export :cry: #+HTML_HEAD: {{{meta_maybe_description}}} #+MACRO: meta_maybe_description (eval (let ((description (delq nil (org-element-map (org-element-parse-buffer) 'keyword (lambda (kw) (when (string= "SUBTITLE" (org-element-property :key kw)) (org-element-property :value kw))))))) (if description (format "" (replace-regexp-in-string "\"" """ (org-html-encode-plain-text description)))) "")) When I could just have this in my config: (when (org-string-nw-p (plist-get info :description)) (list "name" "description" (plist-get info :description)) Timothy E Chapman tecosaur@gmail.com tecosaur.com On Wed, 16 Dec 2020 at 12:13, Tom Gillespie wrote: > > A question from the slightly uninformed. Why not just use #+html_head: > possibly with a macro to fill in variable values? That is fully > extensible and doesn't overload keywords. For title, date, author, > etc. those can have clearly defined mappings to the html, but > everything else seems to be handled more sanely with #+html_head:. Am > I missing something? Best, > Tom