emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* stty fails in babel sh blocks, workaround?
@ 2015-04-08 14:45 George Jones
  2015-04-08 18:10 ` Sebastien Vauban
  0 siblings, 1 reply; 2+ messages in thread
From: George Jones @ 2015-04-08 14:45 UTC (permalink / raw)
  To: emacs-orgmode

I'm running some programs that expect to be able to get terminal
settings via (python fragment):

   ioctl(1, termios.TIOCGWINSZ, ' '*8))ioctl(1, termios.TIOCGWINSZ, ' '*8))

however, sh code run under babel appears not to have the terminal device
that's expected:

----------------------------nostty.org----------------------------
* No stty in babel

  #+BEGIN_SRC sh :results output :exports both
  exec 2>&1; date; set -e; # set -x; 
  stty || true
  #+END_SRC

  #+RESULTS:
  : Wed Apr  8 10:33:33 EDT 2015
  : stty: standard input: Inappropriate ioctl for device
------------------------------------------------------------------

I realize this is probably inherent to the design/the way babel works,
but are there any workaround (creating fake terminals, etc)?

Thanks,
---George Jones

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

* Re: stty fails in babel sh blocks, workaround?
  2015-04-08 14:45 stty fails in babel sh blocks, workaround? George Jones
@ 2015-04-08 18:10 ` Sebastien Vauban
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastien Vauban @ 2015-04-08 18:10 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

George Jones wrote:
>   #+BEGIN_SRC sh :results output :exports both
>   exec 2>&1; date; set -e; # set -x; 
>   stty || true
>   #+END_SRC

FYI, `sh' gets replaced by `shell' in Org from master. That should hit
MELPA in a couple of days or weeks.

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2015-04-08 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 14:45 stty fails in babel sh blocks, workaround? George Jones
2015-04-08 18:10 ` Sebastien Vauban

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