From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 sHM+Lwh+sWNxZwAAbAwnHQ (envelope-from ) for ; Sun, 01 Jan 2023 13:35:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YLtWLgh+sWP74AAAG6o9tA (envelope-from ) for ; Sun, 01 Jan 2023 13:35:20 +0100 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 594292AD8D for ; Sun, 1 Jan 2023 13:35:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBxXk-0000YK-HJ; Sun, 01 Jan 2023 07:34:24 -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 1pBxXi-0000Xs-M9 for emacs-orgmode@gnu.org; Sun, 01 Jan 2023 07:34:22 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBxXg-0005DJ-O5 for emacs-orgmode@gnu.org; Sun, 01 Jan 2023 07:34:22 -0500 Received: by mail-wr1-x42c.google.com with SMTP id y8so23943410wrl.13 for ; Sun, 01 Jan 2023 04:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=earth2adam-com.20210112.gappssmtp.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=sNM0OgzfZICJsmnPDl0iSyDvJ2NkZcTRlc76nTEi5C8=; b=mm5Rvdbf5I6SWnNp+mygL+V0fvZalgEUd2nxO9HaQ9EdD+oUgW4YbqSwhHuAyscuJ+ dll41iBoH8tkLN6GOfpWcpKzbiaSmrQc8FqmyTbx60s0vEEl4mQFicau3TzrEZ37t/8K QgVrDbwu67NdPSnbjuv5ySLSo+8hhFWLC8XwHF0HhvVdsB+gX/Vu7554yGjVoAGvBCSb xev2rj7+nhcSMv2wv/hYABOe7TG/9R6mhMnNtUYuMpZpnzfsq/Ds65cWOR7bVdueLGjO KVd6u0eKnFb+kfTFMNoZHaF8wndralLbHiWo9Z7dmrsBvPVxUiIxZEjxInUs5PGipsiS PtuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sNM0OgzfZICJsmnPDl0iSyDvJ2NkZcTRlc76nTEi5C8=; b=l8nVtQtZN7X8LsnPydSodWdZpZGF1ioaGMgNaN1SDnqJTkJmAIWeAkRluE1/a6zWqA cxJ5zGAjJ394R/CBQ0x+cUX5Brh9j3/JCxa7bmltjkI3AtFi+7W+K8kchUbD+KQhLeNI vY1T0OnxGIyomFsPWz2tdlYZvH65e2Gom6j5hqo3i15pej0GJgltOOyAhWKpDfdFlX8e HwYV+9HQiwu83paa18dsi/HosRnvAgpOGD54xHb6QMBBRVXJ2FFplqOFAiqP0WFaVVfs u4cx8k8e3do6XktZ2p80onbomWv/liB5T61hXjOtzn7DR/BldogpT1457XBZuNb7waNL X9Xg== X-Gm-Message-State: AFqh2kqFMRHQrXafV22mTyG4K9Y1zto+s+OQJJBGE2ky/fDc3yCYkVJL flHUUFfYo+cEaT1O4LhHNPit9FkJfkjBpp3ouc0= X-Google-Smtp-Source: AMrXdXuxhTLIYrj0RqGYpXPQA3yNy/MIlO//HCyYf8O2WquICJeOP7sbvQlmT6XWpTXH6bG0UYit9w== X-Received: by 2002:a05:6000:1c05:b0:261:d8be:3046 with SMTP id ba5-20020a0560001c0500b00261d8be3046mr25042932wrb.0.1672576458209; Sun, 01 Jan 2023 04:34:18 -0800 (PST) Received: from [192.168.1.14] ([87.75.59.92]) by smtp.gmail.com with ESMTPSA id i18-20020a5d5232000000b0028e55b44a99sm7553570wra.17.2023.01.01.04.34.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jan 2023 04:34:17 -0800 (PST) From: Adam Sneller Content-Type: text/plain; charset=us-ascii X-Mao-Original-Outgoing-Id: 694269256.864095-bea2084ac92912204dd47e2a0a062fed Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: Persisting the current working directory in an org-babel session Message-Id: <78104F7C-B96D-4B8C-A83F-37D38B0BA9CF@earth2adam.com> Date: Sun, 1 Jan 2023 12:34:17 +0000 To: emacs-orgmode@gnu.org X-Mailer: Apple Mail (2.3445.9.7) Received-SPF: none client-ip=2a00:1450:4864:20::42c; envelope-from=adam@earth2adam.com; helo=mail-wr1-x42c.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672576520; 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=sNM0OgzfZICJsmnPDl0iSyDvJ2NkZcTRlc76nTEi5C8=; b=kDUSQOiJhEroSURe6v5VwKk/wytGQDSIM1SsMsnBQMLPfHJkzySzN+4vi3PP/RgrpentRS aRTwUR3iZv2LNQyWsw6iJUhTG3tmmXm63Nq/5CjhjQKyPsTq3HKW4pz3H+CZ7EiAg16Oiy P8KQsbKGYvoNtC2aofXiwlU5ZYPspoxj5cV+EUjV204Q+iVUIk4lLCM2qsXSKebuaU8CMg ATzwCH0nCXEHyMzSlrWUfxevSsjAUST2X65gjUC0MrAPurxJa/eNqs9dLzmWl4J5HDM+k4 lGtzoa1vekyIczBxeQlv13hHCaz5QZEAFYz0Bcn6YfxQpT4FbBP8IC+xNmcStw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=earth2adam-com.20210112.gappssmtp.com header.s=20210112 header.b=mm5Rvdbf; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672576520; a=rsa-sha256; cv=none; b=qFs0Daw23z/Ua82qK/mrhgMkkakwHyL6/ZYnARzluVYnSBoMd7kW35UJjpYHK8IVw1RzFC XdRpx4KSf7be3RY0sIjwPEpmQEayuYZTVHQ6YSAinvS/fKZmQ7wiHR2SNH4+KmOgs7LiVL CSL6rbBImwKFGeP2KWB2TAZOSzk2+Qfa+xtNYbQLitsqL4qKCTBebUoQpv9Q8LlpjTOd9D h8HVQVdBPX/QljZ0nSybjRa9kk/qnuHTIsvq88GEGWeEjVWN+hwPcQ0hQ/JvC4FsAJk4ey E6Jg96GDCEaK7rQD3ZpbR3KJnNwHI2IWdzBzjjs+6K7hx2z1yjRdCFrHqIj2lg== X-Spam-Score: -4.97 X-Migadu-Queue-Id: 594292AD8D Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=earth2adam-com.20210112.gappssmtp.com header.s=20210112 header.b=mm5Rvdbf; 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=none X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.97 X-TUID: fhlfN+3LBGQF For some reason, I am unable to make changes to my working directory = persist, from one emacs-lisp SRC block to the next. For example, consider the following: * Literate programming in a single session :PROPERTIES: :header-args: :var DIR=3D"/Users/adam/Desktop/test" :END: #+BEGIN_SRC emacs-lisp :session *elisp* (cd DIR) #+END_SRC #+RESULTS: : /Users/adam/Desktop/test/ #+BEGIN_SRC emacs-lisp :session *elisp* (cd ".") #+END_SRC #+RESULTS: : /Users/adam/org/ The :header-args: define a starting directory = (DIR=3D"/Users/adam/Desktop/test"). The first block establishes the = *elisp* session and navigates into DIR, using (cd DIR). Confirmation is = then seen in the #+RESULTS.=20 A second block is then created in the same *elisp* session. This simply = echos the current working directory with (cd "."). BUT... the #+RESULTS = show that the working directory has not persisted from our first block = and has instead, defaulted to the default org-mode directory. Now, I realise that I could have used :dir in my initial :header-args: = to set the same working directory for all blocks. But what I am = interested in is why my changes are not persisting, when (if I am not = mistaken) this is the entire point of establishing a session? Thanks! Adam Sneller=