Questions on tag management

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions on tag management

Alexandre F. Santos
Hello,

I have a series of questions on linking tag management:

1 - different collections of tags for different projects?

Since I work on different projects at the same time, I will have a tag
collision problem. Wouldn't it be possible to solve this by having a
vo_tags.tag specific for each project? Otherwise I would have to use a
_tag_Project_tagname nomenclature, which is quite heavy...

2 - can the tag system be made more portable?

I store my files in a subversion repository and check out a working copy on
whatever local system I happen to be using. This means that for the .otl
files to be really portable, I would have to place the vo_tags.tag file also
in the remote repository, and not in the local .vimoutliner/ folder. Is it
possible to put the vo_tags.tag file at the root of each project and tell
vim outliner to use that?

One solution would be to create a symlink in the .vimoutliner to the local
working copy of vo_tags.tag. But this would be only good for a single
vo_tags.tag file...

There is also a problem to define tags, since one needs to define the path
of the linked file until the home folder. But the local working copy may be
located in different places in relation to the home folder, breaking the
link. Is it possible to define tags' paths linking to the project root
(where the local vo_tags.tag would be placed) instead of $HOME?

3 - can one manually make a vo_tags.tag file?

I don't know Perl, so I didn't try to understand the maketags.pl script. But
watching the simple syntax of the vo_tags.tag file (_tag_sometag
/home/me/file.otl  :1) I wonder: is it possible to manually write a
vo_tags.tag file, or is the perl script doing some other black magic?

Thanks for the help and sorry if this already came up, I searched the
mailing list archive without luck,

Alex

--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Questions on tag management

Steve Litt
Hi Alex,

See answers interspersed with your questions...

On Thursday 01 September 2005 10:00 am, Alexandre F. Santos wrote:

> Hello,
>
> I have a series of questions on linking tag management:
>
> 1 - different collections of tags for different projects?
>
> Since I work on different projects at the same time, I will have a tag
> collision problem. Wouldn't it be possible to solve this by having a
> vo_tags.tag specific for each project? Otherwise I would have to use a
> _tag_Project_tagname nomenclature, which is quite heavy...

As far as I know, no -- only one tagfile. I say "as far as I know" because it
is slightly possible that somebody who knows a great deal about tagging/ctags
etc could figure a kludge to keep different tag files for different projects,
but I'm not knowledgeable to do so.

What I do with my outlines is have a single master outline, below which all
interoutline links reside. I frequently run vo_maketags.pl on that master,
and of course it recurses down through all the links. So all my outline
projects are included in that one tagfile.

Of course, you're right about name collisions. I am always careful not to name
something "_tag_book", because there are probably about 30 of them. One thing
I could do is to have vo_maketags.pl issue an error message upon encountering
multiple tags of the same name. Another thing I might be able to do is to
have vo_maketags.pl itself do the
_tag_Project_Subproject_SubSubproject_tagname nomenclature. I think that
would work -- not sure. A definite problem would be that sometimes you want
several outlines linked to one, and that relationship would be upset.

>
> 2 - can the tag system be made more portable?
>
> I store my files in a subversion repository and check out a working copy on
> whatever local system I happen to be using. This means that for the .otl
> files to be really portable, I would have to place the vo_tags.tag file
> also in the remote repository, and not in the local .vimoutliner/ folder.
> Is it possible to put the vo_tags.tag file at the root of each project and
> tell vim outliner to use that?
>
> One solution would be to create a symlink in the .vimoutliner to the local
> working copy of vo_tags.tag. But this would be only good for a single
> vo_tags.tag file...
>
> There is also a problem to define tags, since one needs to define the path
> of the linked file until the home folder. But the local working copy may be
> located in different places in relation to the home folder, breaking the
> link. Is it possible to define tags' paths linking to the project root
> (where the local vo_tags.tag would be placed) instead of $HOME?

To me, the best way to make it portable would be to move the outlines
themselves, and then run vo_maketags on the new machine.

>
> 3 - can one manually make a vo_tags.tag file?

Yes.


> I don't know Perl, so I didn't try to understand the maketags.pl script.
> But watching the simple syntax of the vo_tags.tag file (_tag_sometag
> /home/me/file.otl  :1) I wonder: is it possible to manually write a
> vo_tags.tag file, or is the perl script doing some other black magic?

No black magic. It just scans the master outline looking for _tag_whatever,
then scans the file associated with _tag_whatever, recursively on and on, and
builds the tag file.

vo_maketags.pl is probably the oldest existing technology in the VimOutliner
project. I wrote it in the summer or fall of 2001, when the VO project was
just me, to enable Grandview-like interoutline linking. If somebody could
explain to me more about tagging, I'm sure I could write a multiproject
compliant version, although of course such a version would need some new
outline syntax to tell what project to award the interoutline link. We'd need
to make it so the default is a single tag file just like now so four years of
existing outline hierarchies don't break :-)

Thanks

SteveT

>
> Thanks for the help and sorry if this already came up, I searched the
> mailing list archive without luck,
>
> Alex

--
Steve Litt
Founder and acting president: GoLUG
http://www.golug.org
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Questions on tag management

Stefan Schmiedl
In reply to this post by Alexandre F. Santos
Alexandre F. Santos (01.09. 16:00):

> Hello,
>
> I have a series of questions on linking tag management:
>
> 1 - different collections of tags for different projects?
>
> 2 - can the tag system be made more portable?
>

you might be able to achieve these objectives by using exuberant-ctags,
which is available on many platforms. Take a look at the configuration
file included with the outline calendar, it's possibly a starting point
for further endeavours....

> 3 - can one manually make a vo_tags.tag file?

yes, you can. Actually a tag file for outlines would not be that hard,
as they basically consist of keyword-search pattern/line number pairs,
IIRC. If walking the tree of linked outline files were easier, a pure
vim implementation of maketags.pl would probably exist already.

s.
--
Stefan Schmiedl
+-------------------------------+----------------------------------------+
|Approximity GmbH               | EDV-Beratung Schmiedl                  |
|http://www.approximity.com     | Am Bräuweiher 4, 93499 Zandt, Germany  |
|mailto:[hidden email]  | Tel. (09944) 3068-98, Fax -97          |
+-------------------------------+----------------------------------------+
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Questions on tag management

Alexandre F. Santos
In reply to this post by Steve Litt
> Von: Steve Litt <[hidden email]>
> Datum: Thu, 1 Sep 2005 10:34:48 -0400

> What I do with my outlines is have a single master outline, below which
> all interoutline links reside. I frequently run vo_maketags.pl on that
master,
> and of course it recurses down through all the links. So all my outline
> projects are included in that one tagfile.

It's a good idea to make a single master tag file to simplify tag
management. I had not appreciated that the vo_maketags.pl script was
recursive.

One could have a master tag file indexing each project tag file. But one
would like to be able to check out some subfolders from the repository,
which would contain their local tag files. The problem is that since the
tags have absolute paths until the home, one would have to check out the
entire repository to avoid having to fiddle with the paths.

I guess it would be possible to automatically modify the links with a
find/replace script, but these changes would then be mirrored back to the
repository and you end up with a mess...

> Of course, you're right about name collisions. I am always careful not to
> name
> something "_tag_book", because there are probably about 30 of them. One
> thing
> I could do is to have vo_maketags.pl issue an error message upon
> encountering  multiple tags of the same name.

I guess that's a good idea, since it's a symptom that the user is doing
something wrong and he would be better off knowing about it. One could
allways include such error messages in a --verbose mode.

>Another thing I might be able to do is to
> have vo_maketags.pl itself do the
> _tag_Project_Subproject_SubSubproject_tagname nomenclature. I think that
> would work -- not sure. A definite problem would be that sometimes you
> want
> several outlines linked to one, and that relationship would be upset.

Well, I think maybe that would be a lot of work for you with little gain,
since the users may have wildly different ideas on how to name tags and
subtags. Maybe they are better off building their own nomenclature for their
subprojects.

> > 2 - can the tag system be made more portable?

> To me, the best way to make it portable would be to move the outlines
> themselves, and then run vo_maketags on the new machine.

True, except if you check out subfolders of the repository, since all the
paths will be invalid. And if you adapt them for the new machine, the
changes will be mirrored back to the repository...

If the link path definition could be relative, it would be much easier.


> If somebody could
> explain to me more about tagging, I'm sure I could write a multiproject
> compliant version,...

That would be great, but since I'm already struggling to learn vim/unix
tools, I'm really not the person who could help you...

> SteveT

Thanks for the answears!

Alex

--
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Questions on tag management

Alexandre F. Santos
In reply to this post by Stefan Schmiedl
> Von: Stefan Schmiedl <[hidden email]>
> Datum: Thu, 1 Sep 2005 22:39:19 +0200

> > 2 - can the tag system be made more portable?

> you might be able to achieve these objectives by using exuberant-ctags,
> which is available on many platforms. Take a look at the configuration
> file included with the outline calendar, it's possibly a starting point
> for further endeavours....

Thanks for the pointer, I will inform myself on exuberant-ctags. But it
would have been nice to let vimoutliner deal with tags, instead of having to
install/learn to use another package

> --
> Stefan Schmiedl

Thanks for the indications,

Alex

--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner