Hi Dokos,
o What shell are you using? Yagnesh's recommendation assumes
that you are running bash as your shell (presumably on some
Linux/Unix system). Is this assumption correct?
Try starting emacs from a bash
command line.[fn:2]
----------------------------------------------------------------------------------------------------------Here is the outputFirst of all can you confirm your .bashrc setting is working.?
in the terminal
--8<---------------cut here---------------start------------->8---
echo $BIBINPUTS--8<---------------cut here---------------end--------------->8---
~$ echo $BIBINPUTS
.//:/home/USERNAME/bst//:.//:/home/USERNAME/bibFiles//:
------------------------------------------------------------------------------------------------------------------------------------------OUTPUT is: nil
and also can you check what is the value of BIBINPUTS in emacs.? Within Emacs
evaluate the following (either in scratch buffer or with key press `M-:' or
with `M-x eval-expression')
--8<---------------cut here---------------start------------->8---
(getenv "BIBINPUTS")
--8<---------------cut here---------------end--------------->8---
---------------------------------------------------------------------------------------------------------------------------------------------I will try this oneMay be the last resort would be setting the variable within your .emacs
--8<---------------cut here---------------start------------->8---
(setenv "BIBINPUTS" ".:$HOME/bib:")
--8<---------------cut here---------------end--------------->8---
-----------------------------------------------------------------------------------------------------------------I am starting emacs from GUI mouse click. All the above tests are done only with the .bashrc, i.e., after removing the lines from .profile and .gnomercBTW how you are starting emacs? (command line or gui mouse click?)
Sanjib Sikder <sanjibju2002@gmail.com> wrote:When you have problems like this, you need to take it in small
> Hi,
>
> "The easiest way to update is logout from the computer, login again and start emacs."
>
> I did that. Still not working :(
>
steps.
o What shell are you using? Yagnesh's recommendation assumes
that you are running bash as your shell (presumably on some
Linux/Unix system). Is this assumption correct?
o Assuming you are using bash, there are two relevant initialization
files: a login shell sources $HOME/.profile and any shell (be it a login
shell or one that is started as a descendant of your login shell) sources
$HOME/.bashrc.
o Adding
export FOO=bar
to such an initialization file causes the variable FOO to be defined (with value "bar")
and to be exported (i.e. it is available in the environment of *any* subprocess of
this shell).
o So log out and log back in[fn:2], start a shell and at the prompt say
echo $FOO
Does it say "bar"? If not, don't go any further: the problem has nothing to do with
emacs (note that this is the first time I mention emacs).
o If this part is OK, start emacs *from this shell*: it should inherit the variable.
You can check by evaluating this form:
(getenv "FOO")
Then the variable will also be available to any subprocesses started by emacs.
o In particular, if you define BIBINPUTS as Yagnesh suggests, then the bibtex invoked
by the latex exporter under emacs will find the bib file where you told it.
o What can go wrong? The usual problem is that you use some graphical
desktop environment and start emacs by clicking on some icon. Then
the emacs process does not have a bash shell as its parent, so it does
not inherit the exported variables. Try starting emacs from a bash
command line.[fn:2]
Nick
Footnotes:
[fn:1] If you define it in .bashrc, you shouldn't have to log out and log
back in: just start a new bash shell.
[fn:2] I prefer defining variables in my .profile and I have arranged
for my .profile to be sourced by the appropriate initialization
file of my graphical desktop environment, so I get it whether I
log in at the console or through the graphical login. That
way *every* process, no matter how it is started, has the
variables available to it. I use .bashrc only for aliases (which
I use very rarely, so most of the time I don't have a .bashrc
file at all).