[9fans] long paths in acme tags

2014-06-11 Thread Bakul Shah
If you are editing multiple file within the same directory
with a very long path, the long dir paths is what takes up
most of the tag. One idea (borrowed from zsh) is to assign a
long path to a variable and then just show the variable
instead. Thus for example, given long paths like these:

/a/very/very/very/very/very/very/very/very/very/long/path/to/a/file1
/a/very/very/very/very/very/very/very/very/very/long/path/to/a/file2

If one can define a variable in acme
foo=/a/very/very/very/very/very/very/very/very/very/long/path/to/a

 if the acme tags show
$foo/file1
$foo/file2
it would be much nicer.

Has anyone considered doing this or is there a better idea?  I
suppose on plan9 one can use bind for this but on p9p things
get considerably clunkier (9p, fuse...) when a variable can do
the job more simply.



Re: [9fans] long paths in acme tags

2014-06-11 Thread erik quanstrom
On Wed Jun 11 15:56:59 EDT 2014, ba...@bitblocks.com wrote:
 If you are editing multiple file within the same directory
 with a very long path, the long dir paths is what takes up
 most of the tag. One idea (borrowed from zsh) is to assign a
 long path to a variable and then just show the variable
 instead. Thus for example, given long paths like these:
 
 /a/very/very/very/very/very/very/very/very/very/long/path/to/a/file1
 /a/very/very/very/very/very/very/very/very/very/long/path/to/a/file2
 
 If one can define a variable in acme
 foo=/a/very/very/very/very/very/very/very/very/very/long/path/to/a
 
  if the acme tags show
 $foo/file1
 $foo/file2
 it would be much nicer.
 
 Has anyone considered doing this or is there a better idea?  I
 suppose on plan9 one can use bind for this but on p9p things
 get considerably clunkier (9p, fuse...) when a variable can do
 the job more simply.

this was done in wily in the mid 90s, complete with an algorithm
to find the shortest representation.

- erik



Re: [9fans] long paths in acme tags

2014-06-11 Thread sl
 If one can define a variable in acme
 foo=/a/very/very/very/very/very/very/very/very/very/long/path/to/a
 
  if the acme tags show
 $foo/file1
 $foo/file2
 it would be much nicer.
 
 Has anyone considered doing this or is there a better idea?  I
 suppose on plan9 one can use bind for this but on p9p things
 get considerably clunkier (9p, fuse...) when a variable can do
 the job more simply.
 
 this was done in wily in the mid 90s, complete with an algorithm
 to find the shortest representation.

What was the result? In which distribution is it available? How is
it used?

sl



Re: [9fans] long paths in acme tags

2014-06-11 Thread erik quanstrom
On Wed Jun 11 16:14:54 EDT 2014, s...@9front.org wrote:
  If one can define a variable in acme
  foo=/a/very/very/very/very/very/very/very/very/very/long/path/to/a
  
   if the acme tags show
  $foo/file1
  $foo/file2
  it would be much nicer.
  
  Has anyone considered doing this or is there a better idea?  I
  suppose on plan9 one can use bind for this but on p9p things
  get considerably clunkier (9p, fuse...) when a variable can do
  the job more simply.
  
  this was done in wily in the mid 90s, complete with an algorithm
  to find the shortest representation.
 
 What was the result? In which distribution is it available? How is
 it used?

wily was a stand-alone unix program.  iirc it relied on the frame library
port from plan 9.

it worked, but the problem was that environment variables are not
understood by the kernel.

google wily text editor.

- erik



Re: [9fans] long paths in acme tags

2014-06-11 Thread sl
  this was done in wily in the mid 90s, complete with an algorithm
  to find the shortest representation.
 
 What was the result? In which distribution is it available? How is
 it used?
 
 wily was a stand-alone unix program.  iirc it relied on the frame library
 port from plan 9.

Sorry, my fault, I somehow missed wily in your original reply.

sl



Re: [9fans] long paths in acme tags

2014-06-11 Thread Aram Hăvărneanu
  if the acme tags show
 $foo/file1
 $foo/file2
 it would be much nicer.

Real paths are plumbable and copyable, variable names are not. p9p
acme (where this problem is more acute) has multiline tags.

-- 
Aram Hăvărneanu



Re: [9fans] long paths in acme tags

2014-06-11 Thread erik quanstrom
On Wed Jun 11 16:34:51 EDT 2014, ara...@mgk.ro wrote:
   if the acme tags show
  $foo/file1
  $foo/file2
  it would be much nicer.
 
 Real paths are plumbable and copyable, variable names are not. p9p
 acme (where this problem is more acute) has multiline tags.

both of these issues can be sorted.  there's no reason the cut text
or plumb'd text need equal the displayed text.  but one would need
to be very careful about it.

- erik



Re: [9fans] long paths in acme tags

2014-06-11 Thread Bakul Shah
On Wed, 11 Jun 2014 22:33:07 +0200 =?UTF-8?B?QXJhbSBIxIN2xINybmVhbnU=?= 
ara...@mgk.ro wrote:
   if the acme tags show
  $foo/file1
  $foo/file2
  it would be much nicer.
 
 Real paths are plumbable and copyable, variable names are not. p9p
 acme (where this problem is more acute) has multiline tags.

Multiline tags don't help with the clutter. In any case I am
only talking about what is displayed in the tag.

I have never need to plumb the tag. Valid point about copying
but you can deal with that by defining similar variables in rc.

Thanks Erik, I will take a look at wily code.



Re: [9fans] long paths in acme tags

2014-06-11 Thread Robert Raschke
Whenever they are available, I use symlinks for shortening paths for
Acme. This is so far the only good use I've found for them ;-)

Robby
 On Jun 11, 2014 8:54 PM, Bakul Shah ba...@bitblocks.com wrote:

 If you are editing multiple file within the same directory
 with a very long path, the long dir paths is what takes up
 most of the tag. One idea (borrowed from zsh) is to assign a
 long path to a variable and then just show the variable
 instead. Thus for example, given long paths like these:

 /a/very/very/very/very/very/very/very/very/very/long/path/to/a/file1
 /a/very/very/very/very/very/very/very/very/very/long/path/to/a/file2

 If one can define a variable in acme
 foo=/a/very/very/very/very/very/very/very/very/very/long/path/to/a

  if the acme tags show
 $foo/file1
 $foo/file2
 it would be much nicer.

 Has anyone considered doing this or is there a better idea?  I
 suppose on plan9 one can use bind for this but on p9p things
 get considerably clunkier (9p, fuse...) when a variable can do
 the job more simply.




Re: [9fans] long paths in acme tags

2014-06-11 Thread erik quanstrom
On Wed Jun 11 17:34:33 EDT 2014, ba...@bitblocks.com wrote:
 On Wed, 11 Jun 2014 22:27:34 BST Robert Raschke rtrli...@googlemail.com 
 wrote:
  
  Whenever they are available, I use symlinks for shortening paths for
  Acme. This is so far the only good use I've found for them ;-)
 
 Symlinks don't help in the tag as pwd finds the real path.

real path?  hmmm.  symlinks aren't fake.  :-)

- erik



Re: [9fans] long paths in acme tags

2014-06-11 Thread Nicolas Bercher

On 11/06/2014 23:32, Bakul Shah wrote:

On Wed, 11 Jun 2014 22:27:34 BST Robert Raschke rtrli...@googlemail.com wrote:


Whenever they are available, I use symlinks for shortening paths for
Acme. This is so far the only good use I've found for them ;-)


Symlinks don't help in the tag as pwd finds the real path.


Which pwd are you talking about?
GNU's pwd does not resolve symlinks (pwd -P does), nor p9p's acme.

Nicolas