From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0JE7HGPrCmMsEQEAbAwnHQ (envelope-from ) for ; Sun, 28 Aug 2022 06:13:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YLRbHGPrCmMcigAA9RJhRA (envelope-from ) for ; Sun, 28 Aug 2022 06:13:23 +0200 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 ED9011A54D for ; Sun, 28 Aug 2022 06:13:22 +0200 (CEST) Received: from localhost ([::1]:54604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS9fl-0005cm-Jf for larch@yhetil.org; Sun, 28 Aug 2022 00:13:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS9f6-0005cb-Gi for emacs-orgmode@gnu.org; Sun, 28 Aug 2022 00:12:40 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:40889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS9f4-0001O2-PI for emacs-orgmode@gnu.org; Sun, 28 Aug 2022 00:12:40 -0400 Received: by mail-pj1-x102a.google.com with SMTP id t11-20020a17090a510b00b001fac77e9d1fso11578574pjh.5 for ; Sat, 27 Aug 2022 21:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=YsUPMKRWSNl8Q0HR7SOmcppFFNsIYm+7pdxOi1gYum8=; b=nLgZ6zoQ2eO6VJqHK38GSMcr9MqeORJAga40TJ9IYKHlZYmtO5kDLnky/5U7UqWhev XWYyvqfa5pa/2T25ToUXawhzSjyTMBGFniN3rnnCCZebIPv+6T5JKlNbDJWQU6YiptMv v5KVq/ozh/BBq1S97VsHaJiTnQ6PcHPqdLdPcQyTzfxs/eGc1R3iwKUk6ic1gNlNrFf0 QLWfy4wuhCXYK573LBjNhahDLCvQNC8WOWuXv1tAAjc3O6oXgJSFWf+zs5eYq4GcCdK7 DA/YRkzPm2Gm83uPNyO34uEKRpg0BZcYMYMQn1dMqVshz1SenNhyc/8qWjjSUC5bNBxM 4YVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=YsUPMKRWSNl8Q0HR7SOmcppFFNsIYm+7pdxOi1gYum8=; b=hAO9eJ+jH9XgBV0alAmjD2SYGQ55x9N5BguzLlow+x9Yw3QIJmmObI30/HoPQgFFzo UIhe+2AatMCW9Yp5cyHbvb+CThLFn3ztwb2ft1iPD2Nt+RZv26cAVzUcZ72S7mRy8wD/ G80Wqt6kl16nz+w12ke/VhXpAIRQ2HtLsH75B7jHoE3lOQMVA7UEB7+wRIayo+HoiVc7 hhpS3TNJ6XyI6kMJFgJ3DmrcfZ5YAYFFLVbP6/fUBEM0EJLoymwT1dfu6EX/8Iuq0+mq /Mpr1om4Jru9386LZ1MNx2FDR8ZOw5lHA75wovyT9moAQ3qauQywdKLT4b17wluvRdQG Dj4g== X-Gm-Message-State: ACgBeo16lT5W8tsS80TxgjAAY2Ijaghh+mLUVL8XiB0JR1FPIsIrzg1p uSgLf2BsA4PaQJnDyxsQbUSnIjZPv2I= X-Google-Smtp-Source: AA6agR6nKqnTIUCeQ+v8dzdcwpg50CLgkJYDUegh3VnVXTIuWCT9GL1rvxdrFkxaQHbyOUEsVmdORQ== X-Received: by 2002:a17:903:514:b0:172:dab0:b228 with SMTP id jn20-20020a170903051400b00172dab0b228mr10516654plb.170.1661659956722; Sat, 27 Aug 2022 21:12:36 -0700 (PDT) Received: from localhost ([2409:8a70:2b3:c8a0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id d17-20020a170902aa9100b00172d0c7edf4sm4499992plr.106.2022.08.27.21.12.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Aug 2022 21:12:35 -0700 (PDT) From: Ihor Radchenko To: George Moutsopoulos Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org babel python execute from local buffer to remote session [9.5.4 (9.5.4-ge0b05b @ /home/moutsopoulosg/.emacs.d/elpa/org-9.5.4/)] In-Reply-To: References: Date: Sun, 28 Aug 2022 12:13:36 +0800 Message-ID: <87ler9uhsf.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661660003; 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=YsUPMKRWSNl8Q0HR7SOmcppFFNsIYm+7pdxOi1gYum8=; b=K53QQmyvKdIemUjvTloiSOxYm1jlqrh/ByHot2oG0Hao85HudG/8j1vHUd+FqVF49ElSuZ fzR1aK07tnGoFhMn2qSPFCDyCnPlCXwWrDPtoxm/i8975AwURfrCcxHEcqM/rCM6BN8YW/ 6UvT1t3+VxoHnqIN8BCjQ/i4vvNSe6afLLMcgIwuxkkMc+a/PVb4U1HL3BCiYWMpb1VUeR VcZUduvtqDfa+zzKUbmL2DX87uPkISHD9ennbOPBd1V96bcUDMaAk3Gsoovu/jZWCmwF8T sZ6QyKSa5N1UDverCG/ZyUQexlgyk4EUIyYumHCIqbuGZayrZk+6ep8FQ3NOaQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661660003; a=rsa-sha256; cv=none; b=PwnafrScvv+YYbTupsVDUKnRC5Ci/fzjOecWM2+4/8SOh+HkmgIcb2WQAQM3+kqLpEDARg JOoz3e+/agTw2olP+jQw2Oqsk3UKZyDsoC1Dp89dMfSK3RLlWdxol5++I0yOqLMdyXnlG+ 0yoi2lt/oJQQzOBatFQ3b1opJjflRpVlrbkpAkLBb5tg1y6x/odBe+X2UQNybX3XoK/9Qh WpBSwRVSy5YrKrZ6KGIXRdZqeg6Ix8WLsOx9XTl+8GbhBQ7nOh179fzwkdSOVxS14vKB73 u4IZwVSKFmuJcYpocK6ahffBsRrvEN8LVHrTakLVRkxhXtZ+hD+Z3d66fPVNVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nLgZ6zoQ; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -6.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nLgZ6zoQ; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: ED9011A54D X-Spam-Score: -6.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: oPQK0oRsQkiq George Moutsopoulos writes: > Hi all. I often need to run some code on a remote ssh session, because > only there I can access a database and the environment is hard to > replicate, while I want to keep the code I run on my local machine. > > The remote session is initialised with run-python after I change > default-directory and use pythonic-activate. Sending commands from a > local python buffer using python.el works without issues. It would be nice > if I can do > the same from a local org-mode buffer from a python source block. Could you please elaborate how you change the default-directory? The canonical way to tell Org babel which directory to use is :dir header argument. AFAIK, python process and files should all be created in the right context then. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92