From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0C3hEX72mmW0JwAAkFu2QA (envelope-from ) for ; Sun, 07 Jan 2024 20:07:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id CNRDDX72mmWsVAEA62LTzQ (envelope-from ) for ; Sun, 07 Jan 2024 20:07:42 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YtZFSaIx; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704654462; 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=/hchyD+otezizd9yESFmL53IwGiWeQiR0DEOhpnJWWM=; b=Lv4+RgykmzkHkZzKkVnTVL9Y1ZYY11CXXRNvogtwmU1blL9vZ5BrVrxicvTY83z9lSjtT+ agIzDbNs3yK9DIQSxFGgpRrArlzY2TSTv4ZTrEyIfRYH1l7Dc25L1ymgCoENVl/50TZg5n p3lKjEkOtIXs1XMtAOvTge/LYAXSlKopQWkrxMoH/9NvKF7xg19j2G2GF3y9h30zBECvbQ 0x8JZmzRPAvX0Le2VjBZUfhSFzf0iHtY1s7bWXglyKsKNz9IxQU7rT6027ARkXuIvKHaLD DrbhO/7IogcUdrnHkVz7Tvha9zgrJK7YCo1fiPt1okxbo2hWnxqXQcZUz9RSow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704654462; a=rsa-sha256; cv=none; b=dWecZaQ7WiLNmiCd0Qn4bEWn0rXBVU6O9WXo1poEuOimA2gkmxulDwnmyGebwR5xcVbo/P GFPzT87UnYu1Zq4TlhbQ6izFjSEQF2SJhgv3Ye3erGzgcIY/U+RTCVhcAkmWWTemF1zxvM vMgakHHU3LkbbLh//GmZwnOHyKdIo94f5+1cu91B46ZvChNRYOSSoyQXYvlZK2r1Bz+4dC b49NUhVmqpvoaDb9acUIe0TA98J33ZbRc0Nk7AuLJY3Tawfzp6I89271k7W1PvcUYrYQwj w+8AkdGQgPJ5CUL3UsV5RyWx23Vfcf8iRRhsKy6rzFsbdUEz0G4g4HL/bD//pg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YtZFSaIx; 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=gmail.com 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 0123C6F66A for ; Sun, 7 Jan 2024 20:07:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMYTk-0003OX-Oy; Sun, 07 Jan 2024 14:06:36 -0500 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 1rMYTj-0003OJ-8N for emacs-orgmode@gnu.org; Sun, 07 Jan 2024 14:06:35 -0500 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMYTg-0005Zi-IZ for emacs-orgmode@gnu.org; Sun, 07 Jan 2024 14:06:34 -0500 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-28bf1410e37so1048136a91.2 for ; Sun, 07 Jan 2024 11:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704654391; x=1705259191; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=/hchyD+otezizd9yESFmL53IwGiWeQiR0DEOhpnJWWM=; b=YtZFSaIxM2qj7RP+NgWVBBNQ3R7Rr4gijGJ8uPjPkj4oRbT10a+Sty9SemIMTY38PA mps1MTeCs90X1XqodLJxRh4CUIDPCmnXKJZIg4xWLkVz8/pbCuGvVyrH6tblh+90dmDa ICWQJC/CiLR6pulfWpaYywDKN3CX7zrvZRqZR1splKa0a6nFjYUyE/39kcJPCOAQxyH9 OeEvAzNlZVUcXRXGplzI452h7ZMxloC+1uFpscml3AmqXXzYirzl2RUvVQX9YrASzdLK vKA4mt9U7Ch9GCa3F6mtDaX4s36+TvTOH//5IwCSRKhJLImNT4CdcnxFZOe1lOZA6mGF tw8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704654391; x=1705259191; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/hchyD+otezizd9yESFmL53IwGiWeQiR0DEOhpnJWWM=; b=MZ4VPYnPfajyE89is3DjSlkcHPyzzIDJ9W/U7YVYLkDP3S6fd9H6qMT8lAUJC+ZsO7 JV4zPPvmCELOxLz21fgj87Mc1Ap0DnsOGK6BjQg6/fPlAGyyZYdAL8tz4bfXO2060Qx2 phqaTMggu5OseziBi8CUUcBtHWFuQrJz/9cMl57bTc66FGpssSOWC7w7FqBBEjxi/jKs Y5e49Mkzp2otDbgVorsqBc7AJduDXyRZTstlW9c2QRuq8e1Cl3d2EtxLTWTzIGJsFaX0 bgT/dNLIr5/Xotf6qE3bH5+aDEKykORNfw+vZMwk/EjNSfTZs5Bzx1uEvBBPrWNRHsPT ohnQ== X-Gm-Message-State: AOJu0YypoE7yAQU+CUesu7chG5Cl8l33B+9/F6U783Z7l5soijcV2E5L c1cdlmoVgLo1Mxdt+w6Zi+8= X-Google-Smtp-Source: AGHT+IHabr7hV8s5Bw1mxKNhlDGFMq/Oye8g5MzCbX41h/mGyCDGwymE6eNzffOHPdRrPsStFr5lBw== X-Received: by 2002:a17:902:ce90:b0:1d5:36d9:e2a8 with SMTP id f16-20020a170902ce9000b001d536d9e2a8mr420112plg.120.1704654390827; Sun, 07 Jan 2024 11:06:30 -0800 (PST) Received: from localhost (157-131-78-143.fiber.dynamic.sonic.net. [157.131.78.143]) by smtp.gmail.com with ESMTPSA id jj3-20020a170903048300b001d3fde182e4sm4727060plb.73.2024.01.07.11.06.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 11:06:30 -0800 (PST) From: Jack Kamm To: Ihor Radchenko Cc: Liu Hui , emacs-orgmode@gnu.org Subject: Re: [PATCH] Set Python shell in Org edit buffer In-Reply-To: <87msthwbfz.fsf@localhost> References: <87zfyosw8n.fsf@localhost> <87ttovlb1u.fsf@localhost> <878r6647vv.fsf@localhost> <87bkb2rqer.fsf@localhost> <87edfwsuvx.fsf@localhost> <87sf4bsm1w.fsf@localhost> <87mstw18r4.fsf@gmail.com> <87bkaak0ol.fsf@localhost> <87ttnyz0jv.fsf@gmail.com> <87wmsn6ghw.fsf@localhost> <87o7dxu15h.fsf@gmail.com> <87msthwbfz.fsf@localhost> Date: Sun, 07 Jan 2024 11:06:29 -0800 Message-ID: <87le91t13e.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=jackkamm@gmail.com; helo=mail-pj1-x1029.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, T_SCC_BODY_TEXT_LINE=-0.01 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-Queue-Id: 0123C6F66A X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.91 X-Spam-Score: -6.91 X-TUID: A77I6VpBlhBU Ihor Radchenko writes: > So, a good option could be > (1) removing (org-babel-comint-buffer-livep session) from > `org-src-associate-babel-session' > (2) Removing `org-babel-edit-prep:R' > > With the above, we can use `org-babel-python-associate-session' Sounds good to me. > I imagine that both #1 and #2 should happen in > org-babel--associate-session. #1 should probably be discouraged, > and it looks like even for ob-R creating new session is not really > necessary. It looks like ob-R and ob-julia are the only languages that start sessions on edit (based on grepping for "edit-prep" and "associate-session"). I think their behavior is peculiar enough to have an ob-R/julia-specific option on whether to initiate session on edit, with options nil, t, and earmuffs. Earmuffs is the current behavior, but it's surprising enough (IMO) that it might be worth changing the default to nil or t. But still worth keeping the earmuffs option since this behavior seems to go back to the original implementation (30931bfe1). If it helps, I can prepare a patch for this after you've made the changes for org-babel--associate-session. In my notebooks I generally define my ob-R sessions to have earmuffs (like ":session *R:project-name*") so that they can easily work with "M-x R" (which names sessions as such by default). Until now I did not realize this was the culprit for the annoying (and undocumented) startup behavior I was experiencing.