emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: :export results does not replace previous results designated block
@ 2016-02-22 19:56 Charles Millar
  2016-02-22 20:17 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Millar @ 2016-02-22 19:56 UTC (permalink / raw)
  To: emacs-orgmode

The last time (last Wednesday or so) I executed the following code

** Some subheading
#+NAME: SCHEDAP
#+begin_src rec :data foo.rec :type Finance :fields 
AssetDate,Description,Basis :results silent
  (File = 'Estate' && AccountSchedule = 'A')
#+end_src
#+RESULTS: SCHEDAP
#+NAME: SCHEDA
#+begin_src emacs-lisp :var table=SCHEDAP :exports results
   (setq table (cons 'hline table))
   (setq table (cons '("Date" "Description" "Inventory Value") table))
   (setq table (append table '(("|Total Schedule A"))))
   (setq table (append table '(("\n#+TBLFM: 
@>$>=vsum(@I$>..@>>$>);%.2f::"))))
   table
#+end_src
#+ATTR_LATEX: :mode table :environment longtable :align 
p{60pt}p{300pt}N{8}{2}
#+TBLNAME: SCHEDA

it produced -

** Some subheading
#+NAME: SCHEDAP
#+begin_src rec :data foo.rec :type Finance :fields 
AssetDate,Description,Basis :results silent
  (File = 'Estate' && AccountSchedule = 'A')
#+end_src
#+RESULTS: SCHEDAP
#+NAME: SCHEDA
#+begin_src emacs-lisp :var table=SCHEDAP :exports results
   (setq table (cons 'hline table))
   (setq table (cons '("Date" "Description" "Inventory Value") table))
   (setq table (append table '(("|Total Schedule A"))))
   (setq table (append table '(("\n#+TBLFM: 
@>$>=vsum(@I$>..@>>$>);%.2f::"))))
   table
#+end_src
#+ATTR_LATEX: :mode table :environment longtable :align 
p{60pt}p{300pt}N{8}{2}
#+TBLNAME: SCHEDA
(Desired table out put here)
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f::

Today, if I execute or evaluate the subheading, the results are not 
substituted into TBLNAME, rather a #+RESULTS: SCHEDA is produced 
followed by #+TBLNAME: SCHEDA, etc.

** Some subheading
#+NAME: SCHEDAP
#+begin_src rec :data foo.rec :type Finance :fields 
AssetDate,Description,Basis :results silent
  (File = 'Estate' && AccountSchedule = 'A')
#+end_src
#+RESULTS: SCHEDAP
#+NAME: SCHEDA
#+begin_src emacs-lisp :var table=SCHEDAP :exports results
   (setq table (cons 'hline table))
   (setq table (cons '("Date" "Description" "Inventory Value") table))
   (setq table (append table '(("|Total Schedule A"))))
   (setq table (append table '(("\n#+TBLFM: 
@>$>=vsum(@I$>..@>>$>);%.2f::"))))
   table
#+end_src

#+RESULTS: SCHEDA
(a new table)
#+TBLFM: @>$>=vsum(@I$>..@>>$>);%.2f::

#+TBLNAME: SCHEDA
#+ATTR_LATEX: :mode table :environment longtable :align 
p{60pt}p{300pt}N{8}{2}
(no table produced or retained)

Org-mode version 8.3.3 (release_8.3.3-644-g84e3f2 @ 
/usr/local/share/emacs/site-lisp/org-mode/lisp/)
GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of 
2015-03-07 on trouble, modified by Debian

Should I change the code blocks or is this a bug? All of tables 
generated by the same or similar code behave the same way - a table 
after #+RESULTS: foobar is , but nothing for #+TBLNAME: foobar.

Charlie Millar

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: :export results does not replace previous results designated block
  2016-02-22 19:56 Bug: :export results does not replace previous results designated block Charles Millar
@ 2016-02-22 20:17 ` Nicolas Goaziou
  2016-02-23 14:15   ` Charles Millar
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-02-22 20:17 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode

Hello,

Charles Millar <millarc@verizon.net> writes:

> The last time (last Wednesday or so) I executed the following code
>
> ** Some subheading
> #+NAME: SCHEDAP
> #+begin_src rec :data foo.rec :type Finance :fields 
> AssetDate,Description,Basis :results silent
>   (File = 'Estate' && AccountSchedule = 'A')
> #+end_src
> #+RESULTS: SCHEDAP
> #+NAME: SCHEDA
> #+begin_src emacs-lisp :var table=SCHEDAP :exports results
>    (setq table (cons 'hline table))
>    (setq table (cons '("Date" "Description" "Inventory Value") table))
>    (setq table (append table '(("|Total Schedule A"))))
>    (setq table (append table '(("\n#+TBLFM: 
> @>$>=vsum(@I$>..@>>$>);%.2f::"))))
>    table
> #+end_src
> #+ATTR_LATEX: :mode table :environment longtable :align 
> p{60pt}p{300pt}N{8}{2}
> #+TBLNAME: SCHEDA

[...]

> Should I change the code blocks or is this a bug? All of tables 
> generated by the same or similar code behave the same way - a table 
> after #+RESULTS: foobar is , but nothing for #+TBLNAME: foobar.

What happens if you replace TBLNAME with NAME?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: :export results does not replace previous results designated block
  2016-02-22 20:17 ` Nicolas Goaziou
@ 2016-02-23 14:15   ` Charles Millar
  2016-02-23 14:44     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Millar @ 2016-02-23 14:15 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,

On 02/22/2016 03:17 PM, Nicolas Goaziou wrote:
> Hello,
>
> Charles Millar <millarc@verizon.net> writes:
>
>> The last time (last Wednesday or so) I executed the following code
>>
>> ** Some subheading
>> #+NAME: SCHEDAP
>> #+begin_src rec :data foo.rec :type Finance :fields
>> AssetDate,Description,Basis :results silent
>>    (File = 'Estate' && AccountSchedule = 'A')
>> #+end_src
>> #+RESULTS: SCHEDAP
>> #+NAME: SCHEDA
>> #+begin_src emacs-lisp :var table=SCHEDAP :exports results
>>     (setq table (cons 'hline table))
>>     (setq table (cons '("Date" "Description" "Inventory Value") table))
>>     (setq table (append table '(("|Total Schedule A"))))
>>     (setq table (append table '(("\n#+TBLFM:
>> @>$>=vsum(@I$>..@>>$>);%.2f::"))))
>>     table
>> #+end_src
>> #+ATTR_LATEX: :mode table :environment longtable :align
>> p{60pt}p{300pt}N{8}{2}
>> #+TBLNAME: SCHEDA
> [...]
>
>> Should I change the code blocks or is this a bug? All of tables
>> generated by the same or similar code behave the same way - a table
>> after #+RESULTS: foobar is , but nothing for #+TBLNAME: foobar.
> What happens if you replace TBLNAME with NAME?
>
>
Same results. I have avoided changing TBLNAME to NAME, though I am not 
sure if I have any reason other than habit.

Best,

Charlie

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: :export results does not replace previous results designated block
  2016-02-23 14:15   ` Charles Millar
@ 2016-02-23 14:44     ` Nicolas Goaziou
  2016-02-23 17:34       ` Charles Millar
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-02-23 14:44 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode

Hello,

Charles Millar <millarc@verizon.net> writes:

> On 02/22/2016 03:17 PM, Nicolas Goaziou wrote:
>> Hello,
>>
>> Charles Millar <millarc@verizon.net> writes:
>>
>>> The last time (last Wednesday or so) I executed the following code
>>>
>>> ** Some subheading
>>> #+NAME: SCHEDAP
>>> #+begin_src rec :data foo.rec :type Finance :fields
>>> AssetDate,Description,Basis :results silent
>>>    (File = 'Estate' && AccountSchedule = 'A')
>>> #+end_src
>>> #+RESULTS: SCHEDAP
>>> #+NAME: SCHEDA
>>> #+begin_src emacs-lisp :var table=SCHEDAP :exports results
>>>     (setq table (cons 'hline table))
>>>     (setq table (cons '("Date" "Description" "Inventory Value") table))
>>>     (setq table (append table '(("|Total Schedule A"))))
>>>     (setq table (append table '(("\n#+TBLFM:
>>> @>$>=vsum(@I$>..@>>$>);%.2f::"))))
>>>     table
>>> #+end_src
>>> #+ATTR_LATEX: :mode table :environment longtable :align
>>> p{60pt}p{300pt}N{8}{2}
>>> #+TBLNAME: SCHEDA
>> [...]
>>
>>> Should I change the code blocks or is this a bug? All of tables
>>> generated by the same or similar code behave the same way - a table
>>> after #+RESULTS: foobar is , but nothing for #+TBLNAME: foobar.
>> What happens if you replace TBLNAME with NAME?
>>
>>
> Same results. I have avoided changing TBLNAME to NAME, though I am not
> sure if I have any reason other than habit.

The problem is that TBLNAME is deprecated and very confusing. 

Actually, here, you seem to be using it as #+RESULTS: (which is
different from #+NAME). You should replace it with #+RESULTS, since you
want to insert the /results/ of "SCHEDA" code evaluation below.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: :export results does not replace previous results designated block
  2016-02-23 14:44     ` Nicolas Goaziou
@ 2016-02-23 17:34       ` Charles Millar
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Millar @ 2016-02-23 17:34 UTC (permalink / raw)
  To: emacs-orgmode



On 02/23/2016 09:44 AM, Nicolas Goaziou wrote:
> Hello,
>
> Charles Millar <millarc@verizon.net> writes:
>
>> On 02/22/2016 03:17 PM, Nicolas Goaziou wrote:
>>> Hello,
>>>
>>> Charles Millar <millarc@verizon.net> writes:
>>>
>>>> The last time (last Wednesday or so) I executed the following code
>>>>
>>>> ** Some subheading
>>>> #+NAME: SCHEDAP
>>>> #+begin_src rec :data foo.rec :type Finance :fields
>>>> AssetDate,Description,Basis :results silent
>>>>     (File = 'Estate' && AccountSchedule = 'A')
>>>> #+end_src
>>>> #+RESULTS: SCHEDAP
>>>> #+NAME: SCHEDA
>>>> #+begin_src emacs-lisp :var table=SCHEDAP :exports results
>>>>      (setq table (cons 'hline table))
>>>>      (setq table (cons '("Date" "Description" "Inventory Value") table))
>>>>      (setq table (append table '(("|Total Schedule A"))))
>>>>      (setq table (append table '(("\n#+TBLFM:
>>>> @>$>=vsum(@I$>..@>>$>);%.2f::"))))
>>>>      table
>>>> #+end_src
>>>> #+ATTR_LATEX: :mode table :environment longtable :align
>>>> p{60pt}p{300pt}N{8}{2}
>>>> #+TBLNAME: SCHEDA
>>> [...]
>>>
>>>> Should I change the code blocks or is this a bug? All of tables
>>>> generated by the same or similar code behave the same way - a table
>>>> after #+RESULTS: foobar is , but nothing for #+TBLNAME: foobar.
>>> What happens if you replace TBLNAME with NAME?
>>>
>>>
>> Same results. I have avoided changing TBLNAME to NAME, though I am not
>> sure if I have any reason other than habit.
> The problem is that TBLNAME is deprecated and very confusing.
>
> Actually, here, you seem to be using it as #+RESULTS: (which is
> different from #+NAME). You should replace it with #+RESULTS, since you
> want to insert the /results/ of "SCHEDA" code evaluation below.
>
>
Thanks, Nicolas.

I'll change all TBLNAME's to RESULTS; it seems to work. (There are files 
that go back to 2010 or so.)

I was aware of the deprecation; it just that I was getting away with 
using TBLNAME and hoped that I could continue to do so. Well, it caught 
up with me in the past four or five days.

Charlie

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-23 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22 19:56 Bug: :export results does not replace previous results designated block Charles Millar
2016-02-22 20:17 ` Nicolas Goaziou
2016-02-23 14:15   ` Charles Millar
2016-02-23 14:44     ` Nicolas Goaziou
2016-02-23 17:34       ` Charles Millar

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).