From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200406041029.i54ATkV03287@zamenhof.cs.utwente.nl> To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] acme design In-reply-to: Your message of "Fri, 04 Jun 2004 09:19:19 +0000." References: <4d30561ec4fd4a26b45150a2416c002a@9srv.net>, <855f2a51294c4e27df6f583286e23e28@vitanuova.com> From: Axel Belinfante Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 4 Jun 2004 12:29:45 +0200 Topicbox-Message-UUID: 94c75118-eacd-11e9-9e20-41e7f4b1d025 Bengt wrote: > rog@vitanuova.com wrote: > > i been thinking that one way to make the filenames less obtrusive in > > acme would be to allow grouping of windows with a common path prefix. > > > > i quite often find myself working in, say > > /n/dump/2004/0529/usr/inferno/appl/cmd/scheduler/... and that really > > doesn't give much space for tag commands. > > > > i could imagine some kind of directory-tagged super-window in acme > > that contained other windows. It would be great to have a `blessed' (non-hack) solution to make the filenames less obtrusive. With unix acme the filename is regularly longer than the width of the tag, meaning one would have to scroll in the tag even to Put or Un/Redo - this takes away much of the joy of using acme. The env var hack makes acme usable for me on unix, and I'm happy to use it until a better way of dealing with long filenames comes along. > does acme use existing environment variables, like wily does? No, but, for the unix acme you can find a patch in the plan9 ports CVS repository (no idea how hard it would be to back port it to plan 9). I slightly patched that for even more comfort, see below. Axel. One thing I noticed: the sorting in mkruneenv pays special attention to the env var names: case and length. For me, even more important is that I get the env var for the longest file name, so, if I have home=/home/me fo=/home/me/fo fofoo=/home/me/fo/foo then when I'm in directory /home/me/fo/foo/bar I would like to see $fofoo/bar and not $fo/foo/bar, and certainly not $home/fo/foo/bar . I cooked up the following patch, just tested to see if it works, not used long enough to notice I overlooked something, nor to know whether it works as comfortable as in wily. Index: wind.c =================================================================== RCS file: /cvs/plan9/src/cmd/acme/wind.c,v retrieving revision 1.4 diff -r1.4 wind.c [unrelated differences omitted; line numbers may be off] 650,651c648,649 < Rune *a, *b; < int na, nb; --- > Rune *a, *b, *af, *bf; > int na, nb, fcmp; 655,656c653,659 < na = runestrchr(a, '=') - a; < nb = runestrchr(b, '=') - b; --- > af = runestrchr(a, '='); > bf = runestrchr(b, '='); > na = af - a; > nb = bf - b; > fcmp = runestrcmp(af, bf); > if (fcmp != 0) > return -fcmp;