From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ENQrNrSYy16bWQAA0tVLHw (envelope-from ) for ; Mon, 25 May 2020 10:06:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WHL+MbSYy17mDgAAB5/wlQ (envelope-from ) for ; Mon, 25 May 2020 10:06:44 +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 62A4C940144 for ; Mon, 25 May 2020 10:06:44 +0000 (UTC) Received: from localhost ([::1]:33978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdA0I-0007z5-61 for larch@yhetil.org; Mon, 25 May 2020 06:06:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jd9ze-0007qU-AF for emacs-orgmode@gnu.org; Mon, 25 May 2020 06:06:02 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:40792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jd9zc-0003j4-VI; Mon, 25 May 2020 06:06:02 -0400 Received: by mail-pf1-x42d.google.com with SMTP id v2so3570066pfv.7; Mon, 25 May 2020 03:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version; bh=sC8AwiDct8s7g4f5eaxIEL5F5WIwUSW7Avb8CtHDqDM=; b=T7NC1rVFr9EqP3rx4fr0xBeOX8eg0gi37ruIDshucoKF6DRrhBvdS6Tw+CAxTLsoQr aq4QTyuCQyqLXdDpXPmORCpwhBVm0wZ4uvAeeD5l6Rp9eFBhhleQlQQVCbM7pnQ7O5W3 LEfaX8jNopJRokYwtqdTeeJDgTMJVbJvDb9PzzFzTNhJZGAGio6za6VSTUxcRBRsrBsp utS4xfYroJb1fHzV5p2cmVpwHxqHu1jU7ZXwQI+dcK59jslfyRc7es5TTYeXhNwn5gz/ XvTyyYupaYJi3GWeMBhG7YgiEoexuw6FJVbuElloHNBTVTpfzB/MqbVjzWFNa4GaeN9S hgFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=sC8AwiDct8s7g4f5eaxIEL5F5WIwUSW7Avb8CtHDqDM=; b=L83dqAZhGe48RDh4bY1D6ZtV5Y3w7Jm+riGY7L+yOo4VtZpnanC1/OL9L/08mCVz4k qDt3hX7aOgOEI+rewc4TxS715ZcMxfg5s+/94lA4LiN5EujxFTL0aYjzPyUtyQbB2VS0 dFQC0llqO6R6oEEyExjnafVyOYGWPhIcwpFdIf2aHm0BwrJvKBcoAZLr5teKS3ANjwc/ 4VYQwTZ8IKO2tEkVGWJLRdJ0M8yMSNnblKt5JMWdMRUBTQiegz3rGQJxU0ZnY83o6bzQ 5AcCtp0TAeWmSPoJ4Sy0z7uFJzNu+75S1m66vow0I87Nx4HzhZM+663mmuE6ao7/sVlz bOoA== X-Gm-Message-State: AOAM532671y5iSi9A7rRPRA++2Ao3MkCg1gYqWcu9w6aXA936+jD56XT 3dob0ky/axokZmJBFS4MvsDRXZpafow= X-Google-Smtp-Source: ABdhPJxAn6PAx7D+eUQ7Dr0cI1n8nNDyZoHNC4dSlV6b21cdIhong9zoALc+5SBQ+YR1tDgBZ0fPBw== X-Received: by 2002:a63:1e4c:: with SMTP id p12mr26420142pgm.355.1590401158027; Mon, 25 May 2020 03:05:58 -0700 (PDT) Received: from localhost (180-150-91-8.b4965b.per.nbn.aussiebb.net. [180.150.91.8]) by smtp.gmail.com with ESMTPSA id 141sm12634281pfz.171.2020.05.25.03.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 03:05:57 -0700 (PDT) References: <87zh9xxrww.fsf@gmail.com> <4274FCF8-5304-4B55-9586-0C718DA388D3@getmailspring.com> <87r1v9ceml.fsf@nicolasgoaziou.fr> <871rn8gy40.fsf@gmail.com> <87ftbobbct.fsf@nicolasgoaziou.fr> <87zh9wfish.fsf@gmail.com> User-agent: mu4e 1.4.6; emacs 26.3 From: TEC To: Nicolas Goaziou Subject: Re: (Feature Request) have org-edit-special work inside non-environment LaTeX blocks, i.e. \( \) and \[ \] In-reply-to: <87zh9wfish.fsf@gmail.com> Message-ID: <87v9kkfhx9.fsf@gmail.com> Date: Mon, 25 May 2020 18:05:54 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=tecosaur@gmail.com; helo=mail-pf1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Bastien , "emacs-orgmode@gnu.org" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=T7NC1rVF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Spam-Score: 0.09 X-TUID: k+cLsyTBMxll --=-=-= Content-Type: text/plain; format=flowed I've had another thought :) > Nicolas Goaziou writes: > >> The equivalent code will prevent a user from changing, deleting >> the LaTeX markers, or writing past them : this is not the >> purpose of the functionality. > > That's most helpful, thanks :) > > I'l have a look at that now, in the mean time here's what I hope > will be the penultimate version of this patch :D Thinking about this a bit more, I think this may not actually be desirable behaviour. Why? I considered the case where I've been writing a growing inline equation \( \), realised it should be displayed as an equation instead with \[ \] and edited the LaTeX marks such. I have had similar experiences where while editing an equation \[ \] I've realised it should instead be \begin{align*} \end{align*}. Were the boundary made read-only, I'd have to: - pause editing the mathematics - move to the start/end of the fragment in the org buffer, and edit accordingly - re-start org-edit-latex-fragment/environment on the tweaked LaTeX In my opinion the potential hassle introduced by this outweighs the safety in not being able to modify the LaTeX deliminators. Let me know what you think. Timothy --=-=-= Content-Type: multipart/related; boundary="==-=-=" --==-=-= Content-Type: text/html

I’ve had another thought :)

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> The equivalent code will prevent a user from changing, deleting
>> the LaTeX markers, or writing past them : this is not the
>> purpose of the functionality.
>
> That’s most helpful, thanks :)
>
> I’l have a look at that now, in the mean time here’s what I hope
> will be the penultimate version of this patch :D

Thinking about this a bit more, I think this may not actually be desirable
behaviour.

Why? I considered the case where I’ve been writing a growing inline equation \( \),
realised it should be displayed as an equation instead with \[ \] and edited the
LaTeX marks such. I have had similar experiences where while editing an equation
\[ \] I’ve realised it should instead be \begin{align*} \end{align*}.

Were the boundary made read-only, I’d have to:

  • pause editing the mathematics
  • move to the start/end of the fragment in the org buffer, and edit accordingly
  • re-start org-edit-latex-fragment/environment on the tweaked LaTeX

In my opinion the potential hassle introduced by this outweighs the safety in
not being able to modify the LaTeX deliminators.

Let me know what you think.

Timothy

--==-=-=-- --=-=-=--