unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Use fsutil with emacs
@ 2007-01-07 20:03 etienne
  2007-01-07 22:37 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: etienne @ 2007-01-07 20:03 UTC (permalink / raw)


Hi,

here is the story of my problem.
I want to have use latex and bibtex on emacs and have only ONE file
with extension .bib
Let call it biblio.bib
Now on my tex files that in other directories, I want to use this file
to make a nice bibliography.
If I write
\bibliography{biblio} it does not work because biblio.bib is not in the
same directory if I put all the path c:\directory\biblio...it does not
work.

So I have try to use an hard link like ln on unix.
For windows the command is fsutil hardlink create <new name> <oldname>
for example
fsutil hardlink create c:\bibliography\localbiblio.bib c:\biblio.bib
if you do that and one modify one file, the other is also modify but
not if it is modify by emacs...may be because emacs doesn't use really
the file but a copy...I don't know.

As anyone as an idea to have only one file with extension .bib or to
solve this fsutil command ?

thanks you very much for your help

Etienne

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Use fsutil with emacs
  2007-01-07 20:03 Use fsutil with emacs etienne
@ 2007-01-07 22:37 ` Stefan Monnier
  2007-01-07 23:08   ` etienne
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2007-01-07 22:37 UTC (permalink / raw)


> here is the story of my problem.
> I want to have use latex and bibtex on emacs and have only ONE file
> with extension .bib
> Let call it biblio.bib
> Now on my tex files that in other directories, I want to use this file
> to make a nice bibliography.
> If I write
> \bibliography{biblio} it does not work because biblio.bib is not in the
> same directory if I put all the path c:\directory\biblio...it does not
> work.

Try it with "C:/directory/biblio..." (i.e. forward slashes).

> So I have try to use an hard link like ln on unix.
> For windows the command is fsutil hardlink create <new name> <oldname>
> for example
> fsutil hardlink create c:\bibliography\localbiblio.bib c:\biblio.bib
> if you do that and one modify one file, the other is also modify but
> not if it is modify by emacs...may be because emacs doesn't use really
> the file but a copy...I don't know.

The problem is that Emacs creates the backup file "foo.bib~" by first moving
"foo.bib" to "foo.bib~" and then creating a new "foo.bib", so the hardlink
ends up in "foo.bib~".  You can fix this problem with:

   (setq backup-by-copying t)


-- Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Use fsutil with emacs
  2007-01-07 22:37 ` Stefan Monnier
@ 2007-01-07 23:08   ` etienne
  0 siblings, 0 replies; 3+ messages in thread
From: etienne @ 2007-01-07 23:08 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1620 bytes --]

Thanks a lot...
both solutions work well...

but I have a small question when you say :
Try it with "C:/directory/biblio..." (i.e. forward slashes).
it is ok if the path does not have a space caracter.
I have try with
c:/Documents and Settings/biblio...
but it does not work. I have also try with
c:/Documents\ and\ Settings/biblio...

have a nice day

Etienne

Stefan Monnier a écrit :

> > here is the story of my problem.
> > I want to have use latex and bibtex on emacs and have only ONE file
> > with extension .bib
> > Let call it biblio.bib
> > Now on my tex files that in other directories, I want to use this file
> > to make a nice bibliography.
> > If I write
> > \bibliography{biblio} it does not work because biblio.bib is not in the
> > same directory if I put all the path c:\directory\biblio...it does not
> > work.
>
> Try it with "C:/directory/biblio..." (i.e. forward slashes).
>
> > So I have try to use an hard link like ln on unix.
> > For windows the command is fsutil hardlink create <new name> <oldname>
> > for example
> > fsutil hardlink create c:\bibliography\localbiblio.bib c:\biblio.bib
> > if you do that and one modify one file, the other is also modify but
> > not if it is modify by emacs...may be because emacs doesn't use really
> > the file but a copy...I don't know.
>
> The problem is that Emacs creates the backup file "foo.bib~" by first moving
> "foo.bib" to "foo.bib~" and then creating a new "foo.bib", so the hardlink
> ends up in "foo.bib~".  You can fix this problem with:
> 
>    (setq backup-by-copying t)
> 
> 
> -- Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-07 23:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-07 20:03 Use fsutil with emacs etienne
2007-01-07 22:37 ` Stefan Monnier
2007-01-07 23:08   ` etienne

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).