From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yPXzG4XOFGcBMQAAqHPOHw:P1 (envelope-from ) for ; Sun, 20 Oct 2024 09:33:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yPXzG4XOFGcBMQAAqHPOHw (envelope-from ) for ; Sun, 20 Oct 2024 11:33:57 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=qOz72ehd; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729416837; 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=1dka5ANU6GBpJ3wjxvonMl+fFV+dYJUBSdXV2icyx/0=; b=f/ow0hMHUZ5mhCNKjV2hj/9axkbRBm9cv3Fu6goTXD6PfdRe3odTdCLzQZOWIJWq5wC8Wh FQumVR+BNgFYVdqPA4DjJ7IirermVLmnKJlSeE8mdj1PACw9xee+rlID8ALPZexiF6G1Va nnL3w9Zg8HvovSIe8Gkr8ZrLuEv0HaroXMtRqspIY56GTbYVrmzdjvpUQMzD1umuYsEmhX jQi9wdP/RP8s/rRq2v2p4gNymDnNwBZbmjnu+Rnn+fuJmMjag4tkq4X519YjQ9q5T/QGdN h8AdTvJPeAmpK68bAzERIXDqwtooeF1DEpQmYUrKWr0cvu0pxkMFfE/cB4bsSQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729416837; a=rsa-sha256; cv=none; b=tYA0qbjadtnklnhhb5JdIzvfheJhLI2VgW2+aPXVzTh9/ILbpjh8f+w9c5e8jmMP0k80rL AHM8tww9Th2FxF1Iyy3iGmjpBVe94plustQCzfxlJD+nhehI0dFahC45N92wCvK4FfXoZU tyjLo0sYmULxYw+O6T8Eqzrq0Vf9gDsDaT16UyIGYXJhPTGpR87jZYxnhn7tb86zPX+ysF O4ecmYXNJGIQxmsyMP47tSAjGX21pPK9L7ouxeO7Pqy2T562U+M8npzSvBQ/p8e6Po1TKE 91qVqfntGfyVmiU+B9wKldbckDDMP2+amSWSXFGI2mNHGi+RgbCocJX6KuBU9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=qOz72ehd; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net 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 E9B3750B2 for ; Sun, 20 Oct 2024 11:33:56 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2SJL-0003JT-Bp; Sun, 20 Oct 2024 05:33:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2SJJ-0003JL-R5 for emacs-orgmode@gnu.org; Sun, 20 Oct 2024 05:33:17 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2SJH-00079n-Hc for emacs-orgmode@gnu.org; Sun, 20 Oct 2024 05:33:17 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 667AE240028 for ; Sun, 20 Oct 2024 11:33:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1729416793; bh=IvYp0hw9Sh9rlISdtl4T9x44d6ta769XSbeuVluJvu8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=qOz72ehdIDyGxl9XnxZC+UKvpFO8SS14VNg2Dch9VAqrEd50D1LXbYEhOf6LDo8YO jHXDtaPMukfMnQR7p8rvGarESzMpgbLPf0S+eGrvI01mflc+n+dbh58ouUhCvC3S1x 6vwQrD65CNmZyUDHvfO5GizUGHJyJZMMiTICT0VHptTDIbQvhXCBUZgVFx53MAkMhg 6C/H6v2eXQATEavAnwjKa8QmIhq/7kB14TwsWtfo1O6lSmeePIjRDDo5qLDL+AoOUG GWIgf0Bh1MEqw7kIi+ameYxmkkiBJttHNrlX+QfkWRWir2TWlRlOGOoIdulcD3EgG1 vbt2Pgjo7ufmg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XWYCD26rFz6tsb; Sun, 20 Oct 2024 11:33:12 +0200 (CEST) From: Ihor Radchenko To: Jack Kamm Cc: emacs-orgmode@gnu.org, matt@excalamus.com, jeremiejuste@gmail.com Subject: Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R In-Reply-To: <87ed4b45r7.fsf@gmail.com> References: <87setrqs4z.fsf@gmail.com> <87wmiqigfp.fsf@localhost> <87wmi9etku.fsf@gmail.com> <87h698wml2.fsf@localhost> <87ed4b45r7.fsf@gmail.com> Date: Sun, 20 Oct 2024 09:34:59 +0000 Message-ID: <875xpnrubg.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.44 X-Spam-Score: -4.44 X-Migadu-Queue-Id: E9B3750B2 X-Migadu-Scanner: mx13.migadu.com X-TUID: FRV+Yuwc7xGK Jack Kamm writes: >> Rather than `t', I'd use something more descriptive like 'disable-prompt-filtering. > > Is the attached patch what you had in mind? If so I will squash it with > the previous patch. Your variant is even better than what I had in mind. > But first -- note that the current patch is on top of bugfix. I had > mentioned this in my original email but want to double check if it's > OK. In particular, I'm not sure if it's acceptable for bugfix branch > anymore, now that I'm changing the function signature of > `org-babel-comint-async-register' (albeit in a backward-compatible way). > > I had originally proposed bugfix since I use R's table() function a lot > (as in my original example), and it was causing me problems when I > belatedly upgraded my work machine to Org 9.7. But if you prefer, I can > rebase onto main. > > Another possibility would be to add a hardcoded check on bugfix to skip > the prompt filtering if the major-mode is R or Python; then on main, > revert the hard-coded check, and update the signature of > `org-babel-comint-async-register' to set it properly with a > variable. But not sure it's worth the hassle -- I might just switch to > using main branch on my work machine at that point. I think that it is ok for bugfix as the patch essentially reverses the commit that introduced the regression for ob-R and ob-python. (The original patch was fixing a problem with ob-shell). So, that patch is fairly trivial. We might want to document the signature change in ORG-NEWS on main though, as an additional patch for main. For reference, here is the official policy on bugfix branch: https://orgmode.org/worg/org-maintenance.html#release-types > + (setq org-babel-comint-async-remove-prompts-p > + (let ((prompt-handling (or prompt-handling 'filter-prompts))) > + (cond > + ((eq prompt-handling 'disable-prompt-filtering) nil) > + ((eq prompt-handling 'filter-prompts) t) > + (t (error (format "Unrecognized prompt handling behavior %s" > + (symbol-name prompt-handling))))))) nitpick: I'd rather add (eq prompt-handling nil) as a cond clause, to make it more explicit. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at