Lisp HUG Maillist Archive

sorting the editor "buffers" tab; munging the pathname displayed; and self-discovery

Hi, Lispworkers,

1) Any ideas on how to make the "Buffers" tab be sorted by Pathname by
default?

2) Any tips on how to munge the pathname displayed by the Buffers
list?

The zsh shell has a facility where you can name directories like users
and refer to them by name, and the shell will refer to them by name,
too:

  /home/user > dir=/usr/src/linux
  /home/user > cd ~dir
  ~dir > _

Sort of like that, in the buffer list, instead of

  Att Name        Mode  Size Pathname
  --  file1.lisp  Lisp  1234 /path/to/project/file1.lisp
  --  file2.lisp  Lisp  1234 /path/to/project/file2.lisp
  --  file3.lisp  Lisp  1234 /path/to/project/file3.lisp

I'd like to see something more like

  Att Name        Mode  Size Pathname
  --  file1.lisp  Lisp  1234 ~project/file1.lisp
  --  file2.lisp  Lisp  1234 ~project/file2.lisp
  --  file3.lisp  Lisp  1234 ~project/file3.lisp

3) Last, is there any way I could have discovered the answer to these
questions on my own?  I looked at the window browser and burrowed down
to the multi-column-list-panel that makes up the buffer list, and I
found the sort-description and sort-state, but I'm not sure where to
go from there.

Thanks for any help!

-- Larry


Re: sorting the editor "buffers" tab; munging the pathname displayed; and self-discovery

On Mon, Jun 02, 2008 at 10:35:28PM -0400, Larry Clapp wrote:
> 1) Any ideas on how to make the "Buffers" tab be sorted by Pathname by
> default?

Haven't got this sorted yet.

> 2) Any tips on how to munge the pathname displayed by the Buffers
> list?

Did this.  Wrote about it at
<http://theclapp.org/blog/posts/name-mangling-the-buffer-list/>.

In a nutshell, I built an easy way to turn /home/user/lisp/file.lisp
into ~lisp/file.lisp, or
/long/path/to/some/other/project/over/in/some/other/directory/file.lisp
into ~project/file.lisp.  In the buffer-list, at least.  Haven't
touched the modeline (yet).

It occurs to me (only now, of course, that I've completely implemented
it, and even blogged about it) that perhaps logical pathnames would do
the trick.  I'll have to look at that.  Oh well.  :)  It was fun,
anyway.

> 3) Last, is there any way I could have discovered the answer to
> these questions on my own?  I looked at the window browser and
> burrowed down to the multi-column-list-panel that makes up the
> buffer list, and I found the sort-description and sort-state, but
> I'm not sure where to go from there.

The Window Browser, the Inspector, the Class Browser, the Symbol
Browser, the Lispworks CAPI docs, and of course the Listener were all
very useful in my quest so far.

-- L


Updated at: 2020-12-10 08:43 UTC