Re: [Zim-wiki] Sharing images between notes?

2012-04-23 Thread Yu
2012/4/18 Yu yu_...@gmx.at:
 2012/4/18 Svenn Bjerkem svenn.bjer...@googlemail.com

 On Wed, 2012-04-18 at 13:43 +0200, Yu wrote:
  Hello!
 
  I was wondering, if there is a convenient way to share images (or
  other files) between different notes, that doesn't get broken, when
  moving notes within the notebook or even the notebook to a different
  location / device.
  I know, there is the Document root feature, but as far as I
  understand, its path is not relative to the notebook but global.

 I think the Document Root can be anything you want it to be. I have
 several zim wikis with their own Document root. Can be set in
 File-Properties.

 --
 Svenn

 Thanks, at least this clarifies for me, that indeed Document root is
 a per notebook setting.
 However, can it be set local to the notebooks root folder? This would
 be necessary, e.g. when the notebook resides on an USB stick.

 -- Yu

I did a little test today and set the Document root to ., which was
translated to the absolute path of the notebooks root folder.
Is there some reason for this behaviour? Being able to use something
like . or ./.documentroot directly as the document root would be
useful for the portability of the notebooks across devices.

-- Yu

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Sharing images between notes?

2012-04-23 Thread Jaap Karssenberg
On Mon, Apr 23, 2012 at 11:08 AM, Yu yu_...@gmx.at wrote:
 I did a little test today and set the Document root to ., which was
 translated to the absolute path of the notebooks root folder.
 Is there some reason for this behaviour? Being able to use something
 like . or ./.documentroot directly as the document root would be
 useful for the portability of the notebooks across devices.

The usage of . indeed does not work. But try setting it to
./documentroot or something similar. Works fine with me as relative
path.

-- Jaap

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Sharing images between notes?

2012-04-23 Thread Yu
2012/4/23 Jaap Karssenberg jaap.karssenb...@gmail.com:
 On Mon, Apr 23, 2012 at 11:08 AM, Yu yu_...@gmx.at wrote:
 I did a little test today and set the Document root to ., which was
 translated to the absolute path of the notebooks root folder.
 Is there some reason for this behaviour? Being able to use something
 like . or ./.documentroot directly as the document root would be
 useful for the portability of the notebooks across devices.

 The usage of . indeed does not work. But try setting it to
 ./documentroot or something similar. Works fine with me as relative
 path.

 -- Jaap

How comes? . works for me the same way as does ./documentroot:
They get translated to an absolute path.

Just to be sure: If you set the document root to ./documentroot in
the GUI (File = Properties), and then reopen that dialog, it will
still be recorded as a relative path?

Maybe it should be noted, that my notebooks don't reside in the home
directory, but on windows drive E: (/cygdrive/e/); therefore .
gets translated like this:
.  =  /cygdrive/e/zim-notebooks/Notes/
./documentroot  =  /cygdrive/e/zim-notebooks/Notes/documentroot

-- Yu

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Sharing images between notes?

2012-04-23 Thread Jaap Karssenberg
On Mon, Apr 23, 2012 at 3:35 PM, Yu yu_...@gmx.at wrote:
 2012/4/23 Jaap Karssenberg jaap.karssenb...@gmail.com:
 On Mon, Apr 23, 2012 at 11:08 AM, Yu yu_...@gmx.at wrote:
 I did a little test today and set the Document root to ., which was
 translated to the absolute path of the notebooks root folder.
 Is there some reason for this behaviour? Being able to use something
 like . or ./.documentroot directly as the document root would be
 useful for the portability of the notebooks across devices.

 The usage of . indeed does not work. But try setting it to
 ./documentroot or something similar. Works fine with me as relative
 path.

 -- Jaap

 How comes? . works for me the same way as does ./documentroot:
 They get translated to an absolute path.

Just to be sure, what version are you using ?  This got patched in
version 0.51 by Jiri, so if you are on an older version it will not
work.

 Just to be sure: If you set the document root to ./documentroot in
 the GUI (File = Properties), and then reopen that dialog, it will
 still be recorded as a relative path?

 Maybe it should be noted, that my notebooks don't reside in the home
 directory, but on windows drive E: (/cygdrive/e/); therefore .
 gets translated like this:
    .  =  /cygdrive/e/zim-notebooks/Notes/
    ./documentroot  =  /cygdrive/e/zim-notebooks/Notes/documentroot

I'm running directly under windows, not using cygwin, so I don't know
if the cygwin environment somehow bugs the code when comparing paths.
Did you run the zim test suite under cygwin ? If the path handling is
NOK it should trigger errors in the test cases as well.

Regards,

Jaap

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Sharing images between notes?

2012-04-18 Thread Yu
Hello!

I was wondering, if there is a convenient way to share images (or other
files) between different notes, that doesn't get broken, when moving notes
within the notebook or even the notebook to a different location / device.
I know, there is the Document root feature, but as far as I understand,
its path is not relative to the notebook but global.

I'd use it for two purposes:
1. Refracturing notes (cut/paste wiki-markup between notes that includes
images/equations).
2. Preventing data from being accidentially deleted along with the note.

The closest solution I know right now would be to set the root folder of
the Notebook as document root, but it seems, that would have to be
adjusted, if the notebook is moved around.

king regards, Yu
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Sharing images between notes?

2012-04-18 Thread Svenn Bjerkem
On Wed, 2012-04-18 at 13:43 +0200, Yu wrote:
 Hello!
 
 I was wondering, if there is a convenient way to share images (or
 other files) between different notes, that doesn't get broken, when
 moving notes within the notebook or even the notebook to a different
 location / device.
 I know, there is the Document root feature, but as far as I
 understand, its path is not relative to the notebook but global.

I think the Document Root can be anything you want it to be. I have
several zim wikis with their own Document root. Can be set in
File-Properties.

-- 
Svenn


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Sharing images between notes?

2012-04-18 Thread Jaap Karssenberg
On Wed, Apr 18, 2012 at 1:54 PM, Svenn Bjerkem
svenn.bjer...@googlemail.com wrote:
 On Wed, 2012-04-18 at 13:43 +0200, Yu wrote:
 Hello!

 I was wondering, if there is a convenient way to share images (or
 other files) between different notes, that doesn't get broken, when
 moving notes within the notebook or even the notebook to a different
 location / device.
 I know, there is the Document root feature, but as far as I
 understand, its path is not relative to the notebook but global.

 I think the Document Root can be anything you want it to be. I have
 several zim wikis with their own Document root. Can be set in
 File-Properties.

Correct. And it is intended specific for this purpose. Idea is that
even when the document root is moved, you can update all links at once
just by changing the path in the properties dialog.

Typically it is an absolute path, not related to the notebook (e.g.
~/Documents). But as a special case, if you put the document root
below the notebook folder, the path will be stored relative to the
notebook.

-- Jaap

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Sharing images between notes?

2012-04-18 Thread Yu
2012/4/18 Svenn Bjerkem svenn.bjer...@googlemail.com

 On Wed, 2012-04-18 at 13:43 +0200, Yu wrote:
  Hello!
 
  I was wondering, if there is a convenient way to share images (or
  other files) between different notes, that doesn't get broken, when
  moving notes within the notebook or even the notebook to a different
  location / device.
  I know, there is the Document root feature, but as far as I
  understand, its path is not relative to the notebook but global.

 I think the Document Root can be anything you want it to be. I have
 several zim wikis with their own Document root. Can be set in
 File-Properties.

 --
 Svenn

Thanks, at least this clarifies for me, that indeed Document root is
a per notebook setting.
However, can it be set local to the notebooks root folder? This would
be necessary, e.g. when the notebook resides on an USB stick.

-- Yu

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp