texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Absolute versus relative file:... paths


From: Nix
Subject: Re: [Texmacs-dev] Absolute versus relative file:... paths
Date: Thu, 05 Feb 2004 11:50:39 -0700

On Thu, 2004-02-05 at 02:06, David Allouche wrote:
> This kind of problem has been known for a long time, if that really
> bothers you, you should scratch your own itch and submit a patch.

LOL :o)

Unfortunately, this sounds like a really sticky problem.  It also sounds
like the following logic might be something we need:

upon linking a new image:
if unnamed document then
  use absolute paths
else
  use relative paths

upon saving:
if save-for-the-first-time then
  convert-all-paths-to-relative
save

Unfortunately this implies one of 2 things:

Either modify the save operation to also change absolute paths into
relative paths based on the value of a boolean

void save_the_buffer (int bConvertPaths, rest_of_the_parameters)

or write a new function which traverses the document prior to saving
it.  This would make saving-for-the-first-time a two-pass process.

Another weakness I see with this logic is that it creates coupling
between the process of saving a file and the process of linking in
images.  Such coupling may be undesired.

Nonetheless, if this logic is correct, I'll try to implement it. 
However, I can't promise anything, because I may not be familiar enough
with the code to do it.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]