From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QBPWMA/sjmAuUgEAgWs5BA (envelope-from ) for ; Sun, 02 May 2021 20:14:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0Eh5LA/sjmBvXgAA1q6Kng (envelope-from ) for ; Sun, 02 May 2021 18:14:39 +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 400518EC3 for ; Sun, 2 May 2021 20:14:39 +0200 (CEST) Received: from localhost ([::1]:34320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldGc2-00022g-1E for larch@yhetil.org; Sun, 02 May 2021 14:14:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGZ6-000142-E9 for emacs-orgmode@gnu.org; Sun, 02 May 2021 14:11:36 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:51929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldGZ3-0002Hl-MI; Sun, 02 May 2021 14:11:36 -0400 Received: by mail-wm1-x336.google.com with SMTP id n205so1142453wmf.1; Sun, 02 May 2021 11:11:32 -0700 (PDT) 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=gydQY4NcOZj/ft/HcUQmvG6A9yWG4ECa58N3mEqrkJw=; b=YV0lKE6yrVzwIEL8hCmdTFckswtaVZOtxxNXV9LbnDbO+suJ9u2dX8DsNlF/P8uuxw PnfGaUcYO39nJEAa0O863UB3OceppFHvb3Pd+2r/NKgcvjapAxNjpupRSM6pjWwJv1qm EiHBZbPsplE2fmgOgS7aS0VwK83/8g6nJYoAyhsL/hcNO+QS2qNVFQjb5KMDsTXrkf5u xal9Bt9tHEjcqlpoDoL7cMKIxYV5q4rPaQC7aSpMRT6Lgz3AU2lHyIa16fhxTgbI5aMT sqf4icE62QfuBE3wRxnDLzM0Ig4yd65Ds5ixt4KG28wSXK9BKeikuaMnQre+Vzn943hN 0svw== 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=gydQY4NcOZj/ft/HcUQmvG6A9yWG4ECa58N3mEqrkJw=; b=ZOoavSNuHIPfNVyWO22XRJWkKe0GcVNrIRefxSPz4wKph4UemINZiBr3yc0yCeQ2Qw 4HxOJDnrdOQa4eRm1IBr50rij4LKx8WQ6n6woCKyDhNSJZ7xb1N6CjIz74pk2qCXS2yA mJ0+Heuyp8v1JGnz6Bjfx3RssswwOXThR/n/i+u04k64LaSwDvkTWRnqNGA8wihtHJUc XVmMYm7BU7prZwOqKEXfyYPUGaa+AfNYRMNKuMbjHX74VxrsnJYIa06uI73aei+Kuj7q FkRPfrV3j9G9PamEzu7/LXSmry8zy71O2KgdRl/DDnaleKJrNA15LPd3cui0vuCkyo5M FF6g== X-Gm-Message-State: AOAM532TUjLsmZflETn60zbg8k7jxMvIUl+H9u0d20VoVPN01ipr+MXE Jnq5Iq+6ApPhxSlR9QAJur0sYQ/TrPvwpJAOI49dR5jCgXo= X-Google-Smtp-Source: ABdhPJykwzQsOK/863CKUpne8a8UPyiSpTXzCZzCa+hmt77t+rnQVUyUdcbXZTbdAcrfPpFCaIRN1JnbtF7kTZwTijQ= X-Received: by 2002:a7b:c4c9:: with SMTP id g9mr21628881wmk.90.1619979091123; Sun, 02 May 2021 11:11:31 -0700 (PDT) MIME-Version: 1.0 References: <878s4x3bwh.fsf@gnu.org> <87czu93zr7.fsf@gnu.org> In-Reply-To: <87czu93zr7.fsf@gnu.org> From: Tom Gillespie Date: Sun, 2 May 2021 11:11:19 -0700 Message-ID: Subject: Re: [POLL] Setting `org-adapt-indentation' to nil by default? To: Bastien Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=tgbugs@gmail.com; helo=mail-wm1-x336.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: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619979279; 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=gydQY4NcOZj/ft/HcUQmvG6A9yWG4ECa58N3mEqrkJw=; b=i8yDpi/ISl2Svurr+g1D6yK+MJyDcoh/+Jff3q8a3y4Qq8QfvED3llnugoJRluOLXV7ch4 7eyhsRW9hE4192NmcsiYvm9KwjUVuvCCp76sURpXrc78KsXQvTqMnGWm3G35DwPIjdMrdG 0yFdI1Kz4Bjzh3V0N1mDY3l7CVsMdpkKEbO/Wj/q+MjVwKoCc3LgoWB2Q+dbrnMS+g/ffl 2PMXrzy4Nti8hQ3xx5WNVZz+FlynnPw0WtYgi+Mp0XoZDqqLTUNRbfga2m+u+gRAHgy0cA N8aYOIfM3LIhcxvHrMigftV1zMuz5C+94bE8SsF7o2Rid6ylkERAgayKxkM38w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619979279; a=rsa-sha256; cv=none; b=j823nB0n/HH62d+1n4e96N//sZdQ/jDClIfsT+BLLJZd9z8pfkXDd5G4LdRhhxCjKSGApj FmFEqozHjHLfJN8poQQpwcUFOMreiXTXKhZZ0XQHQ16kfRfTlPl3Egfg6zhE8tN5G3mm00 CuIoaQkp3Z1UoGA3bxD7npYVnQV8IP4SxbITiOugfdy7kPUjVSmsysTziyt4AdC3g2we9h sdw+1YPCJdJE1A5INffiCmTIN9u5wTymPaxseYXQh1wurUpEgnVJGfxjYoxalMjFMTctiG 6tGOJCeLKpZWSVE4lbO1ZoL6IXV0XrgczzfXPYQbA3vZFdUSdGiXNEXHG2zRmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YV0lKE6y; 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-Spam-Score: -0.66 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YV0lKE6y; 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: 400518EC3 X-Spam-Score: -0.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: qk5fJ1s5HNTG Hi Bastien, Strong +1 here. Users can get the same visual effect without materializing the whitespace into the file. Materializing the whitespace causes many potential issues with source blocks for languages that have significant whitespace, issues with #+begin_src and #+end_src having different levels of indentation (still an issue if you want a block in a plain list), weirdness with noweb, obligatory two pass parsing to get the spacing correct in paragraphs, etc. There are many cases where adapting indentation requires the specification of extremely detailed heuristics that must be followed exactly in order to get at least a consistent parse of a source block. The only sane way forward for a language specification would be to avoid that leading whitespace or avoid trying to specify the interpretation of source blocks in contexts with leading whitespace (src blocks in plain lists may come back to haunt us here). Setting org-adapt-indentation to nil by default would be a major step toward resolving these issues and frankly I couldn't ask for more. Best! Tom PS I have included some notes on the worg/dev/org-syntax.org file that I wrote while working on the formal grammar. I would qualify what I wrote slightly to state that users could in principle have leading whitespace before source blocks but that the behavior of org in such cases would be left unspecified in the not quite nasal demons sense, but that it might be better to have the behavior described below with a note that no attempt to deal with correctly preserving leading whitespace is required, user beware. A final aside: maybe plain lists could have the #+begin_ and #+end_ lines indented to the level of the plain list but maybe not the body? ----------------------------- Eliminate leading whitespace in the canonical representation. There are other ways that make it possible to have the indentation visibility without adding massive complexity to the implementation. The existing implementation can continue to support it, but any other implementation SHALL convert indented sections to the canonical form where there is NO leading whitespace. This eliminates the problem of significant whitespace for everything except plain lists. Users will need a migration path and this will require extensive testing to make sure that the tooling catches as many of the issues as possible. However, the benefits in the long run are vastly reduced complexity without all the risks of accidentally botching an indent somewhere.