From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qPsgJwOTnmb6AAAA62LTzQ:P1 (envelope-from ) for ; Mon, 22 Jul 2024 17:12:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id qPsgJwOTnmb6AAAA62LTzQ (envelope-from ) for ; Mon, 22 Jul 2024 19:12:35 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=HRAJtID9; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721668355; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=l4Dy64v0lXo9zhpNnFdBQPeFYrtcHhS8V6ard4SXAao=; b=f4/Re4tEtDgRkRHC5aWeaFSw3Oj5USw82Hmwit2kIdopwNG5hImD3345mEEofp2uqnOB9Z 3E3GODqGnVX8mscv2OlGyB9rn+fCj25V0u5JYlRv4kLBG4Ca8aIOEcvC1nHZDg2lNc7pim /tbB3lIN8SqX431Ow7Wan5n9eNcDC04deLbSwN43uGtwpIdyFHr7iOpJAt3kVPVtyP4f9Q aC6rE5zvxkQRlVbbT3uCZ+iUJNltrbTXnsRumAaJDammtXA62A/FYH+jtlxROEJf1dfa7S AxWGUwmi+LezPqVi3QF+V39z+K49nswW6iRqSff6EG8aJBD4WWE1wsmu5a4Fpw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=HRAJtID9; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721668355; a=rsa-sha256; cv=none; b=DY9gPRKVPrl8av611zZA2KocuwXFlssf/sQqCwxTTf8rHf0uR0tBim0I0RhwDuu68xJpoM 3jrzhkXbMmS3I42zB7z6He4EqZwfSTxVXI8kqeZNPcvHS8IY5kBBqniSDqTtEwuROlKfcV SLxyQRz1hvAVTOD2PeXp7aR33FrGZ/OmBF3id9MUo1svLLiFq2Z0mK66GOLUk4DMXBF9EE gs7+2yTdZMdkjMTmhpsX2XsE8AVMSluApGR/ITRVrpBQkfa6K3QRzFic/4+dyMtOZ03VXN n6wvjnchGr3kvQk1U2fcRJ5RYAYf4F66L0ytk/XE7UVyrQjAfnS7oyfdcKTSTQ== 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 5D6CEFAE5 for ; Mon, 22 Jul 2024 19:12:35 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVwZO-0005UV-Mv; Mon, 22 Jul 2024 13:11:30 -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 1sVwZH-0005U4-Jx for emacs-orgmode@gnu.org; Mon, 22 Jul 2024 13:11:24 -0400 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVwZE-00033v-T4 for emacs-orgmode@gnu.org; Mon, 22 Jul 2024 13:11:23 -0400 Received: by mail-qk1-x743.google.com with SMTP id af79cd13be357-7a05c23970fso10553885a.0 for ; Mon, 22 Jul 2024 10:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721668275; x=1722273075; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l4Dy64v0lXo9zhpNnFdBQPeFYrtcHhS8V6ard4SXAao=; b=HRAJtID9Bd2GScOuksa95hqOooyn8CLVOqkX7rMro+r1MdbyzMH1sqcNuOdYhZVp3r QIuM7bDpEgurSy5RQOtvz9feiShCLu44taZRyiJkXCelo6ykOmUtU+8hOYqiAKKRLON7 6+mg2V0Yg3H1oIMEJRc3E9oqcW9rC9oxlXYIoky29LKtFYQm8SVkq+hpBlkHyIUUIwRZ 67ybNXkGnLgxmQJWz1fPa0R1TWyyqafTpzUdHoTBg1+bmFJCx+JWg3zA/WlMJRXz2Amk VuUIX3I6rfsBXY7s+aeozbQJHPl99ruOeG00uFTscENgn9EehAqJmqF5pSrQJBLAVcWf DiuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721668275; x=1722273075; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=l4Dy64v0lXo9zhpNnFdBQPeFYrtcHhS8V6ard4SXAao=; b=k4LdXjSpz2xaB6Juf5PPUFE2G0kJqp5eBz2gxi83lnLKk5xtf91r+OnhKCKpUKDBrb mwG7ree3io7rfS6kGBSMsjVjgfBWta2i2TjWOWDLb0YVbIL0NqOWizgQqQHnoOzliqXf WIDRQxmBxy2buvBzKwV6mKqTYqr1JeP58TpCTTr6VEbQTLLzUNquFKZ962WMECl7+G5d ESQN7Rqt7hzh8E2sKy4b/kuJPv6AePxWSsR3Wti8XFlcB6+NEvo1h5AEV2KhKE01ldix gxo2KKlle2+wXHuNU0A8R7bL3IoMDYxPvDKVQR1u6asrFPODpVm4pODJIRrB9BwsqHn+ vV6g== X-Forwarded-Encrypted: i=1; AJvYcCXMVeWP6Z+4nr7enpD4gwo9+HXmsUFH/R3uISqlpczIym+gsiUsBIK74/vpxFUtScejQXCGyJhqJNZ/mVJ9ea1f+IPpr80= X-Gm-Message-State: AOJu0Yyd3ylil0pTz1Mf8DQeA1KvysoA7vL02bIjutI/CDyixqr+G1/D dGeAfzQmrlUrX2QdFmB4/aiWCXMOk8q1Jbe3FIBgqSGt8ck5QcbmZkGpz8P/ X-Google-Smtp-Source: AGHT+IH+4sz1MUWzPZ9TNmzqFF4gONvaMOrJ8a6t6tp3HfauropcFIBDw318uWma7X1HFJFNRBZgJA== X-Received: by 2002:a05:620a:4686:b0:79f:1556:37c9 with SMTP id af79cd13be357-7a1a122ffa7mr606181185a.0.1721668275595; Mon, 22 Jul 2024 10:11:15 -0700 (PDT) Received: from gnus ([65.93.169.47]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a198fab23esm381856885a.5.2024.07.22.10.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 10:11:15 -0700 (PDT) From: Suhail Singh To: Ihor Radchenko Cc: Suhail Singh , TEC , Org mailing list Subject: Re: [PATCH] [BUG] Support attr_html in source code and fixed-width blocks In-Reply-To: <87le1tmt8w.fsf@localhost> (Ihor Radchenko's message of "Mon, 22 Jul 2024 13:49:35 +0000") References: <87v8277ye7.fsf@gmail.com> <877cems1t4.fsf@localhost> <8734o5v1sg.fsf@gmail.com> <87le1tmt8w.fsf@localhost> Date: Mon, 22 Jul 2024 13:11:04 -0400 Message-ID: <87r0bl2vyv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::743; envelope-from=suhailsingh247@gmail.com; helo=mail-qk1-x743.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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.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-Spam-Score: -9.75 X-Migadu-Queue-Id: 5D6CEFAE5 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.75 X-TUID: KrKbOSdZH6ch Ihor Radchenko writes: > Please address my concern about :textarea attribute. I do not see why > we should ignore it here. I don't understand your concern. Could you please elaborate on what you mean by "why we should ignore it here"? What is the "it" and what is the "here"? >From your email on 18th June: > I am not sure if we want to add all the attributes to every transcoded > element. At least in some cases, we do discard them > (`org-html--textarea-block'). >From the manual: #+CAPTION: [[info:org#Text areas in HTML export][org#Text areas in HTML exp= ort]] #+begin_quote The HTML export backend can create such text areas. It requires an =E2=80=98#+ATTR_HTML=E2=80=99 line as shown in the example below with the= =E2=80=98:textarea=E2=80=99 option. This must be followed by either an example or a source code block. Other Org block types do not honor the =E2=80=98:textarea=E2=80= =99 option. #+end_quote The current processing of :textarea does special handling for width and height attributes and discards the rest (based on my understanding of the code in `org-html--textarea-block'). Said support for :textarea attribute exists in `org-html-src-block' and `org-html-example-block' which is consistent with the manual. The patches I shared did not interfere with the handling of :textarea in the blocks that support it. In order to make the code more robust, one may wish to remove :textarea from the list of attributes (or issue a user-error or warning if it's present) in blocks that were never intended to support it (such as `org-html-fixed-width'). I do not have any opinion on this matter. Similarly, one may wish to add additional error checking based on the specifics of the transcoded element. I do not believe this to be worthwhile (HTML validation often has errors, and if a user is so interested they always have the option of validating the generated HTML). There is an open question regarding what attributes to support in `org-html--textarea-block' (i.e., in the presence of `:textarea' option). I believe the "correct" thing would be to filter out `:width' and `:height' (since, if present, they are translated into `rows' and `cols' attributes in the generated HTML) and include the rest "as is" in the generated HTML Regardless of the specifics above regd. :textarea, I believe support for #+ATTR_HTML ought to be added for most blocks to allow for CSS class and/or inline style to be specified when exporting to HTML. Additionally, I consider the absence of such support to be a bug. --=20 Suhail