From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gennady Uraltsev Subject: Bug: ob-eshell session breaks with long running commands [9.3.1 (release_9.3.1-73-g93c11d @ /home/guraltsev/.emacs.d/straight/build/org/)] Date: Wed, 08 Jan 2020 12:53:57 +0000 Message-ID: <87eewa6rdm.fsf@malevich.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43305) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipAqN-0008VN-9p for emacs-orgmode@gnu.org; Wed, 08 Jan 2020 07:53:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipAqK-0001Ty-Se for emacs-orgmode@gnu.org; Wed, 08 Jan 2020 07:53:51 -0500 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:38498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipAqI-0001RU-T1 for emacs-orgmode@gnu.org; Wed, 08 Jan 2020 07:53:48 -0500 Received: by mail-lj1-x22e.google.com with SMTP id w1so3206487ljh.5 for ; Wed, 08 Jan 2020 04:53:46 -0800 (PST) Received: from localhost ([93.92.203.145]) by smtp.gmail.com with ESMTPSA id n11sm1231014ljg.15.2020.01.08.04.53.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 04:53:43 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hello everyone, Org babel eshell does not work well with the :session argument. In particular if the the command does not exit immediately then the results can be arbitrary and can vary from one call to the other. Also, the results often include the actual calling line. Notice that executing things with sh src code does not have this session management problem. So it seems to really be bug. This code illustrates the problem. #+BEGIN_SRC eshell :results output drawer echo test #+END_SRC #+RESULTS: :results: test :end: #+BEGIN_SRC eshell :results output drawer :session test1 echo test #+END_SRC #+RESULTS: :results: test :end: #+BEGIN_SRC eshell :results output drawer sleep 1 ; echo test #+END_SRC #+RESULTS: :results: test :end: #+BEGIN_SRC eshell :results output drawer :session test2 sleep 1 ; echo test #+END_SRC #+RESULTS: :results: ~/Mail $ sleep 1 ; echo test :end: Best, Gennady Emacs : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 2019-08-29 Package: Org mode version 9.3.1 (release_9.3.1-73-g93c11d @ /home/guraltsev/.emacs.d/straight/build/org/) current state: ============== (setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-edit-src-content-indentation 0 org-src-tab-acts-natively t org-odt-format-headline-function 'org-odt-format-headline-default-function org-special-ctrl-a/e t org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-reveal-start-hook '(org-decrypt-entry) org-modules '(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus org-id ol-info ol-irc ol-mhe org-mouse org-protocol ol-rmail ol-w3m ol-eshell ol-git-link ol-man org-toc) org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id org-mode-hook '(#[0 "\205.