From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QGjTAbkwKmPhqgAAbAwnHQ (envelope-from ) for ; Tue, 20 Sep 2022 23:29:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YLmUAbkwKmNDbwAAauVa8A (envelope-from ) for ; Tue, 20 Sep 2022 23:29:29 +0200 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 A80B63D944 for ; Tue, 20 Sep 2022 23:29:28 +0200 (CEST) Received: from localhost ([::1]:60296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oako3-0003ah-53 for larch@yhetil.org; Tue, 20 Sep 2022 17:29:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oag8U-0008Vp-I2 for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 12:30:16 -0400 Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]:35381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oag8R-0001fp-1d for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 12:30:13 -0400 Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-1225219ee46so5031792fac.2 for ; Tue, 20 Sep 2022 09:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:to:from:date:from:to:cc :subject:date; bh=VozvJasTvFxW2tRSA7bXTL499Cmc5fiSZV2qy6ncna0=; b=g5jUr85rQDOsbaldnBLpBmjjMPPtdwB8S0Ws/aK7XedOK8dOgv08HL0PLEsgrgRNbU IkQ+XlBJEs53IYI75uGgcI6A8ew1uPh4JqHigJmizMnKO9SeTua166GTkFkYCcgON5x3 HscgTNDnW9Sh/z/u9cwxnunIvJMbS8sL22qMHtVrynWfdmCOqcf6IfRVtIWdo0XT01ck 37Ov+3jvJutaq2qtmWy8+BF95GYNro8nRh/EKjOWWqfzj5JoYEhDV4ubxydsjaU47Qcx 4O67vgfM18m847TQJXJMuDIGlz0I+HVsMFCeZoBiZiTDlgNkDnoMOXFFRZs2/3JgJeAs xcbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=VozvJasTvFxW2tRSA7bXTL499Cmc5fiSZV2qy6ncna0=; b=3GMt4T1CxEeK0KLbDFDfmmkcM4iNO9L1Z1fCjIxT0usYQ4CmdJNGbTPG+wXx+YXUzt h0K/lRCevm7vlwTARVF2xU331OJaxFUmvQI11oBwVg5vZP+X9ED9Whgj1Bn7Gd9hnxT4 clScVCjrGyzAwmMNR3K74uN4aIIiPSPV6u5BEO1RgLFHEvfqGVu/wLChLXqRnKf5GTP2 fSrY0p7mYaP+s1sM95Wqj6v3KdeNBHbgifvAQ3kbGQ2wWs6jFmgvPYXZnKT59s1memUP lBvyauOvb3Yfz0fGDXEa5r0mrZL3Lqm0w3rEkWS10JyHrLCB83zghRtE6xPA6kzOcy8K MaJw== X-Gm-Message-State: ACrzQf0hEmMzCC/e2GsHngThlsnDH/6F0vaP3g24mDV5G/pxMWWd8rjI DKgm4vVuVEdDhIm74JsrXh5Kabh+RWc= X-Google-Smtp-Source: AMsMyM6rt92DzhMgi3SSsL2I3imiJf2JoS03XSy0bqBYPmjkjVBFSmjamg6MsKYrCtAKJBLKvPSJ9A== X-Received: by 2002:a05:6870:a197:b0:128:4c:ffd7 with SMTP id a23-20020a056870a19700b00128004cffd7mr2650686oaf.176.1663691405529; Tue, 20 Sep 2022 09:30:05 -0700 (PDT) Received: from localhost ([47.188.42.3]) by smtp.gmail.com with ESMTPSA id n18-20020a9d6f12000000b006391bdbb361sm99260otq.31.2022.09.20.09.30.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 09:30:04 -0700 (PDT) Date: Tue, 20 Sep 2022 11:30:04 -0500 From: Joshua Honeycutt To: emacs-orgmode@gnu.org Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Received-SPF: pass client-ip=2001:4860:4864:20::30; envelope-from=joshua.honeycutt@gmail.com; helo=mail-oa1-x30.google.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 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, MISSING_SUBJECT=1.799, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 20 Sep 2022 12:40:04 -0400 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663709368; h=from:from:sender:sender:reply-to:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VozvJasTvFxW2tRSA7bXTL499Cmc5fiSZV2qy6ncna0=; b=Kr3n89TPDHQys+R3DhBQpUVMYKhFXbZolldbnOTE4OHuqvUjoCoQ3PjD/4AChIQQvp2bKB ZkrmY/um9CTh0UclXYQFbShU7YRpUNKod3bi9oQLeBMT2+J+OZLJNw+n8MiS0INtW6PQv3 x+wW8hHrIdxo+tQSt1p/hUMfYvHt1a/eaDgeMgl94wPgaKeYKJPQ5OQ2cw6Q6QqAAdoF85 01Pz/hI310IgHQjcDIFoS2vHQOvQLFmdm6wjEG8VObjF8G0CxBPIxqFfxmXW7UG9E19LpD 66ZY+ylFkJdvSIFuW39XLvo7dmssHR8WdwTWTxh3aaPGVQya7nogPModLyQ0MQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663709368; a=rsa-sha256; cv=none; b=Nq++2Es7An7I9iJ1x0Fkx/0cP82ZxsOBnoffx6Lf5E7oK5HselK4RTH+p6lljvp7+P4zpF L0Sv5MJfpSyn7030pY/v5O/tQMKYFu7sxtN2ENQgQep5vTZVt43jHbJpN/C4Q4tsNuPOpx SnDjPPlS0+PyvlczKZVLlhFR738LGiriGvACmczPv2ZRStPYcQrGKMRW0SG0kgeaqVSlGa 15O3GNyGVept6ZPtsBE0TU7a3kakCwWh98skKyt7YgRFobXnF1tO2+cKIrMozIOg4Yf8ej PKwl368GG2l3c2ukqAoVVEoWewxmkb2xai7XQZWq/LZRAyGc+XCoDHyp8isaoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=g5jUr85r; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -5.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=g5jUr85r; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: A80B63D944 X-Spam-Score: -5.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: ehh5Z3nTNdcY To: emacs-orgmode@gnu.org Subject: Bug: org-html-example-block can produce multiple class attributes [9.4 (9.4-dist @ /usr/share/emacs/site-lisp/elpa/org-9.4/)] From: Joshua Honeycutt --text follows this line-- Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-27, modified by Debian Package: Org mode version 9.4 (9.4-dist @ /usr/share/emacs/site-lisp/elpa/org-9.4/) I added a class attribute to an example block as in: #+ATTR_HTML :class cmdout #+BEGIN_EXAMPLE text text text #+END_EXAMPLE I expected this to produce a html tag like:

but the output was instead:

   

In my browser this second class assignment was ignored.

org-html-example-block could instead add the 'example' class to other
attributes which get placed in the 
 tag. I modified it to achieve
this outcome like this (from be2246a550b444560ec1718c11185ac7bfcfa646):

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 9024701aa..7036f44cd 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2546,8 +2546,11 @@ information."
    (let ((attributes (org-export-read-attribute :attr_html example-block)))
      (if (plist-get attributes :textarea)
         (org-html--textarea-block example-block)
-      (format "
\n%s
" + (format "\n%s
" (let* ((reference (org-html--reference example-block info)) + (class (plist-get attributes :class)) + (attributes (plist-put attributes :class + (if class (concat class " example") "example"))) (a (org-html--make-attribute-string (if (or (not reference) (plist-member attributes :id)) attributes