emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug header argumednt :file does not produce a file or a link to the file
@ 2019-08-23  1:47 Charles Millar via Emacs-orgmode
  2019-08-23  8:15 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Millar via Emacs-orgmode @ 2019-08-23  1:47 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Org mode version 9.2.5 (release_9.2.5-494-g4848b8 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 59, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) 
of 2019-08-22

ECM

#+begin_src sh :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

#### end of file
EOF

#+end_src

I expect that when I execute the above code block that

	1. An external file test.rec is produced with contents

	# -*- mode: rec -*-

	%rec: somerecord

	Account: something
	Amount: 0.00

	#### end of file

  and

	2. A link to that file is placed below the source code block

Instead all I get is a table and no external file is created

#+RESULTS:
| #     |   -*- | mode: | rec | -*- |
| %rec: | somerecord | | | |
| Account: | sometyhing | | | |
| Amount: | 0.0 | | | |
| #### | end | of | file | |

I reported this earlier but my subject line was not correct.

Charlie Millar

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

* Re: Bug header argumednt :file does not produce a file or a link to the file
  2019-08-23  1:47 Charles Millar via Emacs-orgmode
@ 2019-08-23  8:15 ` Nicolas Goaziou
  2019-08-23 13:37   ` Charles Millar via Emacs-orgmode
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2019-08-23  8:15 UTC (permalink / raw)
  To: Charles Millar via Emacs-orgmode; +Cc: Charles Millar

Hello,

Charles Millar via Emacs-orgmode <emacs-orgmode@gnu.org> writes:

> #+begin_src sh :file test.rec
> cat << EOF
> # -*- mode: rec -*-
>
> %rec: somerecord
>
> Account: something
> Amount: 0.00
>
> #### end of file
> EOF
>
> #+end_src
>
> I expect that when I execute the above code block that
>
> 	1. An external file test.rec is produced with contents
>
> 	# -*- mode: rec -*-
>
> 	%rec: somerecord
>
> 	Account: something
> 	Amount: 0.00
>
> 	#### end of file
>
>   and
>
> 	2. A link to that file is placed below the source code block
>
> Instead all I get is a table and no external file is created

You probably need to specify that the output is a file, which is not the
default for "sh" language. You may want to add ":results file" to the
header of the source block.

Regards,

-- 
Nicolas Goaziou

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

* Re: Bug header argumednt :file does not produce a file or a link to the file
  2019-08-23  8:15 ` Nicolas Goaziou
@ 2019-08-23 13:37   ` Charles Millar via Emacs-orgmode
  2019-08-23 21:43     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Millar via Emacs-orgmode @ 2019-08-23 13:37 UTC (permalink / raw)
  To: emacs-orgmode

On 8/23/19 4:15 AM, Nicolas Goaziou wrote:
> Hello,
> 
> Charles Millar via Emacs-orgmode <emacs-orgmode@gnu.org> writes:
> 
>> #+begin_src sh :file test.rec
>> cat << EOF
>> # -*- mode: rec -*-
>>
>> %rec: somerecord
>>
>> Account: something
>> Amount: 0.00
>>
>> #### end of file
>> EOF
>>
>> #+end_src
>>
>> I expect that when I execute the above code block that
>>
>> 	1. An external file test.rec is produced with contents
>>
>> 	# -*- mode: rec -*-
>>
>> 	%rec: somerecord
>>
>> 	Account: something
>> 	Amount: 0.00
>>
>> 	#### end of file
>>
>>    and
>>
>> 	2. A link to that file is placed below the source code block
>>
>> Instead all I get is a table and no external file is created
> 
> You probably need to specify that the output is a file, which is not the
> default for "sh" language. You may want to add ":results file" to the
> header of the source block.
> 
> Regards,
> 
Thank you, Nicolas. That solved it.

Now a "just curious," comment and question:

I had a few files that used the ECM source code block, just many more 
entries in each. The last time that I evaluated any of them was last 
October and it produced the results I expected, i.e. I did not specify 
":results file"

So, up until October was I just lucky or did something change in Org 
that affected the sh language?

Regards,

Charlie Millar

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

* Re: Bug header argumednt :file does not produce a file or a link to the file
  2019-08-23 13:37   ` Charles Millar via Emacs-orgmode
@ 2019-08-23 21:43     ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2019-08-23 21:43 UTC (permalink / raw)
  To: Charles Millar via Emacs-orgmode; +Cc: Charles Millar

Hello,

Charles Millar via Emacs-orgmode <emacs-orgmode@gnu.org> writes:

> Now a "just curious," comment and question:
>
> I had a few files that used the ECM source code block, just many more
> entries in each. The last time that I evaluated any of them was last
> October and it produced the results I expected, i.e. I did not specify
> ":results file"
>
> So, up until October was I just lucky or did something change in Org
> that affected the sh language?

It changed between Org 9.2 and Org 9.3, for every language. There is an
ORG-NEWS entry about it, namely:

  *** ~:file~ header argument no longer assume "file" ~:results~


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug header argumednt :file does not produce a file or a link to the file
@ 2019-08-24 14:02 Charles Millar via Emacs-orgmode
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Millar via Emacs-orgmode @ 2019-08-24 14:02 UTC (permalink / raw)
  To: mail; +Cc: emacs-orgmode


Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>
> It changed between Org 9.2 and Org 9.3, for every language. There is an
> ORG-NEWS entry about it, namely:
>
>   *** ~:file~ header argument no longer assume "file" ~:results~


Thank you. I read that entry and others concerning ;file prior to
posting and it did not penetrate my thick skull.

Regards,

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

end of thread, other threads:[~2019-08-24 14:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-24 14:02 Bug header argumednt :file does not produce a file or a link to the file Charles Millar via Emacs-orgmode
  -- strict thread matches above, loose matches on Subject: below --
2019-08-23  1:47 Charles Millar via Emacs-orgmode
2019-08-23  8:15 ` Nicolas Goaziou
2019-08-23 13:37   ` Charles Millar via Emacs-orgmode
2019-08-23 21:43     ` Nicolas Goaziou

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