* Bib file path relative to home using tilde ~ in Ubuntu
@ 2012-10-13 13:54 Sanjib Sikder
2012-10-13 14:11 ` Yagnesh Raghava Yakkala
0 siblings, 1 reply; 13+ messages in thread
From: Sanjib Sikder @ 2012-10-13 13:54 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 609 bytes --]
Hi,
Can I use the bib file path using tilde (~) when doing latex export ?
for example, Why can not I use \bibliography{~/Bib/RefAbv} ?
where my bibliography file name is RefAbv.bib
It gives error : undefined citation
I do not want to use \bibliography{/home/USERNAME/Bib/RefAbv}
I use dropbox. So if I can use tilde , then synchronzation is perfect. I
can work in any machine without changing the path of my bib files.
Also I do not want to put the bib file in my working directory.
I am using Ubuntu 12.04
-----------------------------
*Sanjib Sikder
*Ph.D. Fellow
Chemical Engineering
IIT Bombay*
*
[-- Attachment #2: Type: text/html, Size: 870 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-13 13:54 Bib file path relative to home using tilde ~ in Ubuntu Sanjib Sikder
@ 2012-10-13 14:11 ` Yagnesh Raghava Yakkala
2012-10-13 14:36 ` Sanjib Sikder
0 siblings, 1 reply; 13+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-10-13 14:11 UTC (permalink / raw)
To: Sanjib Sikder; +Cc: emacs-orgmode
Hello Sanjib,
Sanjib Sikder <sanjibju2002@gmail.com> writes:
> Hi,
>
> Can I use the bib file path using tilde (~) when doing latex export ?
>
> for example, Why can not I use \bibliography{~/Bib/RefAbv} ?
> where my bibliography file name is RefAbv.bib
> It gives error : undefined citation
>
> I do not want to use \bibliography{/home/USERNAME/Bib/RefAbv}
>
> I use dropbox. So if I can use tilde , then synchronzation is perfect. I can
> work in any machine without changing the path of my bib files.
>
> Also I do not want to put the bib file in my working directory.
>
> I am using Ubuntu 12.04
Its more of bibtex not finding than org-export problem.
I have this in my .bashrc (~/git/bib is the folder I put my citations)
--8<---------------cut here---------------start------------->8---
export BIBINPUTS=".:$HOME/git/bib:"
export BSTINPUTS=".:$HOME/git/bib:"
export TEXINPUTS=".:$HOME/git/bib:"
--8<---------------cut here---------------end--------------->8---
And in my org file I don't even give any path name..
--8<---------------cut here---------------start------------->8---
\bibliographystyle{plain}
\bibliography{bibfile}
--8<---------------cut here---------------end--------------->8---
Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-13 14:11 ` Yagnesh Raghava Yakkala
@ 2012-10-13 14:36 ` Sanjib Sikder
2012-10-13 17:17 ` Sanjib Sikder
2012-10-13 17:40 ` Yagnesh Raghava Yakkala
0 siblings, 2 replies; 13+ messages in thread
From: Sanjib Sikder @ 2012-10-13 14:36 UTC (permalink / raw)
To: Yagnesh Raghava Yakkala; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]
Hi,
Thank you for the reply.
I have put the following in my .bashrc file
export BIBINPUTS=".:$HOME/bib:"
export BSTINPUTS=".:$HOME/bst:"
export TEXINPUTS=".:$HOME/bib:"
where bib and bst are my two folders whose actual path are
/home/USERNAME/bib for example.
But it is still not working.
Thanks
[I did one mistake, initially instead of placing these in .bashrc, i had
run those in terminal. Is it causing any problem?]
-----------------------------
*Sanjib Sikder
*Ph.D. Fellow
Chemical Engineering
IIT Bombay*
*
On Sat, Oct 13, 2012 at 7:41 PM, Yagnesh Raghava Yakkala <hi@yagnesh.org>wrote:
>
> Hello Sanjib,
>
> Sanjib Sikder <sanjibju2002@gmail.com> writes:
>
> > Hi,
> >
> > Can I use the bib file path using tilde (~) when doing latex export ?
> >
> > for example, Why can not I use \bibliography{~/Bib/RefAbv} ?
> > where my bibliography file name is RefAbv.bib
> > It gives error : undefined citation
> >
> > I do not want to use \bibliography{/home/USERNAME/Bib/RefAbv}
> >
> > I use dropbox. So if I can use tilde , then synchronzation is perfect. I
> can
> > work in any machine without changing the path of my bib files.
> >
> > Also I do not want to put the bib file in my working directory.
> >
> > I am using Ubuntu 12.04
>
> Its more of bibtex not finding than org-export problem.
>
> I have this in my .bashrc (~/git/bib is the folder I put my citations)
>
> --8<---------------cut here---------------start------------->8---
> export BIBINPUTS=".:$HOME/git/bib:"
> export BSTINPUTS=".:$HOME/git/bib:"
> export TEXINPUTS=".:$HOME/git/bib:"
> --8<---------------cut here---------------end--------------->8---
>
> And in my org file I don't even give any path name..
> --8<---------------cut here---------------start------------->8---
> \bibliographystyle{plain}
> \bibliography{bibfile}
> --8<---------------cut here---------------end--------------->8---
>
>
> Thanks.,
> --
> ఎందరో మహానుభావులు అందరికి వందనములు
> YYR
>
[-- Attachment #2: Type: text/html, Size: 2932 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-13 14:36 ` Sanjib Sikder
@ 2012-10-13 17:17 ` Sanjib Sikder
2012-10-13 17:40 ` Yagnesh Raghava Yakkala
1 sibling, 0 replies; 13+ messages in thread
From: Sanjib Sikder @ 2012-10-13 17:17 UTC (permalink / raw)
To: Yagnesh Raghava Yakkala; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2723 bytes --]
Hi,
The following link says Emacs doesn't read .bashrc at all
http://lists.gnu.org/archive/html/auctex/2006-01/msg00085.html
any idea ?
My BIBINPUTS is not working.
I have put the following in my .bashrc file
export BIBINPUTS=".:$HOME/bib:"
export BSTINPUTS=".:$HOME/bst:"
export TEXINPUTS=".:$HOME/bib:"
Thanks
-----------------------------
*Sanjib Sikder
*Ph.D. Fellow
Chemical Engineering
IIT Bombay*
*
On Sat, Oct 13, 2012 at 8:06 PM, Sanjib Sikder <sanjibju2002@gmail.com>wrote:
> Hi,
>
> Thank you for the reply.
>
> I have put the following in my .bashrc file
>
> export BIBINPUTS=".:$HOME/bib:"
> export BSTINPUTS=".:$HOME/bst:"
> export TEXINPUTS=".:$HOME/bib:"
>
>
> where bib and bst are my two folders whose actual path are
> /home/USERNAME/bib for example.
>
> But it is still not working.
>
> Thanks
>
> [I did one mistake, initially instead of placing these in .bashrc, i had
> run those in terminal. Is it causing any problem?]
>
>
> -----------------------------
> *Sanjib Sikder
> *Ph.D. Fellow
> Chemical Engineering
> IIT Bombay*
>
> *
>
>
>
> On Sat, Oct 13, 2012 at 7:41 PM, Yagnesh Raghava Yakkala <hi@yagnesh.org>wrote:
>
>>
>> Hello Sanjib,
>>
>> Sanjib Sikder <sanjibju2002@gmail.com> writes:
>>
>> > Hi,
>> >
>> > Can I use the bib file path using tilde (~) when doing latex export ?
>> >
>> > for example, Why can not I use \bibliography{~/Bib/RefAbv} ?
>> > where my bibliography file name is RefAbv.bib
>> > It gives error : undefined citation
>> >
>> > I do not want to use \bibliography{/home/USERNAME/Bib/RefAbv}
>> >
>> > I use dropbox. So if I can use tilde , then synchronzation is perfect.
>> I can
>> > work in any machine without changing the path of my bib files.
>> >
>> > Also I do not want to put the bib file in my working directory.
>> >
>> > I am using Ubuntu 12.04
>>
>> Its more of bibtex not finding than org-export problem.
>>
>> I have this in my .bashrc (~/git/bib is the folder I put my citations)
>>
>> --8<---------------cut here---------------start------------->8---
>> export BIBINPUTS=".:$HOME/git/bib:"
>> export BSTINPUTS=".:$HOME/git/bib:"
>> export TEXINPUTS=".:$HOME/git/bib:"
>> --8<---------------cut here---------------end--------------->8---
>>
>> And in my org file I don't even give any path name..
>> --8<---------------cut here---------------start------------->8---
>> \bibliographystyle{plain}
>> \bibliography{bibfile}
>> --8<---------------cut here---------------end--------------->8---
>>
>>
>> Thanks.,
>> --
>> ఎందరో మహానుభావులు అందరికి వందనములు
>> YYR
>>
>
>
[-- Attachment #2: Type: text/html, Size: 4143 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-13 14:36 ` Sanjib Sikder
2012-10-13 17:17 ` Sanjib Sikder
@ 2012-10-13 17:40 ` Yagnesh Raghava Yakkala
2012-10-13 18:10 ` Sanjib Sikder
1 sibling, 1 reply; 13+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-10-13 17:40 UTC (permalink / raw)
To: Sanjib Sikder; +Cc: emacs-orgmode
Hello Sanjib,
Sanjib Sikder <sanjibju2002@gmail.com> writes:
> export BIBINPUTS=".:$HOME/bib:"
> export BSTINPUTS=".:$HOME/bst:"
> export TEXINPUTS=".:$HOME/bib:"
Actually TEXINPUTS variable is for tex sources (classes, packages ..). (not
relevant to the current topic)
>
> where bib and bst are my two folders whose actual path are /home/USERNAME/bib
> for example.
>
> But it is still not working.
may be the environment variables didn't get exported. The easiest way to
update is logout from the computer, login again and start emacs.
> [I did one mistake, initially instead of placing these in .bashrc, i had run
> those in terminal. Is it causing any problem?]
I don't think so.
Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-13 17:40 ` Yagnesh Raghava Yakkala
@ 2012-10-13 18:10 ` Sanjib Sikder
2012-10-14 1:54 ` Yagnesh Raghava Yakkala
2012-10-14 4:57 ` Nick Dokos
0 siblings, 2 replies; 13+ messages in thread
From: Sanjib Sikder @ 2012-10-13 18:10 UTC (permalink / raw)
To: Yagnesh Raghava Yakkala; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
Hi,
"The easiest way to update is logout from the computer, login again and
start emacs."
I did that. Still not working :(
-----------------------------
*Sanjib Sikder
*Ph.D. Fellow
Chemical Engineering
IIT Bombay*
*
On Sat, Oct 13, 2012 at 11:10 PM, Yagnesh Raghava Yakkala <hi@yagnesh.org>wrote:
> The easiest way to
> update is logout from the computer, login again and start emacs.
>
[-- Attachment #2: Type: text/html, Size: 926 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-13 18:10 ` Sanjib Sikder
@ 2012-10-14 1:54 ` Yagnesh Raghava Yakkala
2012-10-14 6:23 ` Sanjib Sikder
2012-10-14 4:57 ` Nick Dokos
1 sibling, 1 reply; 13+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-10-14 1:54 UTC (permalink / raw)
To: Sanjib Sikder; +Cc: emacs-orgmode
Hello Sanjib,
Sanjib Sikder <sanjibju2002@gmail.com> writes:
> Hi,
>
> "The easiest way to update is logout from the computer, login again and start
> emacs."
>
> I did that. Still not working :(
First 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---
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---
If you don't get what you set in your .bashrc, means the shell in Emacs is not
getting BIBINPUTS variable.
May 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---
BTW how you are starting emacs? (command line or gui mouse click?)
Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-13 18:10 ` Sanjib Sikder
2012-10-14 1:54 ` Yagnesh Raghava Yakkala
@ 2012-10-14 4:57 ` Nick Dokos
2012-10-14 6:44 ` Sanjib Sikder
2012-10-14 9:42 ` Yagnesh Raghava Yakkala
1 sibling, 2 replies; 13+ messages in thread
From: Nick Dokos @ 2012-10-14 4:57 UTC (permalink / raw)
To: Sanjib Sikder; +Cc: Yagnesh Raghava Yakkala, emacs-orgmode
Sanjib Sikder <sanjibju2002@gmail.com> wrote:
> Hi,
>
> "The easiest way to update is logout from the computer, login again and start emacs."
>
> I did that. Still not working :(
>
When you have problems like this, you need to take it in small
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).
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-14 1:54 ` Yagnesh Raghava Yakkala
@ 2012-10-14 6:23 ` Sanjib Sikder
2012-10-14 7:28 ` Vladimir Lomov
0 siblings, 1 reply; 13+ messages in thread
From: Sanjib Sikder @ 2012-10-14 6:23 UTC (permalink / raw)
To: Yagnesh Raghava Yakkala; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 3423 bytes --]
Hi,
----------------------------------------------------------------------------------------------------------------------------------------
> First 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---
>
*Here is the output*
~$ echo $BIBINPUTS
.//:/home/USERNAME/bst//:.//:/home/USERNAME/bibFiles//:
------------------------------------------------------------------------------------------------------------------------------------------
> 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---
>
*OUTPUT* is: nil
---------------------------------------------------------------------------------------------------------------------------------------------
> May 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 will try this one
-----------------------------------------------------------------------------------------------------------------
BTW how you are starting emacs? (command line or gui mouse click?)
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 .gnomerc
Thanks a lot.
-----------------------------
*Sanjib Sikder
*Ph.D. Fellow
Chemical Engineering
IIT Bombay*
*
On Sun, Oct 14, 2012 at 7:24 AM, Yagnesh Raghava Yakkala <hi@yagnesh.org>wrote:
>
> Hello Sanjib,
>
> Sanjib Sikder <sanjibju2002@gmail.com> writes:
>
> > Hi,
> >
> > "The easiest way to update is logout from the computer, login again and
> start
> > emacs."
> >
> > I did that. Still not working :(
>
> First 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---
>
> 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---
>
> If you don't get what you set in your .bashrc, means the shell in Emacs is
> not
> getting BIBINPUTS variable.
>
> May 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---
>
> BTW how you are starting emacs? (command line or gui mouse click?)
>
> Thanks.,
> --
> ఎందరో మహానుభావులు అందరికి వందనములు
> YYR
>
[-- Attachment #2: Type: text/html, Size: 4961 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-14 4:57 ` Nick Dokos
@ 2012-10-14 6:44 ` Sanjib Sikder
2012-10-14 9:42 ` Yagnesh Raghava Yakkala
1 sibling, 0 replies; 13+ messages in thread
From: Sanjib Sikder @ 2012-10-14 6:44 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Yagnesh Raghava Yakkala, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 5537 bytes --]
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?
>
I am a normal Ubuntu (12.04) user, and recently started to use Emacs (Emacs
snapshot) and loving it very much. I am sorry that I do not understand what
is "Bash shell". I am starting my Emacs GTK either by right clicking on the
.org files or first opening the emacs GTK by clicking on icon.
Try starting emacs from a bash
> command line.[fn:2]
>
Now I started emacs from terminal typing
$ emacs .
Now BIBINPUTS is working with BIBINPUTS lines in .bashrc only (I have
removed the BIBINPUTS lines from .profile, to test one by one)
THANKS A LOT. IT IS WORKING NOW :)
Do I then always need to start emacs from command line ? (I will try with
.profile)
=============================
The following reply was sent to Yagnesh. I am pasting it below as I
understand you also asked these questions.
----------------------------------------------------------------------------------------------------------
>
> First 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---
>>
>
> *Here is the output*
>
> ~$ echo $BIBINPUTS
> .//:/home/USERNAME/bst//:.//:/home/USERNAME/bibFiles//:
>
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> 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---
>>
>
>
> *OUTPUT* is: nil
>
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> May 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 will try this one
>
> -----------------------------------------------------------------------------------------------------------------
>
> BTW how you are starting emacs? (command line or gui mouse click?)
>
>
> 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
> .gnomerc
>
-----------------------------
*Sanjib Sikder
*Ph.D. Fellow
Chemical Engineering
IIT Bombay*
*
On Sun, Oct 14, 2012 at 10:27 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Sanjib Sikder <sanjibju2002@gmail.com> wrote:
>
> > Hi,
> >
> > "The easiest way to update is logout from the computer, login again and
> start emacs."
> >
> > I did that. Still not working :(
> >
>
> When you have problems like this, you need to take it in small
> 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).
>
>
[-- Attachment #2: Type: text/html, Size: 7704 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-14 6:23 ` Sanjib Sikder
@ 2012-10-14 7:28 ` Vladimir Lomov
2012-10-14 15:49 ` Thomas S. Dye
0 siblings, 1 reply; 13+ messages in thread
From: Vladimir Lomov @ 2012-10-14 7:28 UTC (permalink / raw)
To: emacs-orgmode
Hello,
** Sanjib Sikder [2012-10-14 11:53:52 +0530]:
> Hi,
> ----------------------------------------------------------------------------------------------------------------------------------------
>> First 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---
> *Here is the output*
> ~$ echo $BIBINPUTS
> .//:/home/USERNAME/bst//:.//:/home/USERNAME/bibFiles//:
> ------------------------------------------------------------------------------------------------------------------------------------------
>> 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---
> *OUTPUT* is: nil
> ---------------------------------------------------------------------------------------------------------------------------------------------
>> May 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 will try this one
> -----------------------------------------------------------------------------------------------------------------
> BTW how you are starting emacs? (command line or gui mouse click?)
> 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 .gnomerc
You use incorrert path for bibtex files, use
$HOME/texmf/bibtex/bib
this is the standard.
latex as well as bibtex searches for files in standard paths, like the one
above. If your files located in other places you have to set env.
variables (TEXINPUTS and BIBINPUTS). However setting env. variables is a
bit tricky. If one uses only terminal session it is enough to set
variables in apropriate RC files: bash uses ~/.bash_profile and
~/.bashrc depending on type of shell (login or not), for zsh see manual.
When run graphical session it depends what DE and DM are used. GNOME,
Unity launched by gdm or lightdm read user settings from ~/.profile
---
WBR, Vladimir Lomov
--
Walk softly and carry a big stick.
-- Theodore Roosevelt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-14 4:57 ` Nick Dokos
2012-10-14 6:44 ` Sanjib Sikder
@ 2012-10-14 9:42 ` Yagnesh Raghava Yakkala
1 sibling, 0 replies; 13+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-10-14 9:42 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, Sanjib Sikder
Hello Nicholas,
Very good explanation. Its like reading a standard textbook.
Thank you very much for your continuous help to org community.
Nick Dokos <nicholas.dokos@hp.com> writes:
> Sanjib Sikder <sanjibju2002@gmail.com> wrote:
>
>> Hi,
>>
>> "The easiest way to update is logout from the computer, login again and start emacs."
>>
>> I did that. Still not working :(
>>
>
> When you have problems like this, you need to take it in small
> 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).
>
>
>
Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Bib file path relative to home using tilde ~ in Ubuntu
2012-10-14 7:28 ` Vladimir Lomov
@ 2012-10-14 15:49 ` Thomas S. Dye
0 siblings, 0 replies; 13+ messages in thread
From: Thomas S. Dye @ 2012-10-14 15:49 UTC (permalink / raw)
To: Vladimir Lomov; +Cc: emacs-orgmode
Vladimir Lomov <lomov.vl@gmail.com> writes:
> Hello,
> ** Sanjib Sikder [2012-10-14 11:53:52 +0530]:
>
>> Hi,
>> ----------------------------------------------------------------------------------------------------------------------------------------
>
>>> First 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---
>
>
>> *Here is the output*
>
>> ~$ echo $BIBINPUTS
>> .//:/home/USERNAME/bst//:.//:/home/USERNAME/bibFiles//:
>> ------------------------------------------------------------------------------------------------------------------------------------------
>
>>> 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---
>
>
>
>> *OUTPUT* is: nil
>> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>>> May 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 will try this one
>> -----------------------------------------------------------------------------------------------------------------
>
>> BTW how you are starting emacs? (command line or gui mouse click?)
>
>
>> 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 .gnomerc
>
> You use incorrert path for bibtex files, use
> $HOME/texmf/bibtex/bib
> this is the standard.
I don't know which TeX distribution Ubuntu uses. If it is one of the
distributions with kpathsea, then "kpsepath bib" should list standard
paths that will be searched for bibtex files. My system shows nine
locations, including three under my home directory. These locations
work regardless of how emacs is started (from a shell or the gui).
hth,
Tom
>
> latex as well as bibtex searches for files in standard paths, like the one
> above. If your files located in other places you have to set env.
> variables (TEXINPUTS and BIBINPUTS). However setting env. variables is a
> bit tricky. If one uses only terminal session it is enough to set
> variables in apropriate RC files: bash uses ~/.bash_profile and
> ~/.bashrc depending on type of shell (login or not), for zsh see manual.
> When run graphical session it depends what DE and DM are used. GNOME,
> Unity launched by gdm or lightdm read user settings from ~/.profile
>
> ---
> WBR, Vladimir Lomov
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-10-14 15:49 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-13 13:54 Bib file path relative to home using tilde ~ in Ubuntu Sanjib Sikder
2012-10-13 14:11 ` Yagnesh Raghava Yakkala
2012-10-13 14:36 ` Sanjib Sikder
2012-10-13 17:17 ` Sanjib Sikder
2012-10-13 17:40 ` Yagnesh Raghava Yakkala
2012-10-13 18:10 ` Sanjib Sikder
2012-10-14 1:54 ` Yagnesh Raghava Yakkala
2012-10-14 6:23 ` Sanjib Sikder
2012-10-14 7:28 ` Vladimir Lomov
2012-10-14 15:49 ` Thomas S. Dye
2012-10-14 4:57 ` Nick Dokos
2012-10-14 6:44 ` Sanjib Sikder
2012-10-14 9:42 ` Yagnesh Raghava Yakkala
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.