bug#19589: 11.88; the `$' in environment variables triggers math mode syntax highlighting

2024-03-03 Thread Arash Esbati
"Blake C. Rawlings"  writes:

> When I use environment variables (such as $HOME) in a .tex file, the $
> triggers math mode syntax highlighting.  The result is that the rest
> of the buffer, until the next $, is highlighted as if it were in math
> mode.  Some examples:
>
> \includegraphics{$HOME/path/to/graphic}
>
> \bibliography{$HOME/path/to/bib1,$HOME/path/to/bib2}
>
>
> I currently use the following hack to get around this behavior:
>
> \bibliography{%
>   $HOME/path/to/bib1,%$
>   $HOME/path/to/bib2,%$
> }
>
> where the second $ on each line "closes" the math mode for
> syntax-highlighting purposes, so at least the rest of the buffer is not
> affected.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.  And my apologies if you get this message twice.)

I don't think this is a bug.  AUCTeX doesn't handle the arguments of
\includgraphics or \bibliography as verbatim text, in contrast to
\verb|$HOME/path/to/graphic|.  So AUCTeX provides the %$ trick at the
end of line as a solution for your use case.

Therefore I'm closing this report.

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


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  <mailto:ar...@gnu.org>> 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



environment variables?

2023-10-22 Thread Tom Sgouros
Hello all:

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.

Thank you,

 -Tom


[AUCTeX] Reloading bibtex environment variables within emacs

2009-09-09 Thread Damian
Hello,

I modified the BIBINPUTS variable so that bibtex can find my .bib
files. So reloading the bash configuration (via 'source ~/.bashrc') I
got bibtex working from the terminal.

Now the question is, how can I make emacs to reload this variable as
well so that I don't get an error when I run bibtex within the editor.

Thanks in advance,
Damian.


___
auctex mailing list
auctex@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex


Re: [AUCTeX] Reloading bibtex environment variables within emacs

2009-09-09 Thread Wenguang Wang
I think you need to let Emacs also have the same environment  
variables.  For example, on *nix, you can start Emacs from the  
terminal window where you have the BIBINPUTS set.  What platform are  
you using?


在 Sep 9, 2009,5:14 AM, Damian 写道:


Hello,

I modified the BIBINPUTS variable so that bibtex can find my .bib
files. So reloading the bash configuration (via 'source ~/.bashrc') I
got bibtex working from the terminal.

Now the question is, how can I make emacs to reload this variable as
well so that I don't get an error when I run bibtex within the editor.

Thanks in advance,
Damian.


___
auctex mailing list
auctex@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex




___
auctex mailing list
auctex@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex


Re: [AUCTeX] Reloading bibtex environment variables within emacs

2009-09-09 Thread Wenguang Wang

You could google how to set global environment variables in Linux.

在 Sep 9, 2009,7:22 AM, Damian 写道:


2009/9/9 Wenguang Wang wenguang.w...@usask.ca:
I think you need to let Emacs also have the same environment  
variables.  For
example, on *nix, you can start Emacs from the terminal window  
where you

have the BIBINPUTS set.  What platform are you using?

Linux, gentoo 2.6.30. Launching emacs from a virtual terminal in X may
be a solution, but a was looking for something more elegant. I launch
emacs using gmrun or dmenu, so I don't know which configuration the
bibtex process launched by emacs reads.



在 Sep 9, 2009,5:14 AM, Damian 写道:


Hello,

I modified the BIBINPUTS variable so that bibtex can find my .bib
files. So reloading the bash configuration (via 'source  
~/.bashrc') I

got bibtex working from the terminal.

Now the question is, how can I make emacs to reload this variable as
well so that I don't get an error when I run bibtex within the  
editor.


Thanks in advance,
Damian.


___
auctex mailing list
auctex@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex







___
auctex mailing list
auctex@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex