emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sanjib Sikder <sanjibju2002@gmail.com>
To: nicholas.dokos@hp.com
Cc: Yagnesh Raghava Yakkala <hi@yagnesh.org>, emacs-orgmode@gnu.org
Subject: Re: Bib file path relative to home using tilde ~ in Ubuntu
Date: Sun, 14 Oct 2012 12:14:21 +0530	[thread overview]
Message-ID: <CAL1SgUqrU0hzG5DZCn-Njc4jr0HWfEi5eOMdSH_VeKF+J4pUrw@mail.gmail.com> (raw)
In-Reply-To: <14518.1350190655@alphaville>

[-- 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 --]

  reply	other threads:[~2012-10-14  6:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-10-14  9:42           ` Yagnesh Raghava Yakkala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL1SgUqrU0hzG5DZCn-Njc4jr0HWfEi5eOMdSH_VeKF+J4pUrw@mail.gmail.com \
    --to=sanjibju2002@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hi@yagnesh.org \
    --cc=nicholas.dokos@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).