From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kGoqJlOcWmF+4AAAgWs5BA (envelope-from ) for ; Mon, 04 Oct 2021 08:16:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yBLgIVOcWmENFAAAbx9fmQ (envelope-from ) for ; Mon, 04 Oct 2021 06:16:51 +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 D479429720 for ; Mon, 4 Oct 2021 08:16:50 +0200 (CEST) Received: from localhost ([::1]:41500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXHHM-00045g-JJ for larch@yhetil.org; Mon, 04 Oct 2021 02:16:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXHFT-00045Y-3s for emacs-orgmode@gnu.org; Mon, 04 Oct 2021 02:14:51 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:38654) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXHFR-0000e2-G6 for emacs-orgmode@gnu.org; Mon, 04 Oct 2021 02:14:50 -0400 Received: by mail-pl1-x62f.google.com with SMTP id x4so10368288pln.5 for ; Sun, 03 Oct 2021 23:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=mMFgb3K89BjaZfn7DknG8PDFtJXsk7wTRVgkzpHbxbY=; b=HG2rVGyUnyTe50PLHfXMrkLiCHaaoMVwLN0FcTLocTZ/2T0EWE4im2d9RygQe5Vcnj qnqlcJW5u42th1LWPxDHd5knnnt7MrQJEb7M+MG+vzNcVu4OGItS2nWaZhiZe+rsNrHj oehjxvkeZ+cy6KxO7XcnDReDYdh7t4Q831yPK1P3Wo21odzq9Bc6NjOoYeeFopsVy9mR TqloHo69v+xUINgYH57IXRaIAb03mSLTHx3aQF46/1C/rRXg0EekN3CabOV9x2G/8MPV ZrEGnHk3IHiR/V+/nq/A8xsDyHeC6R7JL5MZgCGCTv1SajxvNO40jPY+kk/HN2UfaRjA HCDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=mMFgb3K89BjaZfn7DknG8PDFtJXsk7wTRVgkzpHbxbY=; b=zZhtTkrXKMAlwqqTKyiEPCGRKjPU+gDXxEUTwbEpVfORT8dx3aNPgoCxs0hvevRneW v3veK3aeqnAxcsKyFFJ43HUKJSGPt/Xh0wyTt8Tv7jpjGPDGB9BEoCS/ho1Iz2so0VK0 M0aoHxvkZILKKQ3AmkH3wt8llQEHpyASEHG4yOugaRA2rlgG7nqqVwy7zvKkSSJNe6Dp Ol7OQ85MvEp6cKbenhlntSD0ASHoHEBcqzXpfqfI2ef58iZwVoMlHNieLbk3JUpvtdah Ds7cFIiGSROCFxf/I48OoCGiya6ngPjPGeGWRd4gr0QafJlx6yK6pIrIxMt8GtosqezV wbUw== X-Gm-Message-State: AOAM532xE8ACHBOG5V3UBU5lZFtfSiy5i2DNbRbhaO+xR2rcuq8cVlqO 9LJ6fErE4A5dOLX0AJ5qlskaCOu1yzE= X-Google-Smtp-Source: ABdhPJz4zYjNgKri9Y0729EpKpz/qh5w34vZ8mermXHej3TABIAU9/iIGpju1oDEPsJhOwp52sm7iQ== X-Received: by 2002:a17:90a:16:: with SMTP id 22mr35657090pja.25.1633328087265; Sun, 03 Oct 2021 23:14:47 -0700 (PDT) Received: from localhost (61-245-128-160.3df580.per.nbn.aussiebb.net. [61.245.128.160]) by smtp.gmail.com with ESMTPSA id d24sm12941508pgv.52.2021.10.03.23.14.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 23:14:46 -0700 (PDT) References: <87czoq7z3p.fsf@gmail.com> <87tui1ew1o.fsf@nicolasgoaziou.fr> <871r5599j7.fsf@gmail.com> <87pmspevjy.fsf@nicolasgoaziou.fr> <87bl49kca3.fsf@gmail.com> User-agent: mu4e 1.6.5; emacs 28.0.50 From: Timothy To: Org Mode List Subject: Re: [PATCH] Don't fill displayed equations Date: Mon, 04 Oct 2021 14:05:56 +0800 In-reply-to: <87bl49kca3.fsf@gmail.com> Message-ID: <87k0itgvu4.fsf@gmail.com> 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::62f; envelope-from=tecosaur@gmail.com; helo=mail-pl1-x62f.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: , 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=1633328211; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=mMFgb3K89BjaZfn7DknG8PDFtJXsk7wTRVgkzpHbxbY=; b=e3dfaG2o4OtUjIi51OiucWsDNS+hcZ+xUfXqLL/HOSp0xrQPr6wxh0a7LFFF3mnR5pwFA1 jpgy5Yvc4mqnjYQZsrJRRjBbrrmkNziBfaPlivA27XMrugsh84UrOrV6GmNjuoHF6BFiW9 4Pis/C/V3KzZCnq0CTVpGNjsxcAIbI5K6YN1rwon1sawAKRgMXC3+sLoX9E4TqCei59ZgQ d6IOgJ25aZ8f4JJA5/iZJo/gbUKYlI+VHyWQq1fsecJ2U2VhHEaOtIyPaau5BvpwxTPrQn kQc4w3vmLMJP8yrH+f5y6nvZmUJ5i+2Jc9asdJLMXDqvVimwmCZGH4bkSFwRQQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633328211; a=rsa-sha256; cv=none; b=FvDoKV7aNlpRdd0oQOUDISRP7LewLzX1SR5Q7GMEQwvwZVc4NQRhyiwDeHDMzhFJUdJJJN hMdzXBOe/Z6ycSejDeRchGKYZXOJFUuObDWMwJDq+Y8dj8Vz34QvcjX0CirKtRRNAwoyLT poHyOv+VsnLmzZiz7Ss9X2zZvjPS4Qr/U6BBPy1ru+dD46ASFBi9dTmrMtD4BJJ4759Z33 DVXWq1958orsg+UZoWId9IfjLzZcOxy7DphXnewZKgyzYaI8ichN5dqIUfxzoLO9dY4Ryu oDVf6OxH8O5MMAwH3gNhimfvcdZtPe0bxp+f/UGZPbdEMSJKWoxVHySM9glSrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HG2rVGyU; 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: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HG2rVGyU; 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: D479429720 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: HHWc32e4/kZh Hi All, Given the way the conversation has evolved I think it may be worth revisiti= ng another viewpoint to see if anybody has any nice ideas. As things are, regardless of the complexities of parsing and inline vs. block elements etc., just considering the user experience when running org-fill on an example like the one below, the behaviour isn't /nice/. Might there be some way we could allow for people who are used to LaTeX and/or like \[ ... \] to have fill behaviour that leaves \[ ... \] blocks alone? My original idea was changing how org-fill works for everyone, the discussion has gone on to changing \[ ... \] to a block element -- both of these seem to have rather significant issues. Ihor came up with the idea of making org-fill something more customisable by the user, so that someone could have this behaviour without making Org behave un-idiomatically for everyone. I proposed maybe just having a setting could be a halfway house between my original patch and his idea. Does anybody have any other thoughts? > If you=E2=80=99re wondering why I=E2=80=99m so opposed to the current beh= aviour, that is probably > best explained by a more realistic demo that what I have in the commit me= ssage. > > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 Since \(\cos\) is an even function, we can negate the numerator= of the argument > =E2=94=82 without changing the result, giving > =E2=94=82 \[ > =E2=94=82 \cos \left( \pi \frac{C_1-x}{2C_1+D} \right) \ , \quad C_1 = =3D \frac{D}{2}. > =E2=94=82 \] > =E2=94=82 this will be positive over \(x \in (0,D)\), and so we can rewri= te \(\tilde{y}\) as, > =E2=94=82 \[ > =E2=94=82 \tilde{y}(x) =3D \frac{2D}{\pi} \log \cos \left( \pi \frac{\f= rac{D}{2}-x}{2D} \right) + C_2. > =E2=94=82 \] > =E2=94=82 Once again considering that \(y(0)=3Dy(D)=3D0\), it is clear th= at > =E2=94=82 \[ > =E2=94=82 C_2 =3D - \frac{2D}{\pi} \log \cos \left( \frac{\pi}{4} \righ= t) =3D - \frac{2D}{\pi} \log 2^{-\frac{1}{2}} =3D \frac{D}{\pi} \log 2. > =E2=94=82 \] > =E2=94=82 The complete solution for \(\tilde{y}\) is hence, > =E2=94=82 \[ > =E2=94=82 \tilde{y} =3D \frac{2D}{\pi} \log \cos \left( \pi \frac{D-2x}= {4D} \right) + \frac{D}{\pi} \log 2. > =E2=94=82 \] > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > is currently filled to > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 Since \(\cos\) is an even function, we can negate the numerator= of the argument > =E2=94=82 without changing the result, giving \[ \cos \left( \pi \frac{C_= 1-x}{2C_1+D} > =E2=94=82 \right) \ , \quad C_1 =3D \frac{D}{2}. \] this will be positive= over \(x \in (0,D)\), > =E2=94=82 and so we can rewrite \(\tilde{y}\) as, \[ \tilde{y}(x) =3D \fr= ac{2D}{\pi} \log \cos \left( \pi > =E2=94=82 \frac{\frac{D}{2}-x}{2D} \right) + C_2. \] Once again consideri= ng that > =E2=94=82 \(y(0)=3Dy(D)=3D0\), it is clear that \[ C_2 =3D - \frac{2D}{\p= i} \log \cos \left( > =E2=94=82 \frac{\pi}{4} \right) =3D - \frac{2D}{\pi} \log 2^{-\frac{1}{2}= } =3D \frac{D}{\pi} \log 2. > =E2=94=82 \] The complete solution for \(\tilde{y}\) is hence, \[ \tilde{= y} =3D \frac{2D}{\pi} \log \cos > =E2=94=82 \left( \pi \frac{D-2x}{4D} \right) + \frac{D}{\pi} \log 2. \] > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 -- Timothy