emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Babel & sh & Windows
@ 2010-12-07 22:08 Srinivas
  2010-12-08  4:03 ` Babel & sh & Windows Michael Gauland
  0 siblings, 1 reply; 4+ messages in thread
From: Srinivas @ 2010-12-07 22:08 UTC (permalink / raw)
  To: emacs-orgmode

Hi

I am trying to learn how to use Babel on a Windows system and need some help.

I would like to produce the directory tree for a given directory (/bin in this 
example).

I tried the following:

#+srcname: directory-tree
#+BEGIN_SRC sh :dir /bin :results output org replace :exports results
tree
#+END_SRC

The output is as given below:

#+results: directory-tree
c:\bin>More? 

My org-babel-sh-command setting is:

(setq org-babel-sh-command "cmd /k")

What do I need to do see some output in the #+results section?

Thanks in advance for you help.
- Srinivas

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

* Re: Babel & sh & Windows
  2010-12-07 22:08 Babel & sh & Windows Srinivas
@ 2010-12-08  4:03 ` Michael Gauland
  2010-12-09 14:51   ` Sébastien Vauban
  2010-12-10 15:52   ` Babel & sh & Windows Srinivas
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Gauland @ 2010-12-08  4:03 UTC (permalink / raw)
  To: emacs-orgmode

Srinivas <sp_us <at> yahoo.com> writes:
> I tried the following:
> #+srcname: directory-tree
> #+BEGIN_SRC sh :dir /bin :results output org replace :exports results
> tree
> #+END_SRC
> 
> The output is as given below:
> 
> #+results: directory-tree
> c:\bin>More? 
> 

I've played with babel a little bit on Windows, and found that adding an extra 
non-blank line at least gets me some output:


#+BEGIN_SRC sh :dir /bin :results output org replace :exports results
tree
echo
#+END_SRC

I haven't taken the time to dig any further into this, but it works 
consistently on my system.

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

* Re: Babel &amp; sh &amp; Windows
  2010-12-08  4:03 ` Babel &amp; sh &amp; Windows Michael Gauland
@ 2010-12-09 14:51   ` Sébastien Vauban
  2010-12-10 15:52   ` Babel &amp;amp; sh &amp;amp; Windows Srinivas
  1 sibling, 0 replies; 4+ messages in thread
From: Sébastien Vauban @ 2010-12-09 14:51 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi,

Michael Gauland wrote:
> Srinivas <sp_us <at> yahoo.com> writes:
>> I tried the following:
>> #+srcname: directory-tree
>> #+BEGIN_SRC sh :dir /bin :results output org replace :exports results
>> tree
>> #+END_SRC
>> 
>> The output is as given below:
>> 
>> #+results: directory-tree
>> c:\bin>More? 

What I do is using Cygwin's shell, instead of cmd.exe (default from MS). That
way, I even get more portable code across machines (-> Ubuntu).

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Babel &amp;amp; sh &amp;amp; Windows
  2010-12-08  4:03 ` Babel &amp; sh &amp; Windows Michael Gauland
  2010-12-09 14:51   ` Sébastien Vauban
@ 2010-12-10 15:52   ` Srinivas
  1 sibling, 0 replies; 4+ messages in thread
From: Srinivas @ 2010-12-10 15:52 UTC (permalink / raw)
  To: emacs-orgmode

Thanks Michael, the extra echo statement did the trick.

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

end of thread, other threads:[~2010-12-10 15:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 22:08 Babel & sh & Windows Srinivas
2010-12-08  4:03 ` Babel &amp; sh &amp; Windows Michael Gauland
2010-12-09 14:51   ` Sébastien Vauban
2010-12-10 15:52   ` Babel &amp;amp; sh &amp;amp; Windows Srinivas

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