From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IFE7MHmDTmC0IQAA0tVLHw (envelope-from ) for ; Sun, 14 Mar 2021 21:43:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MG2gK3mDTmBDaQAA1q6Kng (envelope-from ) for ; Sun, 14 Mar 2021 21:43:21 +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 4F0BC18215 for ; Sun, 14 Mar 2021 22:43:21 +0100 (CET) Received: from localhost ([::1]:42566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLYW8-0007ZD-FG for larch@yhetil.org; Sun, 14 Mar 2021 17:43:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLYKD-0001uk-EZ for emacs-orgmode@gnu.org; Sun, 14 Mar 2021 17:31:01 -0400 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]:36149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLYK7-000161-NF for emacs-orgmode@gnu.org; Sun, 14 Mar 2021 17:31:01 -0400 Received: by mail-ot1-x335.google.com with SMTP id t16so6173215ott.3 for ; Sun, 14 Mar 2021 14:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=pKOaXr96YDBxEau7RWn2YisIb34r8AcLfIqhmRKtnG8=; b=DkbS2+H9m1DEuXu0MAh+LYiGxedhucDj8REI1Zgyl5ValzDKs9zyFiivG27ZT/QTmy ljqEH2G82E8DKpfXuI8xawF573yDO5pxXBswMpB1zm+UcBs+Jon4WmYBQ3TaqcDyWHMb NVqiVctZSBbfD5JSCAFVoID7Tt6XeKgLQMHKIl/CAWxn4R2SF3W0tkk0CsR4H2ve3sKk JK0LxqzElpu9NVmjP/evclqfBvJttniwOrsz+gIPA3votR2OToLib8ycuEaSXYTwgWxA GZpuON900Nyst+HB/Fz+UTp+jj1IRq2i63TDjF7DfwzQbihF3iL2ekZhPJOAMF1/qh5s j7hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=pKOaXr96YDBxEau7RWn2YisIb34r8AcLfIqhmRKtnG8=; b=iXTPJBoMNnyuGWbSY8N11lLwMuOYbmWMp0sHG+JDodIDGz69/EKHSgkpGiuwA6KeJU r8yMe3W/RfB+ySYVXly93WlN213CIPiznjpSNCs2mwxjdcf7sFNdgbRv2bwo+EMjJ3Lx ap1/tXEBuA03wrxRbrJq1w1ZmVSj9gU4rO2aQb0UcaJE80V/aClRjK90yTm/ZZoUtmtV +60fALdYwPYYC0P0pbwFySDpQ4mkwgFYmO4wYMR863TDIXo2sORS4G9BrflFNN/H71wr eZeSoRoAbPccO2ojw5N1pFU3QFdivrQCpTzeANsabcsWa6Q39IDtdKFAq7aVxJinnqv7 7P+Q== X-Gm-Message-State: AOAM533KcJzEXA6BJtObAjTsL87fE/KNriszK7lFEk7Eb+/SX5p5TW+I eYgDcYEZoCGARyk/78AVM7MV/NQzgOACaRJ3LnoMDP3trFDuuw== X-Google-Smtp-Source: ABdhPJywcMQWjUopeZAIf2O5gXSE4ZFiNyJZS8w82NwCKlJlmjTdxfxMkMssMl9bRN4NQwyl7JP+3DMIKpP/tlVk+vw= X-Received: by 2002:a05:6830:101a:: with SMTP id a26mr11596626otp.68.1615757453164; Sun, 14 Mar 2021 14:30:53 -0700 (PDT) MIME-Version: 1.0 From: George Mauer Date: Sun, 14 Mar 2021 16:30:42 -0500 Message-ID: Subject: How to get shell source blocks to read my profile? To: emacs-orgmode Content-Type: multipart/alternative; boundary="0000000000000a039505bd85d9ee" Received-SPF: pass client-ip=2607:f8b0:4864:20::335; envelope-from=gmauer@gmail.com; helo=mail-ot1-x335.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, HTML_MESSAGE=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: , Reply-To: gmauer@gmail.com 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=1615758201; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pKOaXr96YDBxEau7RWn2YisIb34r8AcLfIqhmRKtnG8=; b=n4XKFFD/Qi7r3uUVwn76eUpfkWOc1QnpWwd6vF5jSao/MQ8YeFVIBxrVD30bEPt6Nd2jYu fFkQClokiV+JV90iXYmV/iWltwa58zu3ibLoSQFKW3HCZlcd9m7KTXPECKJABHwjM8+L3W dACJ74iZfMs7YdlCNUIqV8ekS5Wg7BArYvHZFyIZpsghoADucaBT+XQLxXqelpi9ai87O0 l1UzjSPQEp0fzHp3odqY9BFx6p0WzmNXBlUbricgAhaI17iWtbYBlFlzMVchejNO/kAn+f AOTuTjyZrlDcgVjjQcl58AyxnXOG2wMEPmqCdsSRlL7LA2Z3HlCW9BD5yZFxjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615758201; a=rsa-sha256; cv=none; b=OrfKYV59VrmVcQacC7slSJS69syjPlvNY9MISjYxM7XJgLWPUtsLAS0BSdvawkW2dkHztb JRfjeQQ7mR2xP7QjRAUCTU5aTUsj15gJCxpBzTkvK9rmX9gKzvhqxTVCV+sQ+jo4qqfojT AOCp2D3TwzDc+eRw+e9+4T6VTeX1pd+Mp3TClynAM3D66yN7DivRndMaBTs7u6zwlIysMt HphaIV6w6vdu2D44PXTcLQzjqmp9sMg2Iw0H3zfH1g6JMEWKerniwO2fRoUi2n/+5l7Jug Pambtt6mVCEJKsWPjM400h/FUCdTCxbtOfK7hNK4ppI0Y6jbZBXWUX+3JpPE6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=DkbS2+H9; 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: -2.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=DkbS2+H9; 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: 4F0BC18215 X-Spam-Score: -2.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: Esm2rUHVhxU6 --0000000000000a039505bd85d9ee Content-Type: text/plain; charset="UTF-8" I am confused why no matter how I try to run shell commands they seem to be missing variables exported in profiles. I have added 3 variables to various startup scripts - ~./bash-profile~ :: ~export GIM_BASH_PROFILE="yes"~ - ~./bashrc~ :: ~export GIM_BASHRC="yes"~ - ~./zshrc~ :: ~export GIM_ZSHRC="yes"~ I am running emacs in GUI mode so I get why none of these are available *directly* in emacs, so then I try #+begin_src shell :results list env | grep GIM #+end_src #+RESULTS: Ok that's kinda surprising, but I suppose it could be running ~/bin/zsh~ (that's my ~shell-file-name~) directly what about #+begin_src shell :results list bash -c env | grep GIM #+end_src #+RESULTS: That's pretty surprising. I would have expected running it directly to actually run my profile. Shockingly #+begin_src shell :results list bash --rcfile ~/.bashrc -c env | grep GIM #+end_src #+RESULTS: That is *still* nothing! Sanity is restored slightly when I run #+begin_src shell :results list bash --login -c env | grep GIM #+end_src which *does* indeed visit ~.bash_profile~ but only slightly. What is going on, and is there a straightforward way in which I can get shell block to read from a profile? --0000000000000a039505bd85d9ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am confused why no matter how I try to run shell command= s they seem to be missing variables exported in profiles.

I have ad= ded 3 variables to various startup scripts

=C2=A0 - ~./bash-profile~= :: ~export GIM_BASH_PROFILE=3D"yes"~
=C2=A0 - ~./bashrc~ :: ~= export GIM_BASHRC=3D"yes"~
=C2=A0 - ~./zshrc~ :: ~export GIM_Z= SHRC=3D"yes"~

I am running emacs in GUI mode so= I get why none of these are available *directly* in emacs, so then I try
=C2=A0 #+begin_src shell :results list
=C2=A0 =C2=A0 env | grep GI= M
=C2=A0 #+end_src

=C2=A0 #+RESULTS:

Ok that's kinda s= urprising, but I suppose it could be running ~/bin/zsh~ (that's my ~she= ll-file-name~) directly

what=C2=A0about
=
=C2=A0 #+begin_src shell :results list
=C2=A0 =C2=A0 bash= -c env | grep GIM
=C2=A0 #+end_src

=C2=A0 #+RESULTS:

That's pretty surprising. I would have expected runni= ng it directly to actually run my profile.

Shockin= gly

=C2=A0 #+begin_src shell :results list
=C2= =A0 =C2=A0 bash --rcfile ~/.bashrc -c env | grep GIM
=C2=A0 #+end_src
=C2=A0 #+RESULTS:

That is *still* nothing!

Sa= nity is restored slightly when I run

=C2=A0 #+begin_src shell= :results list
=C2=A0 =C2=A0 bash --login -c env | grep GIM
=C2=A0 #+= end_src

which *does* indeed visit ~.bash_profile~ but only slightly.=

What is going on, and is there a straightforward = way in which I can get shell block to read from a profile?
--0000000000000a039505bd85d9ee--