Re: [O] Bug: various short questions about column view, code blocks and export [8.3.4 (release_8.3.4-759-g9508dc @ /home/youngfrog/sources/org-mode/lisp/)]

2016-04-28 Thread Nicolas Goaziou
Hello,

Nicolas Richard  writes:

> The inlined file below contains both the material needed to reproduce
> the problems I have and a description of those.
>
> * a tree with some info for column view
>   :PROPERTIES:
>   :ID:   monid
>   :COLUMNS:  %25ITEM %PROP
>   :END:
> ** foo
>:PROPERTIES:
>:PROP: yow
>:END:
> ** bar
>:PROPERTIES:
>:PROP: bow
>:END:
> ** baz
>:PROPERTIES:
>:PROP: low
>:END:
> * show the column view here
> #+BEGIN: columnview :hlines 1 :id monid :skip-empty-rows t
> | ITEM | PROP |
> |--+--|
> | foo  | yow  |
> | bar  | bow  |
> | baz  | low  |
> #+END:
> * use the data from the column view in a src block
> #+BEGIN_SRC elisp :var chap = mytable :exports results
>   'anything
> #+END_SRC
>
> * discussion
> I open this org file with :
> : emacs -q -L ~/sources/org-mode/lisp -l org.el --eval '(setq 
> org-export-babel-evaluate nil)' tmp/mytest.org
> where tmp/mytest.org is the name of the file.
>
> First, I notice that adding the :ARCHIVE: tag to the first headline
> and trying to show column view doesn't work. it seems to do
> nothing. Ok so let's remove that tag again.

This is a feature. Archived subtrees are ignored when calling column
view. As you noticed, in this case, removing the tag is the way to go.

> Now, hitting =C-c C-c= in the code block gives ~Reference not
> found~. Which reference is it ? IDK.

There is no #+NAME: mytable in your example.

> Removing the TBLNAME line and hitting =C-c C-c= on the code block
> again now gives ~Reference `mytable' not found in this buffer~. I
> guess it's a better error ?

OK, so I guess there wase a TBLNAME line somewhere within the file. Be
sure it is located above the table, not above the dynamic block.

> Now when I'm trying to export, I get the same errors as above, even
> though I have =org-export-babel-evaluate= set to =nil=.

This is fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: various short questions about column view, code blocks and export [8.3.4 (release_8.3.4-759-g9508dc @ /home/youngfrog/sources/org-mode/lisp/)]

2016-04-28 Thread Nicolas Richard
Nicolas Goaziou  writes:
> This is a feature. Archived subtrees are ignored when calling column
> view. As you noticed, in this case, removing the tag is the way to go.

ok

> There is no #+NAME: mytable in your example.
> OK, so I guess there wase a TBLNAME line somewhere within the file.

Indeed, sorry, it was lost during the testing.

> Be sure it is located above the table, not above the dynamic block.

thanks, I did not realize this was the way to go :

#+BEGIN: columnview :hlines 1 :id monid :skip-empty-rows t
#+TBLNAME: mytable
...
#+END:

(I thought anything between BEGIN and END would be removed on the next
update -- but the TBLNAME line is kept.)

>> Now when I'm trying to export, I get the same errors as above, even
>> though I have =org-export-babel-evaluate= set to =nil=.
>
> This is fixed.

Indeed, thanks!

-- 
Nicolas



[O] Bug: various short questions about column view, code blocks and export [8.3.4 (release_8.3.4-759-g9508dc @ /home/youngfrog/sources/org-mode/lisp/)]

2016-04-28 Thread Nicolas Richard
Hi all,

The inlined file below contains both the material needed to reproduce
the problems I have and a description of those.

* a tree with some info for column view
  :PROPERTIES:
  :ID:   monid
  :COLUMNS:  %25ITEM %PROP
  :END:
** foo
   :PROPERTIES:
   :PROP: yow
   :END:
** bar
   :PROPERTIES:
   :PROP: bow
   :END:
** baz
   :PROPERTIES:
   :PROP: low
   :END:
* show the column view here
#+BEGIN: columnview :hlines 1 :id monid :skip-empty-rows t
| ITEM | PROP |
|--+--|
| foo  | yow  |
| bar  | bow  |
| baz  | low  |
#+END:
* use the data from the column view in a src block
#+BEGIN_SRC elisp :var chap = mytable :exports results
  'anything
#+END_SRC

* discussion
I open this org file with :
: emacs -q -L ~/sources/org-mode/lisp -l org.el --eval '(setq 
org-export-babel-evaluate nil)' tmp/mytest.org
where tmp/mytest.org is the name of the file.

First, I notice that adding the :ARCHIVE: tag to the first headline
and trying to show column view doesn't work. it seems to do
nothing. Ok so let's remove that tag again.

Now, hitting =C-c C-c= in the code block gives ~Reference not
found~. Which reference is it ? IDK.

Removing the TBLNAME line and hitting =C-c C-c= on the code block
again now gives ~Reference `mytable' not found in this buffer~. I
guess it's a better error ?

Now when I'm trying to export, I get the same errors as above, even
though I have =org-export-babel-evaluate= set to =nil=.

I honestly don't know if I'm doing it wrong or if it's org acting weird.

I have Org-mode version 8.3.4 (release_8.3.4-759-g9508dc @ 
/home/youngfrog/sources/org-mode/lisp/) 
I have GNU Emacs 24.5.50.1 (i686-pc-linux-gnu, GTK+ Version 3.14.10) of 
2015-05-18 on localhost

-- 
Nicolas Richard