From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qEKiE5amGWEyLAEAgWs5BA (envelope-from ) for ; Mon, 16 Aug 2021 01:43:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iJU3D5amGWG4fgAAbx9fmQ (envelope-from ) for ; Sun, 15 Aug 2021 23:43:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 824CABED8 for ; Mon, 16 Aug 2021 01:43:17 +0200 (CEST) Received: from localhost ([::1]:59402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFPmc-0002We-Oc for larch@yhetil.org; Sun, 15 Aug 2021 19:43:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFPkq-0002WV-4J for emacs-orgmode@gnu.org; Sun, 15 Aug 2021 19:41:24 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:36419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFPkm-0006c1-UR for emacs-orgmode@gnu.org; Sun, 15 Aug 2021 19:41:23 -0400 Received: by mail-pl1-x635.google.com with SMTP id f3so18838024plg.3 for ; Sun, 15 Aug 2021 16:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pdx-edu.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=IYU4owMSwwz4iCY1kopQlfD5fMookHJZ89kSW00TM+U=; b=R88mhy4qAEddX46cjUwYBvJb9S2fn9a0X32TyO520tCt1DYpEw8pOpvDLTQaYs7b0R FnoJ/3NLl8pnlO6yZq5SPVADMFNVPPR/pqhMBeSlS3BvTdpEzyvphYu6UYjuaFNNW9jh 3tBFJOugcJ9f6LZ3V5lq35sgIQ2aBFOne8AAeAgdmm3ZGDrNvdXZ61xwWaDOs+vSrFT2 RmcXrHzUFunvwzCt6N64zqF1rqH3xun2zhweuOzcKgf6fqvCb38OkacaaHOH55L8IIdl 9iJLQpzUrP/vFUqNMsMJp6uyYBualHfJr32+3FlS6T/qngx4ebadkU4cQs7GwbOA3vD0 mxeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=IYU4owMSwwz4iCY1kopQlfD5fMookHJZ89kSW00TM+U=; b=iNQy66BNTNVi7dHBQUxVX/0sKauT/UOF+08AiTpHHWeb6wniV6YmXJl7HG577GodFK dAYiDd0M0xlzUH919wC70Zuur03uTiwy3MvN8cviXJ2pbYD4Yk5rhcOF1FRdaW0otrH6 JmXzacVqvX+Ti/pp9R1ipAFQBtSe5v2fB6z51AaZiiz+/VE/l/xqB0X+VbEluzyyhFR3 CDq69PJ4dglPh+Cnpp47tnusWzbiaDVfbY4dqIBp2ag6H6jiHOC1o4e50A1ORjFLN4Ru VHmnp7Xelc99RQozAf0JtcagBJo2l59sAxID1XWcs5VHfbJRkFX1dvIFkCrCgshPENXh Evwg== X-Gm-Message-State: AOAM5328DCliwu7jcyft/Wx4XP2UssbAtjoHcBe9f1TcntJc/kudRTUO cHHg0wVpWKcsq/UG4wfRTwuxthVyNawejCAJfOedw2WtP28c2nK/etdDR5VRfTJiEo7PgtdCmHu RJbSf3o4FURkx2Dl3f28Nlv6xGFTABfar2y3B8u6kgwp5WwKsILXHmyoY9yBoHQ== X-Google-Smtp-Source: ABdhPJzfXPN8bFY7uvqRZIVzUGXqZ+bhNzXlU5sYjliKJpaqNiSw7D6swpZDVeNGMTD49uAJISU8Xw== X-Received: by 2002:a17:902:c3cd:b029:12d:7457:9898 with SMTP id j13-20020a170902c3cdb029012d74579898mr11062709plj.14.1629070878007; Sun, 15 Aug 2021 16:41:18 -0700 (PDT) Received: from [192.168.0.6] (75-164-178-195.ptld.qwest.net. [75.164.178.195]) by smtp.gmail.com with ESMTPSA id w2sm7392470pjq.5.2021.08.15.16.41.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Aug 2021 16:41:17 -0700 (PDT) To: emacs-orgmode@gnu.org From: James Powell Subject: Bug: :session results in unfriendly error reporting Message-ID: <5406173c-742f-1e4c-a8da-2d73b4e668ca@pdx.edu> Date: Sun, 15 Aug 2021 16:41:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=powellj@pdx.edu; helo=mail-pl1-x635.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_DOTEDU=0.387 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629070997; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=IYU4owMSwwz4iCY1kopQlfD5fMookHJZ89kSW00TM+U=; b=F3ggYHS04/kcBxZBq7R4wPJJtj/wsGl0hOvhZJ1BDvAOpKnqmBmSsljNClWiJbyvNR9Cp8 yNZUz28q6w8rqiuNl/c7tHPgPZabf5GA9kZEy4XneLMNyYck5bw2hskujKPWPQaId1tTy3 q22mKD2fTQvAuPcq9ECmdpMP5nJxGiUnZIv3SFQ12F6Glx1O66BNvMTW1nwfqVnUN6OyBk 7tjzXAi55tfXsLQwImhq3XeZem8bXE88uLVVTL9BRAhedz8KhV6LKPxrOxus6W/tE6DdvM VQ479qo6VaIXig6u4u7gK1x6zhRFzXU4CMf0BMvzQ56gnu0X97JZkeg29pkYBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629070997; a=rsa-sha256; cv=none; b=EPq2WV9Xvjv2ze22L3V98gxDavo8/PI/iVPCIWHWJRRPQxoznkLUul05EhT+HWBQJxxbCC LLzUY2okl2zcfkxDNNJxXz9ov5qWQsnZLyVh1hwuwNjwiUPO417ZsuwyTlY3dCQgu/vudd zaYx4ElnJVI+0MeE1+untoY5lWertlezO2Un6fJdOLL/+JdvQawDhbjOVN2caSpxnLwohm nrxMyE856AIxfVakt43jyp8hmJMjQbcV2qRi/OTQHb3EKxSUwKcPNPBeRviAy56B3N7CwN KHMFg6l9BTxs4Ek8reB+AjWEXmmrKnKOJeUtyMy2X6rJrFA7X092ypgyNyqAJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=pdx-edu.20150623.gappssmtp.com header.s=20150623 header.b=R88mhy4q; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pdx-edu.20150623.gappssmtp.com header.s=20150623 header.b=R88mhy4q; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 824CABED8 X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0lloxl4KctLu I write a deliberate syntax error into a code block: : #+begin_src R :session :   x <- 1 :   y xx z : #+end_src I put my cursor in there and C-c C-c. What I expect: a gentle useful report about the error. Maybe even org would move the cursor to the point of the error in the org buffer.  If not, at least the buffer "*Org-Babel Error Output*" will open and show me the error, something like this (see also [1]), : Error: unexpected symbol in: : "x <- 1 : y xx" : -UUU:@**--F2  *Org-Babel Error Output*   All L17    (Compilation etu) 4:13PM 0.53 Mail --------------------------------------------------$ What happens instead: - the *R* buffer is displayed.  It contains a long spammy traceback   that has run off of the top of the screen.  To learn more I have to   move the cursor into the *R* buffer and page back to the top of the   traceback. On the other hand, if I set ":session none", I get much friendlier behavior.  The Error Output buffer opens with the simple error message in it as I showed above when I use this source block: : #+begin_src R :session none :   x <- 1 :   y xx z : #+end_src I do not want to abandon :session because my code reads in a lot of data to get started and I want my scripts, not my environment to be "real" so I am not depending on R's ability to save and reload the workspace at all [2] or on "Org's (clever and useful but) somewhat clunky and inflexible method of passing data explicitly" [3]. Is there a way to get back to the "Error Output" buffer opening with a simple message /while/ having :session being enabled? thank you,   James P. References [1] "Currently the only action Babel takes with STDERR is to display it in a     pop-up buffer when code block evaluation fails" (Eric Schulte in 2012, at https://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00057.html). [2] « what will you save as your lasting record of what happened?   [...[ As a beginning R user, it's OK to consider your environment   [...]  "real."  However, in the long run, you'll be much better off   if you consider your R scripts as "real." » (p. 111, Wickham, H. "R   for data science : import, tidy, transform, visualize, and model   data" O'Reilly Media, 2016).  To facilitate this, I have disabled   'save workspace' permanently:   : q <- function (save = "no", status = 0, runLast = TRUE)   : .Internal(quit(save, status, runLast)) [3] «When I look at Org and think of "session-based" blocks, I see a     potential big benefit in having multiple source-blocks throughout     my document share the same session» (https://lists.gnu.org/archive/html/emacs-orgmode/2011-06/msg00654.html,     the only good hit for a search for "session Org-Babel Error Output" at     https://lists.gnu.org/archive/html/emacs-orgmode/ as of     [2021-08-15 Sun]). -- James E. Powell, MS Pronouns: he/him/his Applied Physics PhD Candidate Department of Physics Portland State University Home page: http://web.pdx.edu/~powellj Office: SRTC 409B Phone: +1-503-725-8515