Getting interoutline linking working under Windows XP

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

Getting interoutline linking working under Windows XP

John Porubek
Hi,

I've been interested in outliners in general (I first became hooked
with Ready! a long time ago), and VimOutliner (since I'm also a
long-time Vim user) specifically, for quite some time. I finally got
around to getting VimOutliner (VO) mostly working under Windows XP
last summer then promptly got sidetracked with other things. I've
recently come back to VO and would really like to get the one last
thing that doesn't work under Windows - interoutline linking -
working.

I've been subscribed to the list for a while, but this is my first
post. I've gotten everything working (including interoutline linking)
under Kubuntu Linux, so I know how things are supposed to work. I've
searched the list archives and saw that there was talk about changing
how interoutline linking is handled (see the thread "Encrypted
outline: was Obvious but don't get it: how do I move outline at N+1 to
N" in early September 2006 and earlier threads in 2005 about using
ctags). It seemed that the consensus was that it could be handled
entirely in Vim (Exuberant Ctags was shunned because it used yet
another third party tool). As far as I can tell, nothing has happened
since.

So, for now, we seem to be stuck with vo_maketags.pl. I've wasted far
too much time trying to get vo_maketags.pl to work correctly under
Windows, first using the perl in Cygwin (too many problems with using
"cygdrive" outside of Cygwin) and then using ActivePerl from
ActiveState. My problems seem to center around the use of "\" in
Windows pathnames (instead of "/" as in Unix), and the fact that, for
my system, the equivalent of $HOME is "C:\Program Files\Vim\vimfile".
The problem with the latter is the cursed space in "Program Files". I
will say that Steve Litt's "Perls of Wisdom"
(http://www.troubleshooters.com/codecorn/littperl/index.htm), wherein
he discusses many of the Perl idioms he uses in vo_maketags.pl, has
been especially useful. However, I still don't have anything that
really works.

So now I'm thinking, before I sink any more time into this, perhaps I
should create a version of vo_maketags in Python (which I know and
like much better than Perl, although I'm still just a beginner). I
would still have to fully "grok" all that's happening in
vo_maketags.pl. Or, perhaps I should give Exuberant Ctags a try,
although I'm not sure how, at this point. But what I'm really hoping
for is that someone else on the list has already gotten interoutline
linking working under Windows, using any of the methods I've alluded
to. I really don't have a strong opinion in the Windows\Linux debate,
although I'm using Linux more and more these days. However, I do feel
strongly that VimOutliner should work properly under Windows as well
as under Linux.

Thanks in advance for any light shed on this topic.

John
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
On Friday 19 September 2008 12:48:26 pm John Porubek wrote:

> Hi,
>
> I've been interested in outliners in general (I first became hooked
> with Ready! a long time ago), and VimOutliner (since I'm also a
> long-time Vim user) specifically, for quite some time. I finally got
> around to getting VimOutliner (VO) mostly working under Windows XP
> last summer then promptly got sidetracked with other things. I've
> recently come back to VO and would really like to get the one last
> thing that doesn't work under Windows - interoutline linking -
> working.
>
> I've been subscribed to the list for a while, but this is my first
> post. I've gotten everything working (including interoutline linking)
> under Kubuntu Linux, so I know how things are supposed to work. I've
> searched the list archives and saw that there was talk about changing
> how interoutline linking is handled (see the thread "Encrypted
> outline: was Obvious but don't get it: how do I move outline at N+1 to
> N" in early September 2006 and earlier threads in 2005 about using
> ctags). It seemed that the consensus was that it could be handled
> entirely in Vim (Exuberant Ctags was shunned because it used yet
> another third party tool). As far as I can tell, nothing has happened
> since.
>
> So, for now, we seem to be stuck with vo_maketags.pl. I've wasted far
> too much time trying to get vo_maketags.pl to work correctly under
> Windows, first using the perl in Cygwin (too many problems with using
> "cygdrive" outside of Cygwin) and then using ActivePerl from
> ActiveState. My problems seem to center around the use of "\" in
> Windows pathnames (instead of "/" as in Unix), and the fact that, for
> my system, the equivalent of $HOME is "C:\Program Files\Vim\vimfile".
> The problem with the latter is the cursed space in "Program Files". I
> will say that Steve Litt's "Perls of Wisdom"
> (http://www.troubleshooters.com/codecorn/littperl/index.htm), wherein
> he discusses many of the Perl idioms he uses in vo_maketags.pl, has
> been especially useful. However, I still don't have anything that
> really works.
>
> So now I'm thinking, before I sink any more time into this, perhaps I
> should create a version of vo_maketags in Python (which I know and
> like much better than Perl, although I'm still just a beginner). I
> would still have to fully "grok" all that's happening in
> vo_maketags.pl. Or, perhaps I should give Exuberant Ctags a try,
> although I'm not sure how, at this point. But what I'm really hoping
> for is that someone else on the list has already gotten interoutline
> linking working under Windows, using any of the methods I've alluded
> to. I really don't have a strong opinion in the Windows\Linux debate,
> although I'm using Linux more and more these days. However, I do feel
> strongly that VimOutliner should work properly under Windows as well
> as under Linux.
>
> Thanks in advance for any light shed on this topic.
>
> John

Hi John,

VO's a 7 year old project, so I can't remember exact times or contents of the
threads I mention. I think almost all of the VO project's email archive is on
gmane.

If memory serves me, a couple years ago we had a discussion on interoutline
linking under Windows, which, as the guy who wrote interoutline linking, I
knew wouldn't work under standard Windows. IIRC, the general concensus was
that Windows users could use Cygwin to get them to work. However, it looks
like that's not working for you.

Some time before that, somebody (I don't remember who), got interoutline
linking to work with some code entirely in Vim. But it wasn't persued,
because Cygwin was available.

Personally, I'd first try Exuberant Ctags. It's supposed to compile under
Windows, and maybe it would work, or maybe it would come close and some small
mods could be made to vo_maketags.pl. Throughout VO's history, we've tried to
pawn off as much functionality on other engines, like Vim and Ctags, rather
than writing it ourselves (see our body text for an example :-).

If that doesn't work, perhaps a rewrite of vo_maketags, using python if you
prefer, would be the way to go. But please remember that it must be backward
compatible so as to not break numerous existing VO files created over the
past 8 years.

Perhaps it would be easier not to use Ctags at all. The only reason for using
Ctags in the first place is, for a guy who knew only Perl and no Vim, Ctags
was the easiest way to get Vim to pull up the required file. Today, lots of
VO people know how to write Vim code to pull up a specified file.

Interoutline linking is really nothing but a table lookup, with vo_maketags
building that table. Today that table is maintained by Ctags, but it could
just as easily be a hash table, or perhaps a fixed length sequential index
that can be binary searched quickly, and the found record points to the file
offset of the file containing filenames.

Whatever you do, please preserve the feature where the next file is relative
to the current one. For instance, if /home/slitt/a.otl has:

_tag_b
        b/b.otl

and b.otl has:

_tag_c
        c/c.otl

Then a.otl would be in /home/slitt, b.otl would be in /home/slitt/b/b.otl, and
c.otl would be in /home/slitt/b/c/c.otl. Also, please preserve the ability to
do absolute links:

_tag_c
        /home/slitt/b/c/c.otl

SteveT



Steve Litt
Recession Relief Package
http://www.recession-relief.US

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Noel Henson
In reply to this post by John Porubek
On Friday 19 September 2008, John Porubek wrote:

> Hi,
>
> I've been interested in outliners in general (I first became hooked
> with Ready! a long time ago), and VimOutliner (since I'm also a
> long-time Vim user) specifically, for quite some time. I finally got
> around to getting VimOutliner (VO) mostly working under Windows XP
> last summer then promptly got sidetracked with other things. I've
> recently come back to VO and would really like to get the one last
> thing that doesn't work under Windows - interoutline linking -
> working.
>
> I've been subscribed to the list for a while, but this is my first
> post. I've gotten everything working (including interoutline linking)
> under Kubuntu Linux, so I know how things are supposed to work. I've
> searched the list archives and saw that there was talk about changing
> how interoutline linking is handled (see the thread "Encrypted
> outline: was Obvious but don't get it: how do I move outline at N+1 to
> N" in early September 2006 and earlier threads in 2005 about using
> ctags). It seemed that the consensus was that it could be handled
> entirely in Vim (Exuberant Ctags was shunned because it used yet
> another third party tool). As far as I can tell, nothing has happened
> since.
>
> So, for now, we seem to be stuck with vo_maketags.pl. I've wasted far
> too much time trying to get vo_maketags.pl to work correctly under
> Windows, first using the perl in Cygwin (too many problems with using
> "cygdrive" outside of Cygwin) and then using ActivePerl from
> ActiveState. My problems seem to center around the use of "\" in
> Windows pathnames (instead of "/" as in Unix), and the fact that, for
> my system, the equivalent of $HOME is "C:\Program Files\Vim\vimfile".
> The problem with the latter is the cursed space in "Program Files". I
> will say that Steve Litt's "Perls of Wisdom"
> (http://www.troubleshooters.com/codecorn/littperl/index.htm), wherein
> he discusses many of the Perl idioms he uses in vo_maketags.pl, has
> been especially useful. However, I still don't have anything that
> really works.
>
> So now I'm thinking, before I sink any more time into this, perhaps I
> should create a version of vo_maketags in Python (which I know and
> like much better than Perl, although I'm still just a beginner). I
> would still have to fully "grok" all that's happening in
> vo_maketags.pl. Or, perhaps I should give Exuberant Ctags a try,
> although I'm not sure how, at this point. But what I'm really hoping
> for is that someone else on the list has already gotten interoutline
> linking working under Windows, using any of the methods I've alluded
> to. I really don't have a strong opinion in the Windows\Linux debate,
> although I'm using Linux more and more these days. However, I do feel
> strongly that VimOutliner should work properly under Windows as well
> as under Linux.
>
> Thanks in advance for any light shed on this topic.
>
> John
> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

John,

I'm investigating a way to use Vim's own help-tags method of resolving the
issue. I should have some feedback for you if it will work in a few days.  
If I have something good, I'll share it so people can try it.

Have a nice weekend,
Noel

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

John Porubek
In reply to this post by Steve Litt
Steve,

Thank you for the thoughtful, informative reply. When I first stumbled
upon VimOutliner, I also found the similarly named "The Vim Outliner
(TVO)". When trying to decide which one to invest my limited spare
time and mental energy in, the strong user participation and active,
friendly mailing list swayed me toward VimOutliner. I haven't
regretted the choice.

While reading your message, it occurred to me that I could try running
everything (Vim, VimOutliner, and vo_maketags.pl) *inside* Cygwin as a
quick work-around for getting interoutline linking working on my
Windows XP machine. Perhaps that is how the others you mentioned got
VimOutliner fully working in Windows using Cygwin.

However, this would lead to redundant versions of Vim and VimOutliner,
since I already have almost everything else working independently of
Cygwin. It would be less esthetically pleasing but may suffice until I
get more time to work on the problem or else somebody else comes up
with a "pure" solution that works under Windows.

If I were to come up with another solution, rest assured that it would
maintain backwards compatibility and "preserve the feature where the
next file is relative to the current one".

Thanks again,

John

On Fri, Sep 19, 2008 at 6:22 PM, Steve Litt <[hidden email]> wrote:

> On Friday 19 September 2008 12:48:26 pm John Porubek wrote:
>> Hi,
>>
>> I've been interested in outliners in general (I first became hooked
>> with Ready! a long time ago), and VimOutliner (since I'm also a
>> long-time Vim user) specifically, for quite some time. I finally got
>> around to getting VimOutliner (VO) mostly working under Windows XP
>> last summer then promptly got sidetracked with other things. I've
>> recently come back to VO and would really like to get the one last
>> thing that doesn't work under Windows - interoutline linking -
>> working.
>>
>> I've been subscribed to the list for a while, but this is my first
>> post. I've gotten everything working (including interoutline linking)
>> under Kubuntu Linux, so I know how things are supposed to work. I've
>> searched the list archives and saw that there was talk about changing
>> how interoutline linking is handled (see the thread "Encrypted
>> outline: was Obvious but don't get it: how do I move outline at N+1 to
>> N" in early September 2006 and earlier threads in 2005 about using
>> ctags). It seemed that the consensus was that it could be handled
>> entirely in Vim (Exuberant Ctags was shunned because it used yet
>> another third party tool). As far as I can tell, nothing has happened
>> since.
>>
>> So, for now, we seem to be stuck with vo_maketags.pl. I've wasted far
>> too much time trying to get vo_maketags.pl to work correctly under
>> Windows, first using the perl in Cygwin (too many problems with using
>> "cygdrive" outside of Cygwin) and then using ActivePerl from
>> ActiveState. My problems seem to center around the use of "\" in
>> Windows pathnames (instead of "/" as in Unix), and the fact that, for
>> my system, the equivalent of $HOME is "C:\Program Files\Vim\vimfile".
>> The problem with the latter is the cursed space in "Program Files". I
>> will say that Steve Litt's "Perls of Wisdom"
>> (http://www.troubleshooters.com/codecorn/littperl/index.htm), wherein
>> he discusses many of the Perl idioms he uses in vo_maketags.pl, has
>> been especially useful. However, I still don't have anything that
>> really works.
>>
>> So now I'm thinking, before I sink any more time into this, perhaps I
>> should create a version of vo_maketags in Python (which I know and
>> like much better than Perl, although I'm still just a beginner). I
>> would still have to fully "grok" all that's happening in
>> vo_maketags.pl. Or, perhaps I should give Exuberant Ctags a try,
>> although I'm not sure how, at this point. But what I'm really hoping
>> for is that someone else on the list has already gotten interoutline
>> linking working under Windows, using any of the methods I've alluded
>> to. I really don't have a strong opinion in the Windows\Linux debate,
>> although I'm using Linux more and more these days. However, I do feel
>> strongly that VimOutliner should work properly under Windows as well
>> as under Linux.
>>
>> Thanks in advance for any light shed on this topic.
>>
>> John
>
> Hi John,
>
> VO's a 7 year old project, so I can't remember exact times or contents of the
> threads I mention. I think almost all of the VO project's email archive is on
> gmane.
>
> If memory serves me, a couple years ago we had a discussion on interoutline
> linking under Windows, which, as the guy who wrote interoutline linking, I
> knew wouldn't work under standard Windows. IIRC, the general concensus was
> that Windows users could use Cygwin to get them to work. However, it looks
> like that's not working for you.
>
> Some time before that, somebody (I don't remember who), got interoutline
> linking to work with some code entirely in Vim. But it wasn't persued,
> because Cygwin was available.
>
> Personally, I'd first try Exuberant Ctags. It's supposed to compile under
> Windows, and maybe it would work, or maybe it would come close and some small
> mods could be made to vo_maketags.pl. Throughout VO's history, we've tried to
> pawn off as much functionality on other engines, like Vim and Ctags, rather
> than writing it ourselves (see our body text for an example :-).
>
> If that doesn't work, perhaps a rewrite of vo_maketags, using python if you
> prefer, would be the way to go. But please remember that it must be backward
> compatible so as to not break numerous existing VO files created over the
> past 8 years.
>
> Perhaps it would be easier not to use Ctags at all. The only reason for using
> Ctags in the first place is, for a guy who knew only Perl and no Vim, Ctags
> was the easiest way to get Vim to pull up the required file. Today, lots of
> VO people know how to write Vim code to pull up a specified file.
>
> Interoutline linking is really nothing but a table lookup, with vo_maketags
> building that table. Today that table is maintained by Ctags, but it could
> just as easily be a hash table, or perhaps a fixed length sequential index
> that can be binary searched quickly, and the found record points to the file
> offset of the file containing filenames.
>
> Whatever you do, please preserve the feature where the next file is relative
> to the current one. For instance, if /home/slitt/a.otl has:
>
> _tag_b
>        b/b.otl
>
> and b.otl has:
>
> _tag_c
>        c/c.otl
>
> Then a.otl would be in /home/slitt, b.otl would be in /home/slitt/b/b.otl, and
> c.otl would be in /home/slitt/b/c/c.otl. Also, please preserve the ability to
> do absolute links:
>
> _tag_c
>        /home/slitt/b/c/c.otl
>
> SteveT
>
>
>
> Steve Litt
> Recession Relief Package
> http://www.recession-relief.US
>
> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
>
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

John Porubek
In reply to this post by Noel Henson
Noel,

It would be great if you could come up with a way to support
interoutline linking using Vim's own help-tags. That would be far more
"esthetically pleasing" than any separate tool. I'll wait for feedback
on your efforts in eager anticipation!

Thanks for your efforts,

John

On Fri, Sep 19, 2008 at 9:51 PM, Noel Henson <[hidden email]> wrote:

> On Friday 19 September 2008, John Porubek wrote:
>> Hi,
>>
>> I've been interested in outliners in general (I first became hooked
>> with Ready! a long time ago), and VimOutliner (since I'm also a
>> long-time Vim user) specifically, for quite some time. I finally got
>> around to getting VimOutliner (VO) mostly working under Windows XP
>> last summer then promptly got sidetracked with other things. I've
>> recently come back to VO and would really like to get the one last
>> thing that doesn't work under Windows - interoutline linking -
>> working.
>>
>> I've been subscribed to the list for a while, but this is my first
>> post. I've gotten everything working (including interoutline linking)
>> under Kubuntu Linux, so I know how things are supposed to work. I've
>> searched the list archives and saw that there was talk about changing
>> how interoutline linking is handled (see the thread "Encrypted
>> outline: was Obvious but don't get it: how do I move outline at N+1 to
>> N" in early September 2006 and earlier threads in 2005 about using
>> ctags). It seemed that the consensus was that it could be handled
>> entirely in Vim (Exuberant Ctags was shunned because it used yet
>> another third party tool). As far as I can tell, nothing has happened
>> since.
>>
>> So, for now, we seem to be stuck with vo_maketags.pl. I've wasted far
>> too much time trying to get vo_maketags.pl to work correctly under
>> Windows, first using the perl in Cygwin (too many problems with using
>> "cygdrive" outside of Cygwin) and then using ActivePerl from
>> ActiveState. My problems seem to center around the use of "\" in
>> Windows pathnames (instead of "/" as in Unix), and the fact that, for
>> my system, the equivalent of $HOME is "C:\Program Files\Vim\vimfile".
>> The problem with the latter is the cursed space in "Program Files". I
>> will say that Steve Litt's "Perls of Wisdom"
>> (http://www.troubleshooters.com/codecorn/littperl/index.htm), wherein
>> he discusses many of the Perl idioms he uses in vo_maketags.pl, has
>> been especially useful. However, I still don't have anything that
>> really works.
>>
>> So now I'm thinking, before I sink any more time into this, perhaps I
>> should create a version of vo_maketags in Python (which I know and
>> like much better than Perl, although I'm still just a beginner). I
>> would still have to fully "grok" all that's happening in
>> vo_maketags.pl. Or, perhaps I should give Exuberant Ctags a try,
>> although I'm not sure how, at this point. But what I'm really hoping
>> for is that someone else on the list has already gotten interoutline
>> linking working under Windows, using any of the methods I've alluded
>> to. I really don't have a strong opinion in the Windows\Linux debate,
>> although I'm using Linux more and more these days. However, I do feel
>> strongly that VimOutliner should work properly under Windows as well
>> as under Linux.
>>
>> Thanks in advance for any light shed on this topic.
>>
>> John
>> _______________________________________________
>> VimOutliner mailing list
>> [hidden email]
>> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
>
> John,
>
> I'm investigating a way to use Vim's own help-tags method of resolving the
> issue. I should have some feedback for you if it will work in a few days.
> If I have something good, I'll share it so people can try it.
>
> Have a nice weekend,
> Noel
>
> --
>
> ------------------------------------------------------------------
>  Noel Henson
>  www.noels-lab.com     Chips, firmware and embedded systems
>  www.vimoutliner.org   Work fast. Think well.
>
> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
>
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
Hi Noel,

I'd imagine myself to be one of the heaviest users of interoutline linking.
Here are some stats on my system:

[slitt@mydesk .vimoutliner]$ wc vo_tags.tag
  462  1386 24038 vo_tags.tag
[slitt@mydesk .vimoutliner]$ time cat vo_tags.tag > /dev/null
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+186minor)pagefaults 0swaps
[slitt@mydesk .vimoutliner]$ time grep _tag_weakpoints vo_tags.tag
_tag_weakpoints /d/otl/scc/weakpoints.otl       :1
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+234minor)pagefaults 0swaps
[slitt@mydesk .vimoutliner]$

I have 462 lines in my tag file -- in otherwords 462 interoutline links.
Sequential searching this file is almost instantaneous, as is grepping a tag
toward the bottom.

What this says to me is that, for a user with my level of interoutline
linking, a simple sequential search on lines would suffice. That would render
unnecessary things like hashes, fixed length sequential index files, or any
type of special data structures. As long as the user interface of rebuilding
and of goto link and return from link doesn't change, any old data structure
could be used. For that matter, Vim could simply use the existing vo_tags.tag
file for that matter.

Thanks

SteveT


On Monday 22 September 2008 11:49:46 am John Porubek wrote:

> Noel,
>
> It would be great if you could come up with a way to support
> interoutline linking using Vim's own help-tags. That would be far more
> "esthetically pleasing" than any separate tool. I'll wait for feedback
> on your efforts in eager anticipation!
>
> Thanks for your efforts,
>
> John
>
> On Fri, Sep 19, 2008 at 9:51 PM, Noel Henson <[hidden email]> wrote:
> > On Friday 19 September 2008, John Porubek wrote:
> >> Hi,
> >>
> >> I've been interested in outliners in general (I first became hooked
> >> with Ready! a long time ago), and VimOutliner (since I'm also a
> >> long-time Vim user) specifically, for quite some time. I finally got
> >> around to getting VimOutliner (VO) mostly working under Windows XP
> >> last summer then promptly got sidetracked with other things. I've
> >> recently come back to VO and would really like to get the one last
> >> thing that doesn't work under Windows - interoutline linking -
> >> working.
> >>
> >> I've been subscribed to the list for a while, but this is my first
> >> post. I've gotten everything working (including interoutline linking)
> >> under Kubuntu Linux, so I know how things are supposed to work. I've
> >> searched the list archives and saw that there was talk about changing
> >> how interoutline linking is handled (see the thread "Encrypted
> >> outline: was Obvious but don't get it: how do I move outline at N+1 to
> >> N" in early September 2006 and earlier threads in 2005 about using
> >> ctags). It seemed that the consensus was that it could be handled
> >> entirely in Vim (Exuberant Ctags was shunned because it used yet
> >> another third party tool). As far as I can tell, nothing has happened
> >> since.
> >>
> >> So, for now, we seem to be stuck with vo_maketags.pl. I've wasted far
> >> too much time trying to get vo_maketags.pl to work correctly under
> >> Windows, first using the perl in Cygwin (too many problems with using
> >> "cygdrive" outside of Cygwin) and then using ActivePerl from
> >> ActiveState. My problems seem to center around the use of "\" in
> >> Windows pathnames (instead of "/" as in Unix), and the fact that, for
> >> my system, the equivalent of $HOME is "C:\Program Files\Vim\vimfile".
> >> The problem with the latter is the cursed space in "Program Files". I
> >> will say that Steve Litt's "Perls of Wisdom"
> >> (http://www.troubleshooters.com/codecorn/littperl/index.htm), wherein
> >> he discusses many of the Perl idioms he uses in vo_maketags.pl, has
> >> been especially useful. However, I still don't have anything that
> >> really works.
> >>
> >> So now I'm thinking, before I sink any more time into this, perhaps I
> >> should create a version of vo_maketags in Python (which I know and
> >> like much better than Perl, although I'm still just a beginner). I
> >> would still have to fully "grok" all that's happening in
> >> vo_maketags.pl. Or, perhaps I should give Exuberant Ctags a try,
> >> although I'm not sure how, at this point. But what I'm really hoping
> >> for is that someone else on the list has already gotten interoutline
> >> linking working under Windows, using any of the methods I've alluded
> >> to. I really don't have a strong opinion in the Windows\Linux debate,
> >> although I'm using Linux more and more these days. However, I do feel
> >> strongly that VimOutliner should work properly under Windows as well
> >> as under Linux.
> >>
> >> Thanks in advance for any light shed on this topic.
> >>
> >> John
> >> _______________________________________________
> >> VimOutliner mailing list
> >> [hidden email]
> >> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
> >
> > John,
> >
> > I'm investigating a way to use Vim's own help-tags method of resolving
> > the issue. I should have some feedback for you if it will work in a few
> > days. If I have something good, I'll share it so people can try it.
> >
> > Have a nice weekend,
> > Noel
> >
> > --
> >
> > ------------------------------------------------------------------
> >  Noel Henson
> >  www.noels-lab.com     Chips, firmware and embedded systems
> >  www.vimoutliner.org   Work fast. Think well.
> >
> > _______________________________________________
> > VimOutliner mailing list
> > [hidden email]
> > http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
>
> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner


_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
In reply to this post by John Porubek
On Friday 19 September 2008 12:48:26 pm John Porubek wrote:

> So, for now, we seem to be stuck with vo_maketags.pl. I've wasted far
> too much time trying to get vo_maketags.pl to work correctly under
> Windows, first using the perl in Cygwin (too many problems with using
> "cygdrive" outside of Cygwin) and then using ActivePerl from
> ActiveState. My problems seem to center around the use of "\" in
> Windows pathnames (instead of "/" as in Unix), and the fact that, for
> my system, the equivalent of $HOME is "C:\Program Files\Vim\vimfile".
> The problem with the latter is the cursed space in "Program Files". I
> will say that Steve Litt's "Perls of Wisdom"
> (http://www.troubleshooters.com/codecorn/littperl/index.htm), wherein
> he discusses many of the Perl idioms he uses in vo_maketags.pl, has
> been especially useful. However, I still don't have anything that
> really works.

Hi John,

Please run vo_maketags.pl on your top level outline, and email the resulting
vo_tags.tag file to the list. I've just looked at vo_maketags.pl, and it's
not rocket science. Assuming cwd() does the right thing in Windows, meaning
both drive and directory and correct path separator, only very small changes
would be required. Once we have a Windows-aware vo_tags.tag file, the next
step is to see whether Windows Vim correctly accesses tags. If not, the tag
to file lookup can be done directly from VimOutliner using Vim language.

What Perl are you using right now on Windows? You mentioned rewriting in
Python -- what Python would you use in Windows? The reason I ask is, last
time I looked, I don't think ActiveState Perl or Python for Windows were free
software. Activestate is free as in beer, but very restricted on direct
redistribution. AFAIK Ruby for Windows is free software (as it is on Linux),
but Ruby doesn't have a large mindshare on this project.

Are there any interpreters that are universally available on Windows the way
Perl is universally available on Linux/Unix/BSD?

Anyway, I doubt it will be difficult to implement interoutline linking on
Windows. Personally, I think if we're going to get it working under Windows,
we should get it working all the way back to Windows 95, and all the way
forward to at least Vista.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Noel Henson
In reply to this post by Steve Litt
Guys,

I've tried different ways to use helptags and tags and vo_maketags.pl.  
I think I have decided that using vim's own tags support will be best. It
is a superset of helptags. I've run some simple tests and like the results.  
I would like to take the functions of vo_maketags.pl duplicate them in
vimscript with some additional features.

Let's see if this makes sense:

* A master otl file (defaulting to master.otl) would be created for each
set of interlinked outlines.

* Any filename that ended in '.otl' would be considered a target tag link
without the need for the '_tag_' prefix.

* Actually, a list of suffixes like '.otl', '.txt', etc. could be
configured by the user.

* Any filename that was prefixed with '_tag_' would be considered a target
tag link for both backward compatibility and for instances where vim's
guessing about whether or not to make a link would or could be erroneous.

* Every target link would also be added to the sessions syntax
highlighting so it would be shown as underlined text. Of course the actual
highlighting option would be user-configurable.

* The tags file would be created by an integrated vimscript utility so
cross-platform functionality is preserved.
 
* For heading-linking (not the aforementioned file linking) the syntax
_heading_ syntax could be used as the target link (much like an <a href>
tag). Any occurrence of 'heading' could be jumped to / cycled through using
vim's tags navigation features.

Let me know what you think,

Noel

On Monday 22 September 2008, Steve Litt wrote:

> Hi Noel,
>
> I'd imagine myself to be one of the heaviest users of interoutline
> linking. Here are some stats on my system:
>
> [slitt@mydesk .vimoutliner]$ wc vo_tags.tag
>   462  1386 24038 vo_tags.tag
> [slitt@mydesk .vimoutliner]$ time cat vo_tags.tag > /dev/null
> 0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata
> 0maxresident)k 0inputs+0outputs (0major+186minor)pagefaults 0swaps
> [slitt@mydesk .vimoutliner]$ time grep _tag_weakpoints vo_tags.tag
> _tag_weakpoints /d/otl/scc/weakpoints.otl       :1
> 0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata
> 0maxresident)k 0inputs+0outputs (0major+234minor)pagefaults 0swaps
> [slitt@mydesk .vimoutliner]$
>
> I have 462 lines in my tag file -- in otherwords 462 interoutline links.
> Sequential searching this file is almost instantaneous, as is grepping a
> tag toward the bottom.
>
> What this says to me is that, for a user with my level of interoutline
> linking, a simple sequential search on lines would suffice. That would
> render unnecessary things like hashes, fixed length sequential index
> files, or any type of special data structures. As long as the user
> interface of rebuilding and of goto link and return from link doesn't
> change, any old data structure could be used. For that matter, Vim could
> simply use the existing vo_tags.tag file for that matter.
>
> Thanks
>
> SteveT
>
> On Monday 22 September 2008 11:49:46 am John Porubek wrote:
> > Noel,
> >
> > It would be great if you could come up with a way to support
> > interoutline linking using Vim's own help-tags. That would be far more
> > "esthetically pleasing" than any separate tool. I'll wait for feedback
> > on your efforts in eager anticipation!
> >
> > Thanks for your efforts,
> >
> > John
> >
> > On Fri, Sep 19, 2008 at 9:51 PM, Noel Henson <[hidden email]>
wrote:

> > > On Friday 19 September 2008, John Porubek wrote:
> > >> Hi,
> > >>
> > >> I've been interested in outliners in general (I first became hooked
> > >> with Ready! a long time ago), and VimOutliner (since I'm also a
> > >> long-time Vim user) specifically, for quite some time. I finally
> > >> got around to getting VimOutliner (VO) mostly working under Windows
> > >> XP last summer then promptly got sidetracked with other things.
> > >> I've recently come back to VO and would really like to get the one
> > >> last thing that doesn't work under Windows - interoutline linking -
> > >> working.
> > >>
> > >> I've been subscribed to the list for a while, but this is my first
> > >> post. I've gotten everything working (including interoutline
> > >> linking) under Kubuntu Linux, so I know how things are supposed to
> > >> work. I've searched the list archives and saw that there was talk
> > >> about changing how interoutline linking is handled (see the thread
> > >> "Encrypted outline: was Obvious but don't get it: how do I move
> > >> outline at N+1 to N" in early September 2006 and earlier threads in
> > >> 2005 about using ctags). It seemed that the consensus was that it
> > >> could be handled entirely in Vim (Exuberant Ctags was shunned
> > >> because it used yet another third party tool). As far as I can
> > >> tell, nothing has happened since.
> > >>
> > >> So, for now, we seem to be stuck with vo_maketags.pl. I've wasted
> > >> far too much time trying to get vo_maketags.pl to work correctly
> > >> under Windows, first using the perl in Cygwin (too many problems
> > >> with using "cygdrive" outside of Cygwin) and then using ActivePerl
> > >> from ActiveState. My problems seem to center around the use of "\"
> > >> in Windows pathnames (instead of "/" as in Unix), and the fact
> > >> that, for my system, the equivalent of $HOME is "C:\Program
> > >> Files\Vim\vimfile". The problem with the latter is the cursed space
> > >> in "Program Files". I will say that Steve Litt's "Perls of Wisdom"
> > >> (http://www.troubleshooters.com/codecorn/littperl/index.htm),
> > >> wherein he discusses many of the Perl idioms he uses in
> > >> vo_maketags.pl, has been especially useful. However, I still don't
> > >> have anything that really works.
> > >>
> > >> So now I'm thinking, before I sink any more time into this, perhaps
> > >> I should create a version of vo_maketags in Python (which I know
> > >> and like much better than Perl, although I'm still just a
> > >> beginner). I would still have to fully "grok" all that's happening
> > >> in
> > >> vo_maketags.pl. Or, perhaps I should give Exuberant Ctags a try,
> > >> although I'm not sure how, at this point. But what I'm really
> > >> hoping for is that someone else on the list has already gotten
> > >> interoutline linking working under Windows, using any of the
> > >> methods I've alluded to. I really don't have a strong opinion in
> > >> the Windows\Linux debate, although I'm using Linux more and more
> > >> these days. However, I do feel strongly that VimOutliner should
> > >> work properly under Windows as well as under Linux.
> > >>
> > >> Thanks in advance for any light shed on this topic.
> > >>
> > >> John
> > >> _______________________________________________
> > >> VimOutliner mailing list
> > >> [hidden email]
> > >> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
> > >
> > > John,
> > >
> > > I'm investigating a way to use Vim's own help-tags method of
> > > resolving the issue. I should have some feedback for you if it will
> > > work in a few days. If I have something good, I'll share it so
> > > people can try it.
> > >
> > > Have a nice weekend,
> > > Noel
> > >
> > > --
> > >
> > > ------------------------------------------------------------------
> > >  Noel Henson
> > >  www.noels-lab.com     Chips, firmware and embedded systems
> > >  www.vimoutliner.org   Work fast. Think well.
> > >
> > > _______________________________________________
> > > VimOutliner mailing list
> > > [hidden email]
> > > http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
> >
> > _______________________________________________
> > VimOutliner mailing list
> > [hidden email]
> > http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
>
> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner



--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
On Monday 22 September 2008 01:34:54 pm Noel Henson wrote:

> Guys,
>
> I've tried different ways to use helptags and tags and vo_maketags.pl.
> I think I have decided that using vim's own tags support will be best. It
> is a superset of helptags. I've run some simple tests and like the results.
> I would like to take the functions of vo_maketags.pl duplicate them in
> vimscript with some additional features.
>
> Let's see if this makes sense:
>
> * A master otl file (defaulting to master.otl) would be created for each
> set of interlinked outlines.

The master outline is defined as the one you want to be at the top, and it's
named as the argument to whatever produces the tag list or lookup table.
>
> * Any filename that ended in '.otl' would be considered a target tag link
> without the need for the '_tag_' prefix.

I guess that would be OK as an addition to the _tag_ technique, but not as a
replacement. I'm a little concerned that somehow a .otl file in the outline
might not be meant to be a link, but ends up one. Personally, I'd like it if
I could shut off the "defauult filename" feature so the _tag_ would be a
must, as for me that reduces the opportunity to blunder.
>
> * Actually, a list of suffixes like '.otl', '.txt', etc. could be
> configured by the user.

That list is already in the files of the ~/.vim/ftdetect directory. For
instance, here's my ~/.vim/ftdetect/my_vo_extensions.vim file:

augroup filetypedetect
  au! BufRead,BufNewFile *.emdl         setfiletype vo_base
  au! BufRead,BufNewFile *.ebdl         setfiletype vo_base
  au! BufRead,BufNewFile *.pho          setfiletype vo_base
  au! BufRead,BufNewFile *.rl           setfiletype vo_base
augroup END

In the preceding, I didn't bother with .otl because it's already named in
~/.vim/ftdetect/vo_base.vim.

>
> * Any filename that was prefixed with '_tag_' would be considered a target
> tag link for both backward compatibility and for instances where vim's
> guessing about whether or not to make a link would or could be erroneous.

Complete backward compatibility would require:

_tag_tagname
        outline_filename

rather than

_tag_outline_filename

I'm trying to remember back to 2001 to figure out why I did the former rather
than the latter. In 7 years of using interoutline linking, I don't think I
found a user convenience reason for the former method -- indeed it was a
PITA. Perhaps, and I don't remember for sure, the one and only reason for the
former method was the need to name tags -- a need that presumably could now
be dispensed with.

If we determine there's no current reason for the 2 line method, then speaking
for myself, I'm willing to write and use a script to convert all instances of
the 2 line method to your suggested 1 line method, and of course give
everyone else the script.

We need to find out how many people are currently using interoutline linking,
and to what extent.

Correct me if I'm wrong, but if we use your 1 line syntax, then couldn't we
dispense entirely with any kind of table and simply edit the file named after
_tag_? I'm pretty sure you can simply knock off what the current _exe_ prefix
does. That gets rid of a WHOLE bunch of problems, doesn't it? Of course, I
know how much all you guys like Perl and vo_maketags.pl :-)

>
> * Every target link would also be added to the sessions syntax
> highlighting so it would be shown as underlined text. Of course the actual
> highlighting option would be user-configurable.

That would be ULTRA cool!

>
> * The tags file would be created by an integrated vimscript utility so
> cross-platform functionality is preserved.

Ya know what -- using the syntax you suggest and using Vim to spawn the new
edit session, I don't think need  a tag file any longer, which makes Windows
compabibility a heck of a lot easier.

What you WILL need is a stack so Ctrl+N will bring you back to the file from
which you Ctrl+K'ed.
>
> * For heading-linking (not the aforementioned file linking) the syntax
> _heading_ syntax could be used as the target link (much like an <a href>
> tag). Any occurrence of 'heading' could be jumped to / cycled through using
> vim's tags navigation features.

Whoa, I didn't understand a word of that last paragraph.

SteveT
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

John Porubek
In reply to this post by Steve Litt
Steve,

OK, I hope this isn't too tedious:

> Please run vo_maketags.pl on your top level outline, and email the resulting vo_tags.tag file to the list.

I just created a "vo_test.otl" as described in "vo_readme.txt" and put
the two lines described minus the $HOME environment variable:

    _tag_newfile
        vo_newfile.otl

I edited vo_maketags.pl, replacing HOME with VOHOME. Then I created a
VOHOME variable with:

    set VOHOME=C:\Program Files\Vim\vimfiles

Then, while in the directory that contains vo_test.otl (C:\Temp\hold),
I run vo_maketags.pl using ActiveState Perl:

C:\Perl\bin\perl "C:\Program
Files\Vim\vimfiles\scripts\vo_maketags.pl" vo_test.otl

This results in a vo_tags.tag file (in my VOHOME directory) that contains:

    _tag_newfile C:/Temp/hold/C:/Temp/hold/vo_newfile.otl :1

No vo_newfile.otl is created, I guess for obvious reasons.

Interestingly, when I use Cygwin Perl instead under the same circumstances:

C:\cygwin\bin\perl "C:\Program
Files\Vim\vimfiles\scripts\vo_maketags.pl" vo_test.otl

I get vo_tags.tag file that contains:

    _tag_newfile /cygdrive/c/Temp/hold/vo_newfile.otl :1

and vo_newfile.otl *is* created in the proper spot (same directory as
vo_test.otl). So it appears that Cygwin Perl is closer to getting it
right (close, but no cigar!).

> I've just looked at vo_maketags.pl, and it's not rocket science.

Assuming you know Perl!

> Assuming cwd() does the right thing in Windows, meaning both drive and
> directory and correct path separator, only very small changes would be
> required.

Using psh, an interactive Perl shell I found on the web
(http://uazu.net/freeware/psh/) (<dig> Python *comes* with an
interactive
shell! <\dig>), here's what I get using ActiveState Perl:

    Perl> print Cwd::cwd()
    C:/Temp/hold1

Using Cygwin Perl, here's what I get:

    Perl> print Cwd::cwd()
    /cygdrive/c/Temp/hold1

Not sure what the trailing "1" is all about, but I believe it's coming
from the shell and is not related to my problem.

> Once we have a Windows-aware vo_tags.tag file, the next step is to see
> whether Windows Vim correctly accesses tags.

I changed line 653 in $VOHOME\ftplugin\vo_base.vim to:

    setlocal tags^="C:\Program Files\Vim\vimfiles\vo_tags.tag"

I also changed line 659 for good measure.

> What Perl are you using right now on Windows?

As mentioned above, ActiveState Perl or Cygwin Perl

> You mentioned rewriting in Python -- what Python would you use in Windows?

The standard Python, downloaded from http://www.python.org/download/ .

> The reason I ask is, last time I looked, I don't think ActiveState Perl or
> Python for Windows were free software. Activestate is free as in beer, but
> very restricted on direct redistribution.

You're probably right about ActiveState products, but Python is truly
open source. From the Python "About" page
(http://www.python.org/about/):

"The Python implementation is under an open source license that makes
it freely usable and distributable, even for commercial use."

> Anyway, I doubt it will be difficult to implement interoutline linking on
> Windows.

Here's hoping!

> Personally, I think if we're going to get it working under Windows, we
> should get it working all the way back to Windows 95, and all the way
> forward to at least Vista.

Agreed, and I don't think that should be a problem.

John
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
Hi John,

Looks like Python 2.5.2 Windows installer is what we want. Could you do me a
favor and find out what its cwd() does, what support it has for automatic OS
detection, path construction and the like.

Thanks

SteveT

On Monday 22 September 2008 04:55:07 pm John Porubek wrote:

> Steve,
>
> OK, I hope this isn't too tedious:
> > Please run vo_maketags.pl on your top level outline, and email the
> > resulting vo_tags.tag file to the list.
>
> I just created a "vo_test.otl" as described in "vo_readme.txt" and put
> the two lines described minus the $HOME environment variable:
>
>     _tag_newfile
>         vo_newfile.otl
>
> I edited vo_maketags.pl, replacing HOME with VOHOME. Then I created a
> VOHOME variable with:
>
>     set VOHOME=C:\Program Files\Vim\vimfiles
>
> Then, while in the directory that contains vo_test.otl (C:\Temp\hold),
> I run vo_maketags.pl using ActiveState Perl:
>
> C:\Perl\bin\perl "C:\Program
> Files\Vim\vimfiles\scripts\vo_maketags.pl" vo_test.otl
>
> This results in a vo_tags.tag file (in my VOHOME directory) that contains:
>
>     _tag_newfile C:/Temp/hold/C:/Temp/hold/vo_newfile.otl :1
>
> No vo_newfile.otl is created, I guess for obvious reasons.
>
> Interestingly, when I use Cygwin Perl instead under the same circumstances:
>
> C:\cygwin\bin\perl "C:\Program
> Files\Vim\vimfiles\scripts\vo_maketags.pl" vo_test.otl
>
> I get vo_tags.tag file that contains:
>
>     _tag_newfile /cygdrive/c/Temp/hold/vo_newfile.otl :1
>
> and vo_newfile.otl *is* created in the proper spot (same directory as
> vo_test.otl). So it appears that Cygwin Perl is closer to getting it
> right (close, but no cigar!).
>
> > I've just looked at vo_maketags.pl, and it's not rocket science.
>
> Assuming you know Perl!
>
> > Assuming cwd() does the right thing in Windows, meaning both drive and
> > directory and correct path separator, only very small changes would be
> > required.
>
> Using psh, an interactive Perl shell I found on the web
> (http://uazu.net/freeware/psh/) (<dig> Python *comes* with an
> interactive
> shell! <\dig>), here's what I get using ActiveState Perl:
>
>     Perl> print Cwd::cwd()
>     C:/Temp/hold1
>
> Using Cygwin Perl, here's what I get:
>
>     Perl> print Cwd::cwd()
>     /cygdrive/c/Temp/hold1
>
> Not sure what the trailing "1" is all about, but I believe it's coming
> from the shell and is not related to my problem.
>
> > Once we have a Windows-aware vo_tags.tag file, the next step is to see
> > whether Windows Vim correctly accesses tags.
>
> I changed line 653 in $VOHOME\ftplugin\vo_base.vim to:
>
>     setlocal tags^="C:\Program Files\Vim\vimfiles\vo_tags.tag"
>
> I also changed line 659 for good measure.
>
> > What Perl are you using right now on Windows?
>
> As mentioned above, ActiveState Perl or Cygwin Perl
>
> > You mentioned rewriting in Python -- what Python would you use in
> > Windows?
>
> The standard Python, downloaded from http://www.python.org/download/ .
>
> > The reason I ask is, last time I looked, I don't think ActiveState Perl
> > or Python for Windows were free software. Activestate is free as in beer,
> > but very restricted on direct redistribution.
>
> You're probably right about ActiveState products, but Python is truly
> open source. From the Python "About" page
> (http://www.python.org/about/):
>
> "The Python implementation is under an open source license that makes
> it freely usable and distributable, even for commercial use."
>
> > Anyway, I doubt it will be difficult to implement interoutline linking on
> > Windows.
>
> Here's hoping!
>
> > Personally, I think if we're going to get it working under Windows, we
> > should get it working all the way back to Windows 95, and all the way
> > forward to at least Vista.
>
> Agreed, and I don't think that should be a problem.
>
> John
> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner


_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Andy Todd
Steve Litt wrote:

> Hi John,
>
> Looks like Python 2.5.2 Windows installer is what we want. Could you do me a
> favor and find out what its cwd() does, what support it has for automatic OS
> detection, path construction and the like.
>
> Thanks
>
> SteveT
>
> On Monday 22 September 2008 04:55:07 pm John Porubek wrote:
>> Steve,
>>
[snip]

In Python this functionality is in the os [1] and os.path [2] modules

To find the current directory we use os.getcwd(), e.g.

$ python
 >>> import os
 >>> os.getcwd()
/Users/andy47/

For path construction look at os.path.join, e.g.

$ python
 >>> import os.path
 >>> start = 'C:\\'
 >>> next = 'Program Files'
 >>> last = 'Vim'
 >>> os.path.join(start, next, last)
'c:\\Program Files\\Vim'

Note the less than obvious value specified for 'start', this is somewhat
explained in the documentation.

[1] http://docs.python.org/lib/module-os.html
[2] http://docs.python.org/lib/module-os.path.html

Regards,
Andy
--
 From the desk of Andrew J Todd esq - http://www.halfcooked.com/

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
On Monday 22 September 2008 07:41:02 pm Andy Todd wrote:

> Steve Litt wrote:
> > Hi John,
> >
> > Looks like Python 2.5.2 Windows installer is what we want. Could you do
> > me a favor and find out what its cwd() does, what support it has for
> > automatic OS detection, path construction and the like.
> >
> > Thanks
> >
> > SteveT
> >
> > On Monday 22 September 2008 04:55:07 pm John Porubek wrote:
> >> Steve,
>
> [snip]
>
> In Python this functionality is in the os [1] and os.path [2] modules
>
> To find the current directory we use os.getcwd(), e.g.
>
> $ python
>
>  >>> import os
>  >>> os.getcwd()

Can somebody please do a os.getcwd() in Python on a Windows box and show what
it returns?

>
> /Users/andy47/
>
> For path construction look at os.path.join, e.g.
>
> $ python
>
>  >>> import os.path
>  >>> start = 'C:\\'
>  >>> next = 'Program Files'
>  >>> last = 'Vim'
>  >>> os.path.join(start, next, last)
>
> 'c:\\Program Files\\Vim'
>
> Note the less than obvious value specified for 'start', this is somewhat
> explained in the documentation.
>
> [1] http://docs.python.org/lib/module-os.html
> [2] http://docs.python.org/lib/module-os.path.html

This sounds very doable as a replacement for vo_maketags.pl, always assuming
we still need to make a table of tags, which I don't think is a foregone
conclusion.

SteveT
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

John Porubek
Steve,

I was working on a response to your previous message requesting more
info. on Python when Andy beat me to it and did a better job than I
would have. Thanks Andy!

> Can somebody please do a os.getcwd() in Python on a Windows box and show what
> it returns?

Here's what I get on my system:

>>> import os
>>> os.getcwd()
'C:\\Python25\\Lib\\idlelib'

However, I'm still hoping that Noel's approach using vim's own tags
support works out and we won't need a Python (or Perl) script.

John
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
On Tuesday 23 September 2008 01:00:54 am John Porubek wrote:

> Steve,
>
> I was working on a response to your previous message requesting more
> info. on Python when Andy beat me to it and did a better job than I
> would have. Thanks Andy!
>
> > Can somebody please do a os.getcwd() in Python on a Windows box and show
> > what it returns?
>
> Here's what I get on my system:
> >>> import os
> >>> os.getcwd()
>
> 'C:\\Python25\\Lib\\idlelib'
>
> However, I'm still hoping that Noel's approach using vim's own tags
> support works out and we won't need a Python (or Perl) script.

Well, the good news is, it looks to me like if we DO need this script,  doing
it portably in Python is trivial. With Python's os.getcwd() plus a string
called path_separator which would be "/" for Unix, and "\\" for Windows, plus
a variable telling whether it's Unix or Windows, it's easy. We'd also have to
do something about filenames with spaces. This is actually an issue in Unix
too, but most Unix people don't make filenames with spaces, so for cultural
reasons it's not an issue in Unix.

It's funny -- my kids use Linux because I refuse to buy Windows licenses and
refuse to support Windows. The kids love Linux, but being only 15, they
aren't enculturated. So they (ugh) put spaces in filenames. On a regular
basis I tell them "if you put spaces in file or directory names, you're on
your own!" They do it less now :-)

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Andy Todd
Steve Litt wrote:

> On Tuesday 23 September 2008 01:00:54 am John Porubek wrote:
>> Steve,
>>
>> I was working on a response to your previous message requesting more
>> info. on Python when Andy beat me to it and did a better job than I
>> would have. Thanks Andy!
>>
>>> Can somebody please do a os.getcwd() in Python on a Windows box and show
>>> what it returns?
>> Here's what I get on my system:
>>>>> import os
>>>>> os.getcwd()
>> 'C:\\Python25\\Lib\\idlelib'
>>
>> However, I'm still hoping that Noel's approach using vim's own tags
>> support works out and we won't need a Python (or Perl) script.
>
> Well, the good news is, it looks to me like if we DO need this script,  doing
> it portably in Python is trivial. With Python's os.getcwd() plus a string
> called path_separator which would be "/" for Unix, and "\\" for Windows, plus
> a variable telling whether it's Unix or Windows, it's easy. We'd also have to
> do something about filenames with spaces. This is actually an issue in Unix
> too, but most Unix people don't make filenames with spaces, so for cultural
> reasons it's not an issue in Unix.
>

You don't need the platform variable because the standard library in
Python gives you the native path seperator;

$ python
 >>> import os.path
 >>> os.path.sep
'/'

And;

C:\> c:\python25\python.exe
 >>> import os.path
 >>> os.path.sep
'\\'

The os.path module will also deal with spaces in file names for you;

C:\> c:\python25\python.exe
 >>> import os.path
 >>> os.path.join('c:\\', 'Program Files', 'Vim')
'c:\\Program Files\\Vim'
 >>> import os
 >>> os.listdir(os.path.join('c:\\', 'Program Files', 'Vim')
['vim71', 'vimfiles', '_vimrc']

And is fine with spaces on my Mac (although I could only find one
directory name on my machine with spaces in it);

$ cd
$ python
 >>> import os, os.path
 >>> os.listdir('Documents', 'OmniFocus Backups')
['OmniFocus 2008-09-01 109548.ofocus',
...
'OmniFocus 2008-09-24 132954.ofocus']
 >>>

> It's funny -- my kids use Linux because I refuse to buy Windows licenses and
> refuse to support Windows. The kids love Linux, but being only 15, they
> aren't enculturated. So they (ugh) put spaces in filenames. On a regular
> basis I tell them "if you put spaces in file or directory names, you're on
> your own!" They do it less now :-)
>
> SteveT
>
> Steve Litt
> Recession Relief Package
> http://www.recession-relief.US
>

Regards,
Andy
--
 From the desk of Andrew J Todd esq - http://www.halfcooked.com/

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Noel Henson
On Wednesday 24 September 2008, Andy Todd wrote:

> Steve Litt wrote:
> > On Tuesday 23 September 2008 01:00:54 am John Porubek wrote:
> >> Steve,
> >>
> >> I was working on a response to your previous message requesting more
> >> info. on Python when Andy beat me to it and did a better job than I
> >> would have. Thanks Andy!
> >>
> >>> Can somebody please do a os.getcwd() in Python on a Windows box and
> >>> show what it returns?
> >>
> >> Here's what I get on my system:
> >>>>> import os
> >>>>> os.getcwd()
> >>
> >> 'C:\\Python25\\Lib\\idlelib'
> >>
> >> However, I'm still hoping that Noel's approach using vim's own tags
> >> support works out and we won't need a Python (or Perl) script.
> >
> > Well, the good news is, it looks to me like if we DO need this script,
> >  doing it portably in Python is trivial. With Python's os.getcwd()
> > plus a string called path_separator which would be "/" for Unix, and
> > "\\" for Windows, plus a variable telling whether it's Unix or
> > Windows, it's easy. We'd also have to do something about filenames
> > with spaces. This is actually an issue in Unix too, but most Unix
> > people don't make filenames with spaces, so for cultural reasons it's
> > not an issue in Unix.
>
> You don't need the platform variable because the standard library in
> Python gives you the native path seperator;
>
> $ python
>
>  >>> import os.path
>  >>> os.path.sep
>
> '/'
>
> And;
>
> C:\> c:\python25\python.exe
>
>  >>> import os.path
>  >>> os.path.sep
>
> '\\'
>
> The os.path module will also deal with spaces in file names for you;
>
> C:\> c:\python25\python.exe
>
>  >>> import os.path
>  >>> os.path.join('c:\\', 'Program Files', 'Vim')
>
> 'c:\\Program Files\\Vim'
>
>  >>> import os
>  >>> os.listdir(os.path.join('c:\\', 'Program Files', 'Vim')
>
> ['vim71', 'vimfiles', '_vimrc']
>
> And is fine with spaces on my Mac (although I could only find one
> directory name on my machine with spaces in it);
>
> $ cd
> $ python
>
>  >>> import os, os.path
>  >>> os.listdir('Documents', 'OmniFocus Backups')
>
> ['OmniFocus 2008-09-01 109548.ofocus',
> ...
> 'OmniFocus 2008-09-24 132954.ofocus']
>
> > It's funny -- my kids use Linux because I refuse to buy Windows
> > licenses and refuse to support Windows. The kids love Linux, but being
> > only 15, they aren't enculturated. So they (ugh) put spaces in
> > filenames. On a regular basis I tell them "if you put spaces in file
> > or directory names, you're on your own!" They do it less now :-)
> >
> > SteveT
> >
> > Steve Litt
> > Recession Relief Package
> > http://www.recession-relief.US
>
> Regards,
> Andy

I have figured out a way to do it in vimscript. I shouldn't even have to
worry about the system's path separator character.

The script will be quite simple for file linking (to line 1 like
vo_maketags.pl).  Something like this:

read autocommand for a list of file extensions
        (or use a special variable for this purpose in .vimoutlinerrc)
create a list (list variable) with 'master.otl' in it
while not at end of list
        read next item from list as filename
        open file
        while not at end of file
                read line from file
                parse line for tokens ending in matching extensions
                if a match, write the token to the list
        close file
sort list
remove duplicates
write list to file in tags format
write list to another file in keywords format (for underlined links)
done

Thoughts?

Noel
       

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
On Thursday 25 September 2008 10:28:35 am Noel Henson wrote:

> On Wednesday 24 September 2008, Andy Todd wrote:
> > Steve Litt wrote:
> > > On Tuesday 23 September 2008 01:00:54 am John Porubek wrote:
> > >> Steve,
> > >>
> > >> I was working on a response to your previous message requesting more
> > >> info. on Python when Andy beat me to it and did a better job than I
> > >> would have. Thanks Andy!
> > >>
> > >>> Can somebody please do a os.getcwd() in Python on a Windows box and
> > >>> show what it returns?
> > >>
> > >> Here's what I get on my system:
> > >>>>> import os
> > >>>>> os.getcwd()
> > >>
> > >> 'C:\\Python25\\Lib\\idlelib'
> > >>
> > >> However, I'm still hoping that Noel's approach using vim's own tags
> > >> support works out and we won't need a Python (or Perl) script.
> > >
> > > Well, the good news is, it looks to me like if we DO need this script,
> > >  doing it portably in Python is trivial. With Python's os.getcwd()
> > > plus a string called path_separator which would be "/" for Unix, and
> > > "\\" for Windows, plus a variable telling whether it's Unix or
> > > Windows, it's easy. We'd also have to do something about filenames
> > > with spaces. This is actually an issue in Unix too, but most Unix
> > > people don't make filenames with spaces, so for cultural reasons it's
> > > not an issue in Unix.
> >
> > You don't need the platform variable because the standard library in
> > Python gives you the native path seperator;
> >
> > $ python
> >
> >  >>> import os.path
> >  >>> os.path.sep
> >
> > '/'
> >
> > And;
> >
> > C:\> c:\python25\python.exe
> >
> >  >>> import os.path
> >  >>> os.path.sep
> >
> > '\\'
> >
> > The os.path module will also deal with spaces in file names for you;
> >
> > C:\> c:\python25\python.exe
> >
> >  >>> import os.path
> >  >>> os.path.join('c:\\', 'Program Files', 'Vim')
> >
> > 'c:\\Program Files\\Vim'
> >
> >  >>> import os
> >  >>> os.listdir(os.path.join('c:\\', 'Program Files', 'Vim')
> >
> > ['vim71', 'vimfiles', '_vimrc']
> >
> > And is fine with spaces on my Mac (although I could only find one
> > directory name on my machine with spaces in it);
> >
> > $ cd
> > $ python
> >
> >  >>> import os, os.path
> >  >>> os.listdir('Documents', 'OmniFocus Backups')
> >
> > ['OmniFocus 2008-09-01 109548.ofocus',
> > ...
> > 'OmniFocus 2008-09-24 132954.ofocus']
> >
> > > It's funny -- my kids use Linux because I refuse to buy Windows
> > > licenses and refuse to support Windows. The kids love Linux, but being
> > > only 15, they aren't enculturated. So they (ugh) put spaces in
> > > filenames. On a regular basis I tell them "if you put spaces in file
> > > or directory names, you're on your own!" They do it less now :-)
> > >
> > > SteveT
> > >
> > > Steve Litt
> > > Recession Relief Package
> > > http://www.recession-relief.US
> >
> > Regards,
> > Andy
>
> I have figured out a way to do it in vimscript. I shouldn't even have to
> worry about the system's path separator character.
>
> The script will be quite simple for file linking (to line 1 like
> vo_maketags.pl).  Something like this:
>
> read autocommand for a list of file extensions
> (or use a special variable for this purpose in .vimoutlinerrc)
> create a list (list variable) with 'master.otl' in it
> while not at end of list
> read next item from list as filename
> open file
> while not at end of file
> read line from file
> parse line for tokens ending in matching extensions
> if a match, write the token to the list
> close file
> sort list
> remove duplicates
> write list to file in tags format
> write list to another file in keywords format (for underlined links)
> done
>
> Thoughts?
>
> Noel

Hi Noel,

There's nothing special about master.otl -- the top level document could be
named anything, and I think I have a few island trees that DON'T start with
master.otl. So your line 2 should be "create a list (list variable) with $1
in it.

You should parse for matching extensions OR _tag_filename, where anything
following _tag_ is assumed to be a filename.

My thought is since this is so doable in Python, it's better to do it as an
external utility rather than clutter up VO with it. The only tricky part
would be obtaining the list of eligible extensions. Second, this cannot be
released until we provide a utility to convert:

_tag_my_tag_name
        my_tag_file.otl

to this:

_tag_my_tag_file.otl

We'd also have to supply a recursion utility so this utility can walk down the
old interoutline linking tree, thereby hopefully converting all the older
_tag_ markers. If we really wanted to be safe, the new tags could be prefaced
with _lnk_ instead of _tag_. That would eliminate the possibility of
converting twice or various other problems that could crop up.

I can do these scripts no sweat, if you give me some sort of little VO utility
to give me eligible extensions.

Let me ask a question pertaining to the conversion script --- is anyone
currently using interoutline linking with Windows?

Thanks

SteveT


--
Steve Litt
Recession Relief Package
http://www.recession-relief.US

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Noel Henson
On Thursday 25 September 2008, Steve Litt wrote:

> On Thursday 25 September 2008 10:28:35 am Noel Henson wrote:
> > On Wednesday 24 September 2008, Andy Todd wrote:
> > > Steve Litt wrote:
> > > > On Tuesday 23 September 2008 01:00:54 am John Porubek wrote:
> > > >> Steve,
> > > >>
> > > >> I was working on a response to your previous message requesting
> > > >> more info. on Python when Andy beat me to it and did a better job
> > > >> than I would have. Thanks Andy!
> > > >>
> > > >>> Can somebody please do a os.getcwd() in Python on a Windows box
> > > >>> and show what it returns?
> > > >>
> > > >> Here's what I get on my system:
> > > >>>>> import os
> > > >>>>> os.getcwd()
> > > >>
> > > >> 'C:\\Python25\\Lib\\idlelib'
> > > >>
> > > >> However, I'm still hoping that Noel's approach using vim's own
> > > >> tags support works out and we won't need a Python (or Perl)
> > > >> script.
> > > >
> > > > Well, the good news is, it looks to me like if we DO need this
> > > > script, doing it portably in Python is trivial. With Python's
> > > > os.getcwd() plus a string called path_separator which would be "/"
> > > > for Unix, and "\\" for Windows, plus a variable telling whether
> > > > it's Unix or Windows, it's easy. We'd also have to do something
> > > > about filenames with spaces. This is actually an issue in Unix
> > > > too, but most Unix people don't make filenames with spaces, so for
> > > > cultural reasons it's not an issue in Unix.
> > >
> > > You don't need the platform variable because the standard library in
> > > Python gives you the native path seperator;
> > >
> > > $ python
> > >
> > >  >>> import os.path
> > >  >>> os.path.sep
> > >
> > > '/'
> > >
> > > And;
> > >
> > > C:\> c:\python25\python.exe
> > >
> > >  >>> import os.path
> > >  >>> os.path.sep
> > >
> > > '\\'
> > >
> > > The os.path module will also deal with spaces in file names for you;
> > >
> > > C:\> c:\python25\python.exe
> > >
> > >  >>> import os.path
> > >  >>> os.path.join('c:\\', 'Program Files', 'Vim')
> > >
> > > 'c:\\Program Files\\Vim'
> > >
> > >  >>> import os
> > >  >>> os.listdir(os.path.join('c:\\', 'Program Files', 'Vim')
> > >
> > > ['vim71', 'vimfiles', '_vimrc']
> > >
> > > And is fine with spaces on my Mac (although I could only find one
> > > directory name on my machine with spaces in it);
> > >
> > > $ cd
> > > $ python
> > >
> > >  >>> import os, os.path
> > >  >>> os.listdir('Documents', 'OmniFocus Backups')
> > >
> > > ['OmniFocus 2008-09-01 109548.ofocus',
> > > ...
> > > 'OmniFocus 2008-09-24 132954.ofocus']
> > >
> > > > It's funny -- my kids use Linux because I refuse to buy Windows
> > > > licenses and refuse to support Windows. The kids love Linux, but
> > > > being only 15, they aren't enculturated. So they (ugh) put spaces
> > > > in filenames. On a regular basis I tell them "if you put spaces in
> > > > file or directory names, you're on your own!" They do it less now
> > > > :-)
> > > >
> > > > SteveT
> > > >
> > > > Steve Litt
> > > > Recession Relief Package
> > > > http://www.recession-relief.US
> > >
> > > Regards,
> > > Andy
> >
> > I have figured out a way to do it in vimscript. I shouldn't even have
> > to worry about the system's path separator character.
> >
> > The script will be quite simple for file linking (to line 1 like
> > vo_maketags.pl).  Something like this:
> >
> > read autocommand for a list of file extensions
> > (or use a special variable for this purpose in .vimoutlinerrc)
> > create a list (list variable) with 'master.otl' in it
> > while not at end of list
> > read next item from list as filename
> > open file
> > while not at end of file
> > read line from file
> > parse line for tokens ending in matching extensions
> > if a match, write the token to the list
> > close file
> > sort list
> > remove duplicates
> > write list to file in tags format
> > write list to another file in keywords format (for underlined links)
> > done
> >
> > Thoughts?
> >
> > Noel
>
> Hi Noel,
>
> There's nothing special about master.otl -- the top level document could
> be named anything, and I think I have a few island trees that DON'T
> start with master.otl. So your line 2 should be "create a list (list
> variable) with $1 in it.

Of course.

>
> You should parse for matching extensions OR _tag_filename, where
> anything following _tag_ is assumed to be a filename.

That would also be included for backwards compatibility. I was just
outlining the basic program flow.

>
> My thought is since this is so doable in Python, it's better to do it as
> an external utility rather than clutter up VO with it. The only tricky
> part would be obtaining the list of eligible extensions. Second, this
> cannot be released until we provide a utility to convert:
>
> _tag_my_tag_name
> my_tag_file.otl
>
> to this:
>
> _tag_my_tag_file.otl

It is easy in python. And you have already done it in perl (basically).  
But cross-platform operation has become an issue and has been mentioned
before.

> We'd also have to supply a recursion utility so this utility can walk
> down the old interoutline linking tree, thereby hopefully converting all
> the older _tag_ markers. If we really wanted to be safe, the new tags
> could be prefaced with _lnk_ instead of _tag_. That would eliminate the
> possibility of converting twice or various other problems that could
> crop up.

The utility as I outlined it is recursive. Take a close look at it.

>
> I can do these scripts no sweat, if you give me some sort of little VO
> utility to give me eligible extensions.
>
> Let me ask a question pertaining to the conversion script --- is anyone
> currently using interoutline linking with Windows?
>
> Thanks
>
> SteveT

Thanks for the feedback!

Noel

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Getting interoutline linking working under Windows XP

Steve Litt
On Thursday 25 September 2008 01:32:10 pm Noel Henson wrote:
> On Thursday 25 September 2008, Steve Litt wrote:

>
> > You should parse for matching extensions OR _tag_filename, where
> > anything following _tag_ is assumed to be a filename.
>
> That would also be included for backwards compatibility. I was just
> outlining the basic program flow.

Hi Noel,

As I envision what we're talking about, I envision an interoutline link
looking like one of these:

_lnk_bicycles.otl

or

bicycles.otl

Neither is backward compatible to the old, and in hindsight ponderous

_tag_my_bicycle_outline
        bicycles.otl

Backward compatibility would be via the same old (now depricated)
vo_maketags.pl. To come into 2008, one would run a utility to change

_tag_my_bicycle_outline
        bicycles.otl

to

_lnk_bicycles.otl

Writing this I see a possible problem. Imagine directories ~/steve and ~/kids,
both of which contain a bicyles.otl. There's no way to differentiate them
except to use (ponderous) absolute filenames, because we're using the
filename as a tag name.

All of this brings up something else -- now that we have the option of
programming in Vim language, we don't need a tag file or any other type of
table of links. VO can do the link directly, something like this:

function Go2link()
                let theline=getline(line("."))
                let idx=matchend(theline, "_lnk_\\s*")
                if idx != -1
                        let command=strpart(theline, idx)
                        let command="e ".command
                        exec command
                endif
endfunction

I tested the preceding (hooking it temporarily to ,,.), and for absolute
filenames, it works correctly. I was able to return to the calling file
with :bd. Unfortunately, with relative filenames (_lnk_bicycles.otl) it
errored out saying "Not an editor command: ebicycles.otl", and if I did
_lnk_./bicycles.otl, it tried to open bicycles.otl in the original current
directory. But that can be corrected by maintaining the current current
directory in a variable, and prepending it to relative filenames.

As far as lines with only an eligible filename and no _lnk_, it would be
pretty easy to put that into the preceding code as an else statement. I'd
very much like the ability to shut off that feature, because in my hands it
would be dangerous.

As usual, I used a kludge to implement this feature. I returned from the
called file by closing the current one, instead of maintaining a stack. If we
want to do it with my kludge, Ctrl+N could be mapped to :bd, while Ctrl+K is
mapped to Go2link(). Otherwise, a stack could be maintained, though I'm not a
good enough Vim programmer to write that code, or even troubleshoot it. :-)

The original reason for using a tag file and using Vim's tag feature for
interoutline linking was that back in 2001, I knew no Vim language and knew
no way to accomplish interoutline linking. So I asked Dillon Jones how to do
interoutline linking, and he said "well, one way would be to do it with
tagging", so that's just what I did. Tags based interoutline linking served
us well for 7 years, but I'm thinking that today, with our current level of
knowledge, maintaining a jump file for interoutline linking is just extra
stuff to keep track of.

SteveT

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
12