From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Escape mechanism in code and verbatim blocks Date: Sat, 19 Sep 2015 09:37:16 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e011843e8308164052019bfec Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdIKN-00008A-8q for emacs-orgmode@gnu.org; Sat, 19 Sep 2015 09:37:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdIKM-0003Kd-2v for emacs-orgmode@gnu.org; Sat, 19 Sep 2015 09:37:19 -0400 Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]:33543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdIKL-0003KY-Ty for emacs-orgmode@gnu.org; Sat, 19 Sep 2015 09:37:18 -0400 Received: by obbbh8 with SMTP id bh8so55777231obb.0 for ; Sat, 19 Sep 2015 06:37:17 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-org list , Nicolas Goaziou --089e011843e8308164052019bfec Content-Type: text/plain; charset=UTF-8 @Nicolas I am with you on not using non-ascii characters to escape stuff. I like your proposal about escaping in code and verbatim blocks. -- Kaushal Modi On Sep 19, 2015 7:35 AM, "Nicolas Goaziou" wrote: > Kaushal Modi writes: > > > My most common uses are escaping double quotes (") and equals (=) within > > org verbatim blocks (=VERBATIM=) > > > > Examples: > > > > 1. =var=[ZWS]val= > > 2. =[ZWS]"something"[ZWS]= > > > > Here [ZWS] is the 0x200b zero width space unicode char. > > > > I found [ZWS] useful as a generic escape char for org mode. There are few > > other cases where this has been useful, but I can't recall right now. > > > > In any case, what would be the recommended way to escape " and = in the > > above 2 examples? > > As I said, entities can only escape most Org syntax. Verbatim and code > objects are an exception. Here I think we should introduce an escape > mechanism, much like the one used in macro arguments in order to escape > commas. > > For example, in a verbatim object, one only needs to escape "=", using > common "\". Obviously, "\=" constructs can be escaped with "\\=" and so > on. Likewise, in code objects, only "~" needs to be escaped. > > In any case, I don't think Org syntax should rely on non-ASCII > characters. > > Regards, > --089e011843e8308164052019bfec Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

@Nicolas

I am with you on not using non-ascii characters to escape st= uff.

I like your proposal about escaping in code and verbatim blo= cks.

--
Kaushal Modi

On Sep 19, 2015 7:35 AM, "Nicolas Goaziou&q= uot; <mail@nicolasgoaziou.fr> wrote:
Kausha= l Modi <kaushal.modi@gmail.com= > writes:

> My most common uses are escaping double quotes (") and equals (= =3D) within
> org verbatim blocks (=3DVERBATIM=3D)
>
> Examples:
>
> 1. =3Dvar=3D[ZWS]val=3D
> 2. =3D[ZWS]"something"[ZWS]=3D
>
> Here [ZWS] is the 0x200b zero width space unicode char.
>
> I found [ZWS] useful as a generic escape char for org mode. There are = few
> other cases where this has been useful, but I can't recall right n= ow.
>
> In any case, what would be the recommended way to escape " and = =3D in the
> above 2 examples?

As I said, entities can only escape most Org syntax. Verbatim and code
objects are an exception. Here I think we should introduce an escape
mechanism, much like the one used in macro arguments in order to escape
commas.

For example, in a verbatim object, one only needs to escape "=3D"= , using
common "\". Obviously, "\=3D" constructs can be escaped= with "\\=3D" and so
on. Likewise, in code objects, only "~" needs to be escaped.

In any case, I don't think Org syntax should rely on non-ASCII
characters.

Regards,
--089e011843e8308164052019bfec--