emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get shell source blocks to read my profile?


From: George Mauer
Subject: Re: How to get shell source blocks to read my profile?
Date: Tue, 16 Mar 2021 08:21:15 -0500

I understand why you say that maxim but testing that this worked was the first thing I did and it does work. I was surprised as well. I haven't debugged all the way into the eval functions to see why this works but my guess is that the authors were pretty smart about figuring out which executable to invoke.

As for the problem I'm trying to solve, there isn't one exactly. This is more me hacking on something I don't fully understand because it regularly trips me up.

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. It would be unconventional yes, but it would also make dynamic scoping of environment variable effectively opt-in via --noprofile rather than opt-out (which imo is how it should be). I would assume that uses extra resources or risks improperly handling crashed processes, but I can't find anything to that effect in the docs

On Tue, Mar 16, 2021, 07:32 Maxim Nikulin <manikulin@gmail.com> wrote:
On 16/03/2021 00:49, George Mauer wrote:
>    shell-file-name: "/bin/zsh -i"

I am afraid, you should be prepared to face some problem accidentally.
The value of this variable is used to execute the specified file
("zsh -i" in the "/bin" directory, I do not think, you have such file),
not as a part of shell command. shell-file-name in namely file name to
be executed with shell-command-switch as first argument (separate
arguments, not merged into a string) to run shell commands (next argument).

Environment variables could be set on OS level, inside emacs
https://www.gnu.org/software/emacs/manual/html_node/emacs/Environment.html
, etc. It is hard to suggest something since you have not described the
problem you are trying to solve. Tim in details explained why you
attempt to solve it did not work, but the problem (or the goal) is still
unknown.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]