From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iBstG7zp1GZQxwAA62LTzQ:P1 (envelope-from ) for ; Sun, 01 Sep 2024 22:25:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iBstG7zp1GZQxwAA62LTzQ (envelope-from ) for ; Mon, 02 Sep 2024 00:25:00 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=T2diYA2P; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725229500; 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=L5VaKT2Os2Shyo/rAxqxZLYZeJ5Ryzo+40TRK8OMv5I=; b=APKtRsHW1tENO3N3nngFqx8ZBd/z/sruYmUWeWur7z/9U2Pog5X8SjseelIxHRkIUmAFjk 0HNHnmvvAqsfv6aWvbCMuABV1NVYdR6j+wbGM4lZCAILf/eHELNUs9UV6bSmRvMH6+Qh3P yG6n6hUUvCHbqUR/87TjB05ZV3UqpXKJwHZZKYlIXVYGkHsNDHz2BI9Zjrj5sSECbfWYp7 Xcw+BF3cxrjeO33IL8JTjnD2P2BHW1/87syA1AP1nhk5F1q8UBCSKsUHHovC/2JLgDdOL+ WAfianDetDOKcMVPI41IIZFwfOzTZ6xn/r8W/8vEhfR4arTRUFCTUQUy8pL04w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725229500; a=rsa-sha256; cv=none; b=e/DrfJGtGyk0Lq//m++W21Ydrj0USb50ZIKs24fl6ZzCaeTXU+czRCXnEk5fq9a+w0fCWO 12mfP888Ved7DqqJFW6edcjTBUheSg6wc5Rb89JvRBW/lm8Apl7fXDaH7J5vNfnQpkirHm yVQMSXLVSrXCYcK5CBrje3d+aQECeQI1ieZvNtW51wZrwfaIpZGok5nVFcJQGukQFQ+q3w sGY9+WF3aEgcHqX4FKReZJyCvrQMeWjXqUjYWasxHhU9S/GcOmlxvPrZFdhX7NxtXbmMaE EnHfOkWRlJYcfh72rM0Ur/0H+wStdMFmFvwVtxjJ2p7Dt9L478qcvE7YJNVLZA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=T2diYA2P; 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" 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 EC03476816 for ; Mon, 02 Sep 2024 00:24:59 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skszI-00014d-H2; Sun, 01 Sep 2024 18:24:00 -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 1skszG-00014N-Me for emacs-orgmode@gnu.org; Sun, 01 Sep 2024 18:23:58 -0400 Received: from mail-vk1-xa2d.google.com ([2607:f8b0:4864:20::a2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1skszE-0004v0-Ha for emacs-orgmode@gnu.org; Sun, 01 Sep 2024 18:23:58 -0400 Received: by mail-vk1-xa2d.google.com with SMTP id 71dfb90a1353d-4fcfd6b870aso1297026e0c.0 for ; Sun, 01 Sep 2024 15:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725229435; x=1725834235; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=L5VaKT2Os2Shyo/rAxqxZLYZeJ5Ryzo+40TRK8OMv5I=; b=T2diYA2P4zOBZLuEnVDefq3vbcjLKlM63FWa0VPOUKH0TEXXMfSX7AajC/qy6e7f8q PmSBGQO64SWOn8Pi7ztjmp53OApEymXwKDx0wAQa7tH8cWvxko5t1p0RIhpFoXsG8wvy qetC0PfKd4M+9ewABH9YoG2QOCq0oEF5ZT9ZOzff4+Gx09Ge1mAjEklqydNAlgqSOwfy xRVqFXqTODFgqCuJ5jckWrS58//ELWYDQCRtHVK0MYO3xO7kbfEDpuIy5z//ebW071d1 6sEfPm8sUJQXt1Uqp7nMu6D8yc4AUYfrpQrYF8LWyqjKkMVNctYN0JLDJs3Oe4CNDH/Y qaqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725229435; x=1725834235; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=L5VaKT2Os2Shyo/rAxqxZLYZeJ5Ryzo+40TRK8OMv5I=; b=T50wQo2U1fWTww+sEmX5IJL8RoaeQbUip3m9oJ3p8e56aFotscylyCcuxF/fu8w9T+ OcYMOn/vllr3WOT88+iESRkrh9kMtuJ7iFuQPUEDTPd5r0r6qRQADAsDWYSK7MuZOfpC eLYWapdP1+ufboQG5qyKQKLSEIUGoulDKG+CS1bl6+f2G6GrysIhy3NWqMlCXJ7bI0Uu 7sGuOzt86Z5C+yoXhXhvhEDgcWvtBxa6Kejytj/RN0YmLWaFF1tbFwXM8Lp5XfnSFkuN DtXDPHhh0tOKpMPzVIzV3NtbTQBCpbUZ1MjZc9a1sKq5dURxkAwJ0+A34Dz/EWBPyTLD 7AVQ== X-Gm-Message-State: AOJu0Yx/z9y2lQ40lsrUzgIWM9YwMmxGqNBRQ5DEOoir0btLxfh9qr7s 0iruX9t8qvM9lMB3PsjvivLkdHwqqMsbfRG5Ju1jF0zq+E0dNf5BQEAxdGwB5b1MudWxG8QVwhV oBGfziHf67Qnrw7g9JHulbGIxrUkL3pBE X-Google-Smtp-Source: AGHT+IGVVzh+7tP67tI9TCccHEiAz2bK0qLlvo4FfYUVTgWNQy2t+TA0t0MDGHUjxjzgUYoAh5DaO/xgtf0Ymmvc+X8= X-Received: by 2002:a05:6122:88f:b0:4f5:27ac:ce6e with SMTP id 71dfb90a1353d-500aad6f546mr4573725e0c.7.1725229434874; Sun, 01 Sep 2024 15:23:54 -0700 (PDT) MIME-Version: 1.0 References: <87seujpc7p.fsf@localhost> In-Reply-To: <87seujpc7p.fsf@localhost> From: Daniel Radetsky Date: Sun, 1 Sep 2024 15:23:44 -0700 Message-ID: Subject: Re: Adding a class to the auto-inserted
elements To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000009f3341062116476c" Received-SPF: pass client-ip=2607:f8b0:4864:20::a2d; envelope-from=dradetsky@gmail.com; helo=mail-vk1-xa2d.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.80 X-Spam-Score: -6.80 X-Migadu-Queue-Id: EC03476816 X-Migadu-Scanner: mx11.migadu.com X-TUID: 9GyNG4PM2tPT --0000000000009f3341062116476c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > But there is nothing wrong on Org side per se, right? I don't think so. The fact that ox-html inserts a
there with no way for me as the user to disable this, in my view, bad. It's not a totally unreasonable default, but it shouldn't be required. > The fact that some specific suggestion... This is an example of "motivation"; a specific concrete use-case that actually came for the user to demonstrate that the issue is not merely theoretical. > What would be the benefit of doing this beyond fixing your personal use case? Other users might also have the same use case. Either the specific thing I'm trying to do, or just a need to generate
  • elements from headlines without auto-inserting
    elements for any other purpose. > Also, you can always use p > a CSS selector. What's wrong with that? As a user, I would like to be able to apply a css selector to the elements in question 0. With extremely high confidence that I am selecting _only_ the specific
    elements which org is auto-inserting in this case 1. Without having to do much understanding of the way org generates html exports, or much thinking in general. It did turn out that in the case of my specific document (which was pretty simple), the selector `ul.org-ul li br` did in fact select only those elements. But was this guaranteed? Even for arbitrarily complex documents? Maybe, but proving this requires way more thinking than makes sense to me. Much easier to just tag those elements with a class. Especially since we already add classes like `.org-ul`. On Sun, Sep 1, 2024 at 9:30=E2=80=AFAM Ihor Radchenko = wrote: > Daniel Radetsky writes: > > > So I was exporting an Org doc to html the other day, and I was trying t= o > > follow this guide to make the list elements appear as a comma-separated > list > > > > https://markheath.net/post/css-comma-separated-list > > > > It didn't work, and I discovered this was because Org adds a
    eleme= nt > > to the
  • element if the
  • element is created from an Org headline > > element. > > But there is nothing wrong on Org side per se, right? The fact that some > specific suggestion from the internet did not work for a specific > HTML that happened to be created by Org mode, does not mean that we need > to fix Org mode. Unless the change you suggest may benefit many Org > users, of course. > > > ... The easiest way to fix this and allow the aforementioned guide to > > work is by ensuring that all those
    elements have `display: none` s= et > > via CSS. To make this easier and/or reduce the risk of accidentally > > removing other elements, we can add a class name to those
    's the wa= y > we > > do to other elements. > > What would be the benefit of doing this beyond fixing your personal use > case? > For other Org users. > > Also, you can always use p > a CSS selector. What's wrong with that? > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > --0000000000009f3341062116476c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
    >=C2=A0But the= re is nothing wrong on Org side per se, right?

    I don't think so. The fact that ox-html inserts a <br> th= ere with no way for me as the user to disable this, in my view, bad. It'= ;s not a totally unreasonable default, but it shouldn't be required.

    > The fact that some=C2=A0specific suggestion...

    This is an example of "motivation"; a specific concrete use-= case that actually came for the user to demonstrate that the issue is not m= erely theoretical.

    >=C2=A0What= would be the benefit of doing this beyond fixing your personal use case?

    Other users might also have the same use= case. Either the specific thing I'm trying to do, or just a need to ge= nerate <li> elements from headlines without auto-inserting <br>= elements for any other purpose.

    >= =C2=A0Also, y= ou can always use p > a CSS selector. What's wrong with that?=

    As a user, I would like to be able to apply = a css selector to the elements in question

    0. With extremely high confidence that I am selecting _only_ the specif= ic <br> elements which org is auto-inserting in this case

    1. Without having to do much understanding of th= e way org generates html exports, or much thinking in general.
    =

    It did turn out that in the case of my specific doc= ument (which was pretty simple), the selector `ul.org-ul li br` did in fact select only = those elements. But was this guaranteed? Even for arbitrarily complex docum= ents? Maybe, but proving this requires way more thinking than makes sense t= o me. Much easier to just tag those elements with a class. Especially since= we already add classes like `.org-ul`.


    On Sun, Sep 1, 2024 = at 9:30=E2=80=AFAM Ihor Radchenko <yantar92@posteo.net> wrote:
    Daniel Radetsky <dradetsky@gmail.com> writes:

    > So I was exporting an Org doc to html the other day, and I was trying = to
    > follow this guide to make the list elements appear as a comma-separate= d list
    >
    > https://markheath.net/post/css-comma-separat= ed-list
    >
    > It didn't work, and I discovered this was because Org adds a <b= r> element
    > to the <li> element if the <li> element is created from an= Org headline
    > element.

    But there is nothing wrong on Org side per se, right? The fact that some specific suggestion from the internet did not work for a specific
    HTML that happened to be created by Org mode, does not mean that we need to fix Org mode. Unless the change you suggest may benefit many Org
    users, of course.

    > ... The easiest way to fix this and allow the aforementioned guide to<= br> > work is by ensuring that all those <br> elements have `display: = none` set
    > via CSS. To make this easier and/or reduce the risk of accidentally > removing other elements, we can add a class name to those <br>&#= 39;s the way we
    > do to other elements.

    What would be the benefit of doing this beyond fixing your personal use cas= e?
    For other Org users.

    Also, you can always use p > a CSS selector. What's wrong with that?=

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