Re: environment variables?

2023-10-23 Thread Juergen Fenn



Am 23.10.23 um 10:42 Uhr schrieb Arash Esbati:
> I've read a couple of times that the lisp library
> exec-path-from-shell.el is made for this[1].


This is right. I use it with the current Vanilla Emacs, and it works. I
ran into trouble when I noticed that GNU Emacs on the Mac does not
inherit environment variables when you start it from Finder. Both the
locale for aspell and the env LuaTeX needs were missing. You may use
setenv, but the preferred way on the Mac is to use exec-path-from-shell.

Regards,
Jürgen.



Re: environment variables?

2023-10-23 Thread Rob MacLeod
Hi Tom,

Why not just embed these settings in a .bashrc file (or equivalent)?


### Settings that are defaults--can be updated below


# Set up the TeX environmentals
TEXINPUTS=.:${HOME}/tex/latex:
export TEXINPUTS
BIBINPUTS=.:${HOME}/litbase/bibtex:
export BIBINPUTS
BSTINPUTS=.:${HOME}/tex/bibtex:
export BSTINPUTS

Best,
Rob


> On Oct 23, 2023, at 6:26 AM, Tom Sgouros  wrote:
> 
> Thank you Arash and Ikumi. That gives me something to go on.
> 
>  -Tom
> 
> On Mon, Oct 23, 2023 at 4:42 AM Arash Esbati  > wrote:
>> Tom Sgouros mailto:tsgou...@gmail.com>> writes:
>> 
>> > I'm using a Mac (MacOs 13.2), and if anyone is familiar with the best
>> > way to set environment variables for an Emacs started from the Finder
>> > where there is no environment to inherit I'd love to hear about that,
>> > too. /etc/rc.common does not appear to work for this.
>> 
>> I've read a couple of times that the lisp library
>> exec-path-from-shell.el is made for this[1].  I've never used it,
>> though.  I always start Emacs from the CLI.
>> 
>> Best, Arash
>> 
>> Footnotes:
>> [1]  https://github.com/purcell/exec-path-from-shell



smime.p7s
Description: S/MIME cryptographic signature


Re: environment variables?

2023-10-23 Thread Tom Sgouros
Thank you Arash and Ikumi. That gives me something to go on.

 -Tom

On Mon, Oct 23, 2023 at 4:42 AM Arash Esbati  wrote:

> Tom Sgouros  writes:
>
> > I'm using a Mac (MacOs 13.2), and if anyone is familiar with the best
> > way to set environment variables for an Emacs started from the Finder
> > where there is no environment to inherit I'd love to hear about that,
> > too. /etc/rc.common does not appear to work for this.
>
> I've read a couple of times that the lisp library
> exec-path-from-shell.el is made for this[1].  I've never used it,
> though.  I always start Emacs from the CLI.
>
> Best, Arash
>
> Footnotes:
> [1]  https://github.com/purcell/exec-path-from-shell
>


Re: environment variables?

2023-10-23 Thread Arash Esbati
Tom Sgouros  writes:

> I'm using a Mac (MacOs 13.2), and if anyone is familiar with the best
> way to set environment variables for an Emacs started from the Finder
> where there is no environment to inherit I'd love to hear about that,
> too. /etc/rc.common does not appear to work for this.

I've read a couple of times that the lisp library
exec-path-from-shell.el is made for this[1].  I've never used it,
though.  I always start Emacs from the CLI.

Best, Arash

Footnotes:
[1]  https://github.com/purcell/exec-path-from-shell



Re: environment variables?

2023-10-23 Thread Ikumi Keita
Hi Tom,

> Tom Sgouros  writes:
> How can I set an environment variable necessary for my TeX installation to
> find my local class files? Is there a way within Auctex to do this?

> I'm using a Mac (MacOs 13.2), and if anyone is familiar with the best way
> to set environment variables for an Emacs started from the Finder where
> there is no environment to inherit I'd love to hear about that, too.
> /etc/rc.common does not appear to work for this.

You can use elisp function `setenv'. Put something like this in your
init file (e.g. ~/.emacs.d/init.el):
(setenv "TEXINPUTS" "/abc/def/xyz//:")

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine