Re: [O] [BUG] src_blocks - :wrap blocks not being overwritten
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ía wrote: > > > > 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 > > >
Re: [O] [BUG] src_blocks - :wrap blocks not being overwritten
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"? 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? Regards, Carlos On Mon, Oct 29, 2018 at 5:01 PM Berry, Charles wrote: > > > > On Oct 24, 2018, at 2:29 PM, Carlos García wrote: > > > > Hi List, > > > > The functionality of replacing blocks using ":wrap" seems to be broken. > > In this email [1] from 2014, a user reported that this was working: > > > > , > > | * A > > | > > | #+header: :results raw replace :wrap > > | #+begin_src emacs-lisp > > | (+ 2 2) > > | #+end_src > > | > > | #+results: > > | #+BEGIN_RESULTS > > | 4 > > | #+END_RESULTS > > ` > > > > i'm running orgmode 9.1.14 and the "BEGIN_RESULTS" blocks are not > getting overwritten. Can anybody else reproduce this problem? > > > > > Confirmed. > > The issue is that the #+BEGIN/END_results is a `special-block', which is > not recognized in `org-babel-result-end' as a result type. > > I think the fix is to add it. > > If the intention is to NOT recognize special-blocks as results, then the > empty :wrap needs to have some other effect, like enclosing the result in a > drawer. > > HTH, > > Chuck > >
[O] [BUG] src_blocks - :wrap blocks not being overwritten
Hi List, The functionality of replacing blocks using ":wrap" seems to be broken. In this email [1] from 2014, a user reported that this was working: , | * A | | #+header: :results raw replace :wrap | #+begin_src emacs-lisp | (+ 2 2) | #+end_src | | #+results: | #+BEGIN_RESULTS | 4 | #+END_RESULTS ` i'm running orgmode 9.1.14 and the "BEGIN_RESULTS" blocks are not getting overwritten. Can anybody else reproduce this problem? Regards, Carlos [1]: http://lists.gnu.org/archive/html/emacs-orgmode/2014-07/msg00122.html