From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yQCjLi7oWGENmwAAgWs5BA (envelope-from ) for ; Sun, 03 Oct 2021 01:15:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QFbgKS7oWGELYgAA1q6Kng (envelope-from ) for ; Sat, 02 Oct 2021 23:15:58 +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 53E9E36C8C for ; Sun, 3 Oct 2021 01:15:58 +0200 (CEST) Received: from localhost ([::1]:38092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWoEW-0004Di-BK for larch@yhetil.org; Sat, 02 Oct 2021 19:15:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWoDW-0004DL-IF for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 19:14:54 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:43887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWoDU-0000Iw-OV for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 19:14:54 -0400 Received: by mail-pl1-x632.google.com with SMTP id y1so8617526plk.10 for ; Sat, 02 Oct 2021 16:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=v99vQC9CRoFxSMID2tqK5BY8W4X3hMIdIbnbC+BcNXU=; b=ZwtMNZuluB8ioEbjnA60FDENjeI5PvvGsRxzFNxLlI5pgs4GAoBoV4q+53qaTA5Uxt jGDvYVF2712WvuiWpigwh02p7LRLalO24tyZM/tPZLbmJf42Xg9WgVrPZ0QKzoZiZmUS 2yedgkYKKQHyLGfTzmwPM5bVWhjHRQiP2CyI5xOvmzo7XdFQX0L+LvEKuFSIQ5KsXqNN Irc8jPiveHIgEVs3WovT1+D9SA1aBAgp1MwlYdf+GlZeasbgsVKgs3SDGXe1PWOEv/mP dnW8QEmZy0hNKnU8FHZE/hK2NLrmyhwdHRfpCBNHvffSyAp6tOKCDTVpd283UCc5KMys LoTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=v99vQC9CRoFxSMID2tqK5BY8W4X3hMIdIbnbC+BcNXU=; b=1zPx/wxPmjEIjRaxnI2V+l6FV+B5UqrDs3cfQyokG4r684YxGRZvV6E09eeu9iyIBb t4w6kYIQ0MDMBiG8D3FUWz4+omVvgoI2GjVLWWjwjVuTZogVhaSivTMuFqCoeSZhMNEM weoOPA9vGvUfFYOcRGKyx/c7nTVm/oBDGDqBeIuW8rmbuC8df3u1UYUHFPL7jWq4KdXv mCvIIMFE7qVZYG+Pw5Ycaw9knxH4m9ytvznVzuEg2FlRom5QGeyooWGk1mLk/04OV4uF o7jFePNbok/BBHyRKFqTazd6VFGbt2nDdf8W2pHktEVc0V5CAptl3ETkIJTNv7e0be5C KI+Q== X-Gm-Message-State: AOAM530WtRlvGApJbs/277f8TnU7aTaJfFQDybcrR4OSPYd1ZkFYAqav c2UOmq6b4S211HaFg7H+IPU= X-Google-Smtp-Source: ABdhPJyZwZw8YVFCghufxDccqgWx14czPqHOB6RpaH1EQzm7rQ6wntx9OJEMGOADGdinFZ2wC7PwNQ== X-Received: by 2002:a17:90b:1c82:: with SMTP id oo2mr7220890pjb.53.1633216491147; Sat, 02 Oct 2021 16:14:51 -0700 (PDT) Received: from localhost ([198.27.180.62]) by smtp.gmail.com with ESMTPSA id q8sm4451978pja.52.2021.10.02.16.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 16:14:50 -0700 (PDT) From: Jack Kamm To: Jeremie Juste , Org Mode Subject: Re: [PATCH] async process in R In-Reply-To: <87bl47ox5y.fsf@gmail.com> References: <87zgrzclb5.fsf@debian-BULLSEYE-live-builder-AMD64> <87bl47ox5y.fsf@gmail.com> Date: Sat, 02 Oct 2021 16:14:50 -0700 Message-ID: <875yufow7p.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=jackkamm@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Cc: "Berry, Charles" 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=1633216558; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=v99vQC9CRoFxSMID2tqK5BY8W4X3hMIdIbnbC+BcNXU=; b=GskoVfqs/0O/CUq5GExdI+9kX3eINrY676NQmWdL7A78hTOYUBZs4Bgflmndvf9FhU5Ec0 FMX2hV+3WPHIqYwLXmjun8zxmtPR4VL8/gIhx5W9pTmRFpnnqOIsjkEvMnJ2qXI5Wul0cP VDGHu0C+rws1nZW5n11OcgrcjpQHI1i1pCgxkm4VLTunc49uT7dpwtsPTHwQKgFvrMYUaT 1OZOSIFsIcQyI/u9Fv/V6R86dL6bRMLKud7robQCaWeSOFZjL5YThfnah+IythErouU2mr B8QX5ZrHyf44tEtm4RQhbW/AMRK3j+OxZJu7dBT0pdsXDjAbleKYveconUj7Wg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633216558; a=rsa-sha256; cv=none; b=FgM00NaGXwfbuwzhH75Njs6+vwydX32s96tg9/wRA3n5jOYh0dIwPoSr2uLSTLSYa6wcT2 bEaekOVWO3/dj7sDg02kiZXqz0NEc0+/R+s8ZxV9d9FXOvBxUoBZ0wlDq0E5ZNLvlcYaaJ waXoZRHSNTG10UJ7oLaa0tG/SyXUadCU5RIyUXgjqCt8R1IbRLGZChQoEtqF6g9GRelX8/ ECm940/05KUDQU5uahBNQc8Sd7jMBEeSCuwbbaRdLH58VHmqlqUFmBL8S2GF4xKsyJdDml 6ip8CvBJ0CqUYe0AEg/6Ddc2TQHMbmWh+/hNIPjIB//b51DMiZsUWL3JTdRYbg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZwtMNZul; dmarc=pass (policy=none) header.from=gmail.com; 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: -4.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZwtMNZul; dmarc=pass (policy=none) header.from=gmail.com; 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: 53E9E36C8C X-Spam-Score: -4.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: ivKG9rGPRXRf I just noticed one more thing, regarding ess-eval-visibly etc: >> + (setq user-inject-src-param ess-inject-source) >> (setq ess-eval-visibly nil) >> + (setq ess-inject-source 'function-and-buffer) >> (ess-eval-buffer nil)) >> - (setq ess-eval-visibly tmp) >> + (setq ess-eval-visibly tmp) >> + (setq ess-inject-source user-inject-src-param) > > Rather than using setq, it would be better to let bind these like so: > > (let ((ess-eval-visibly nil) > (ess-inject-source 'function-and-buffer)) > ...code in here... > ) I noticed these variables are only reset to defaults when ":results output". It may also be necessary to set them as well for the case of ":results value". In my original implementation [1], I set "ess-eval-visibly" within the wrapping advice function, so it applied to all cases. [1] https://github.com/jackkamm/ob-session-async/blob/master/lisp/ob-session-async-R.el