From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Carlos_Garc=C3=ADa?= Subject: Re: [BUG] src_blocks - :wrap blocks not being overwritten Date: Wed, 31 Oct 2018 10:26:12 +0100 Message-ID: References: <95FCF642-1CFF-4DF5-89FC-8A5876889D33@ucsd.edu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000561dd1057982e5a5" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHmlw-00049r-R4 for emacs-orgmode@gnu.org; Wed, 31 Oct 2018 05:26:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHmlv-0006c8-JG for emacs-orgmode@gnu.org; Wed, 31 Oct 2018 05:26:44 -0400 Received: from mail-it1-x136.google.com ([2607:f8b0:4864:20::136]:50404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHmlv-0006Rx-8Y for emacs-orgmode@gnu.org; Wed, 31 Oct 2018 05:26:43 -0400 Received: by mail-it1-x136.google.com with SMTP id k206-v6so17307509ite.0 for ; Wed, 31 Oct 2018 02:26:24 -0700 (PDT) In-Reply-To: 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" To: ccberry@ucsd.edu Cc: emacs-orgmode@gnu.org --000000000000561dd1057982e5a5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Chuck, The `drawer' option is enough to "wrap" results, but it fails to provide the customizability that `special-blocks' offer. For example, `special-blocks' can be iterated with `org-element-map'. From the point of view of theming, wrapped results use faces, such as `org-block-begin-line' than can be nicely customized. The bigger issue is that it "used to work". A few releases ago, wrapped results could be correctly replaced when using ":results replace". I was wondering if the change was intentional or a side-effect of something else. Regards, Carlos On Tue, Oct 30, 2018 at 4:24 PM Berry, Charles wrote: > > > > On Oct 30, 2018, at 3:35 AM, Carlos Garc=C3=ADa wr= ote: > > > > Hi Chuck, > > > > Thanks for looking into this. How difficult/desirable would it be to > create another block such as "wrap-block" for those blocks created with > ":wrap"? > > A `special-block' is a syntactic element. A `wrap-block' is not. > > > > That way, the needed change would be rather elegant: > > > > :line 2478 of ob-core.el: > > | ;; Possible results types. > > | '(drawer example-block export-block fixed-width item > > | plain-list src-block table wrap-block) > > > > What would the repercussions be if `special-block' is added to the list= ? > > > > Few, I think. But except for those special-blocks that have defined > actions they would be ignored upon export. > > the `results' special-block would be ignored, IIUC. > > I suspect what you want is a `drawer', which encloses results without > further consequences that example blocks or export blocks impose. > > HTH, > > Chuck > > > --000000000000561dd1057982e5a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Chuck,

The `drawer' option <= span class=3D"gmail_default" style=3D"font-size:small">is enough to "w= rap" results, but it fails to provide the customizability that `special-blocks' offer.= =C2=A0
For example, `special-blocks' can be iterated with `org-element-ma= p'. From the point of view of theming, wrapped results use faces, such = as `org-block-begin-line' than can be nicely customized.

The bigger is= sue is that it "used to work". A few releases ago, wrapped result= s could be correctly replaced when using ":results replace". I wa= s wondering if the change was intentional or a side-effect of something els= e.

Regards,
Carlos

On Tue, Oct 30, 2018 at 4:24 PM Berry, Charles <ccberry@ucsd.edu> wrote:


> On Oct 30, 2018, at 3:35 AM, Carlos Garc=C3=ADa <carloscg@gmail.com> wrote:
>
> Hi Chuck,
>
> Thanks for looking into this. How difficult/desirable would it be to c= reate another block such as "wrap-block" for those blocks created= with ":wrap"?

A `special-block' is a syntactic element. A `wrap-block' is not.

> That way, the needed change would be rather elegant:
>
> :line 2478 of ob-core.el:
> | ;; Possible results types.
> |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '(= drawer example-block export-block fixed-width item
> |=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0plain-list src-block table wrap-block)
>
> What would the repercussions be if `special-block' is added to the= list?
>

Few, I think. But except for those special-blocks that have defined actions= they would be ignored upon export.

the `results' special-block would be ignored, IIUC.

I suspect what you want is a `drawer', which encloses results without f= urther consequences that example blocks or export blocks impose.

HTH,

Chuck


--000000000000561dd1057982e5a5--