emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Vikas Rawal <vikaslists@agrarianresearch.org>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Bug: begin_src org :results replace does not work
Date: Mon, 29 May 2017 10:06:58 -0700	[thread overview]
Message-ID: <alpine.OSX.2.20.1705290949090.772@charles-berrys-macbook.local> (raw)
In-Reply-To: <CAFVt51+FF7ky5ZUEks3miuqDfoV--9wnzgNU7pFNUyzifG6yEw@mail.gmail.com>

On Mon, 29 May 2017, Vikas Rawal wrote:

> Why does the replace keyword not work? It prepends the results. I have
> tried both ":results value replace" and ":results output replace".
>
> I am on org-version 9.0.7
>
> Vikas
>
>
>
>
> #+NAME: one
> #+BEGIN_SRC org :results value replace export both
> ,#+NAME: table-yield
> ,#+CAPTION: Simple table created using latex tabular environment
> ,#+attr_latex: :environment tabular :width \textwidth :align lrr
>    | State          | Variable one | Varia two |
>    |----------------+---------------+----------------|
>    | MP             |           672 |          13000 |
>    | Har            |           300 |          25000 |
>    | Pun            |           260 |          35000 |
> #+End_SRC
>

The problem is that the results you generate is a table with affiliated 
keywords NAME and CAPTION and ATTR_[backend].

`org-at-table-p' does not recognize that the keywords are followed by a 
table.  Altering this function might be asking for trouble as it is used 
outside babel.

So maybe the cond test should refer to `org-element-context' to better 
sort this out and correctly identify the table end.

Unless/until this happens you can use `:wrap org src'.

HTH,

Chuck

p.s. M-x org-lint RET shows you forgot the `:' before `export'

  reply	other threads:[~2017-05-29 17:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29  1:56 Bug: begin_src org :results replace does not work Vikas Rawal
2017-05-29 17:06 ` Charles C. Berry [this message]
2017-05-29 23:24   ` Vikas Rawal
2017-05-29 23:59     ` Charles C. Berry
2017-05-31 14:15   ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.20.1705290949090.772@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=vikaslists@agrarianresearch.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).