emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: How to get shell source blocks to read my profile?
Date: Thu, 18 Mar 2021 21:59:55 +0700	[thread overview]
Message-ID: <s2vptc$15f9$1@ciao.gmane.io> (raw)
In-Reply-To: <CA+pajWKMB36iFd38O+d_uDPsiH73WfbrRy7N7qh9wXP-MM1S=A@mail.gmail.com>

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.



      parent reply	other threads:[~2021-03-18 15:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 21:30 How to get shell source blocks to read my profile? George Mauer
2021-03-14 21:51 ` Tim Cross
2021-03-15  2:35   ` George Mauer
2021-03-15  3:02     ` Tim Cross
2021-03-15 17:49       ` George Mauer
2021-03-15 19:53         ` Tim Cross
2021-03-16  0:52           ` Steven Harris
2021-03-16 12:20         ` Maxim Nikulin
2021-03-16 13:21           ` George Mauer
2021-03-16 16:49             ` Nick Dokos
2021-03-16 20:32             ` Tim Cross
2021-03-18 14:59             ` Maxim Nikulin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='s2vptc$15f9$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).