create relative urls when dragging binary files to Leo

35 megtekintés
Ugrás az első olvasatlan üzenetre

Josef

olvasatlan,
2012. júl. 24. 4:59:232012. 07. 24.
– leo-e...@googlegroups.com
I would prefer if the @url created when a binary file (PDF) is dragged into Leo would be a *relative* one,
e.g. if I drag a file foo.pdf, which sits in the same directory as the Leo file into Leo, then I would expect to end up with a headline like:
@url foo.pdf, and not as it is now: @url file:///home/.../foo.pdf.

I would even expect this to be @url ../foo.pdf if the PDF sits in the parent directory or @url ../sibling/foo.pdf if it sits in the sibling directory etc.
Python (os.path) has facilities to build relative paths, so most of the logic for this is already there.

The advantage of a relative path is: I can then move the whole directory tree including Leo file and referenced files and the links still work, and I can share both Leo and referenced files via SVN or similar, since my co-workers are likely to have different absolute paths then I.

In some cases an absolute path is needed, though - so I would suggest to create one by ctrl-dragging or alt-dragging or so.

- Josef

Terry Brown

olvasatlan,
2012. júl. 24. 8:18:572012. 07. 24.
– leo-e...@googlegroups.com
On Tue, 24 Jul 2012 01:59:23 -0700 (PDT)
Josef <joe...@gmx.net> wrote:

> I would prefer if the @url created when a binary file (PDF) is dragged into
> Leo would be a *relative* one,

These sound like worthwhile enhancements, perhaps you could file a
wishlist bug item for them:
https://bugs.launchpad.net/leo-editor

Cheers -Terry

Fidel Pérez

olvasatlan,
2013. máj. 18. 8:02:572013. 05. 18.
– leo-e...@googlegroups.com, terry_...@yahoo.com
Absolutely agree:
Files could fall into two categories:

-Those which are within Leo file relative scope, which can be relative to it. The user losses no information whatsoever by having them always being relative to the Leo file.

-Those which are outside the Leo file folder, which then should be absolute, since the user could potentially lose information if he moved the Leo file
Válasz mindenkinek
Válasz a szerzőnek
Továbbítás
0 új üzenet