From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OKO4DJZrU2DwfgAA0tVLHw (envelope-from ) for ; Thu, 18 Mar 2021 15:02:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mGhvCJZrU2DSTgAAbx9fmQ (envelope-from ) for ; Thu, 18 Mar 2021 15:02:46 +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 61EE62753E for ; Thu, 18 Mar 2021 16:02:45 +0100 (CET) Received: from localhost ([::1]:53104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMuAe-0005Ij-FX for larch@yhetil.org; Thu, 18 Mar 2021 11:02:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMu87-0005I7-CM for emacs-orgmode@gnu.org; Thu, 18 Mar 2021 11:00:07 -0400 Received: from ciao.gmane.io ([116.202.254.214]:56010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMu85-0005Ez-8p for emacs-orgmode@gnu.org; Thu, 18 Mar 2021 11:00:06 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lMu80-000A4y-Hx for emacs-orgmode@gnu.org; Thu, 18 Mar 2021 16:00:00 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: How to get shell source blocks to read my profile? Date: Thu, 18 Mar 2021 21:59:55 +0700 Message-ID: References: <87a6r5l5bh.fsf@gmail.com> <87ft0x2hbe.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , 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=1616079765; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=kyNV6fNBQOMQ8WIOSEtYWL49IKIEXhcgssWMgkDpDqo=; b=mRsKcwj6ZeQjO6eayt5wBCCVIBrSCXhdUX6tU9mBtaj9pSJQ98M7NvZSdKXehBXvHJAOs2 tXTZvxA5o1q9fMHt55xR8ybBA2HGM2pdGLN1H4oIO6AMQolAb+epTR4jje9xYOC7bJIz84 eYCdlih0mItRn2Hdr4f/IV3nub84vPzmhhwHwTBbr+gkWMYXk7+2x4t71OtTQjCfQ9zV5I vSyI0+ISTYe1c/W2fixVO+QQL0e+22VFUEGUNiO/fw9IaejpddZ0q9UKrzZkpMl3OOReCw Xb4m1Mq5+lP3DFJxSzmnXaj/Pf+dA1jmA9Gi/ibxlmEVrrpcB6UUo+cj54b+yQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616079765; a=rsa-sha256; cv=none; b=OaQwQ7ojz+SzFJ1KvdYNiD3/Fn6qJHcCyCgeX0iUSVluIgAo5kt5mFDbMD24JirJelySHc dBPuoB8c/GKclYYXLP4bID6QZ/6LHLNxmKMOu/j3755H7znUIiD6keNH+Bqko4ZDLt6uxR 4gomsGQwqWLMKazct0pN6K1QPryNwGaahjCn+S2Dr2BySJ3eWKU2o4QQXu6A2UEv8y7R5E 9n9mlFwQMzAYitMMS7EOo2k1pU4PvhIAYhMqgpm1TD0KT14tCp23nmpi9TZFqI9Eigbori 3Dxmi/TsKQ3Ey9va3uY+UJpZ0ePyZo5UnXKviektfZcQsM4IzjEjeUBJXAzmmw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: -0.81 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 61EE62753E X-Spam-Score: -0.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: MW8DQ6l4yoKT On 16/03/2021 20:21, George Mauer wrote: > > I do still wonder what would be the disadvantage of just configuring it > to do --login by default and doing all configuration in profile scripts. At the first glance it at least should not cause great trouble. Most shell stuff is written in fool-proof way to avoid loading interactive features in non-interactive shell or reinitialize login settings in nested shells. Local scripts could be written with less care. I do not think you need completion functions or changing window title during execution of code snippets from emacs. Self-contained org files have some value, you are trying to put some important settings outside. It might be reasonable for personal preferences as account names but hardly should be general practice. On the other hand, I think, it is an equally valid question: What is the profit? For some reason your are avoiding over means to set environment variables. If you wish just exported environment variables, you could always create your own wrapper (untested) #!/bin/bash source ~/.config/wundershrc exec "$0" "$@" On 17/03/2021 03:32, Tim Cross wrote: > It can sometimes help to remember what early Unix > environments were like and what the resource constraints were to > understand some of the design decisions. A time when memory and disk > storage was extremely expensive and in short supply, where CPUs were > slower and less capable than those commonly found in a modern washing > machine. Quite recent story is rewriting init scripts to be able to run them with dash instead of bash as /bin/sh. On the other hand unavailable features require more extensive usage of subprocesses like sed, awk, etc.