bug-zile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-zile] Nested buffers


From: Gary V. Vaughan
Subject: Re: [Bug-zile] Nested buffers
Date: Thu, 6 Feb 2014 11:25:04 +1300

Hi Reuben,

On Feb 4, 2014, at 3:02 AM, Reuben Thomas <address@hidden> wrote:
> One of the things I have endlessly mused about but never done anything about 
> was making Zile into a replacement for both shell and editor. The problem 
> here, if you're not going to spend several years reinventing the world only 
> to have people ignore you, is to find incremental changes you can offer 
> independently of each other.

Always a good idea, as outside encouragement always does wonders for one's 
motivation :)

> I have tried a few times in the past to give up using terminals and just use 
> Emacs. In the past it's been too inconvenient because either you use eshell 
> and interactive programs don't work (it looks like this may be largely fixed 
> in 24.4) or you use term-mode and the usual keystrokes stop working, so you 
> may as well give up and use a separate terminal window. (I guess that some 
> degree of hand–brain rewiring is inevitable, as clearly e.g. C-c simply can't 
> work consistently.)

Me too!  I even tried to use Plan 9 (via http://swtch.com/plan9port/) for a 
while, because Acme does a much better job of being a terminal and a text 
editor at the same time.  It didn't really stick because Acme likes a 3 button 
mouse, and emulation with a track pad on a laptop is a bit awkward.  
Nonetheless, Acme is worth looking at for good ideas.  And I'm a big fan of the 
way it integrates with userspace rather than tries to reimplement everything as 
a mode or something... also one of the same things that attracted me away from 
Emacs and into TextMate for a few years.

> Just now, I was thinking about a similar thing, namely my tendency to go back 
> and forth between using Emacs commands such as diff and grep, and their shell 
> equivalents. Why don't I stick to the Emacs versions, I wondered, since they 
> tend to be richer (in the sense that their output tends to be marked up and 
> you can interact with it in a specialised buffer)?
> 
> I think I've got it: it's because there's no history in Emacs of past 
> commands WITH THEIR OUTPUT: yes, you can get a command history, and yes, the 
> output from each command individually is sitting arround somewhere in a 
> buffer like *diff-mode* or *grep* or *compile*, but there's no way to scroll 
> back through your session (the closest thing is *Messages*).

That's an interesting observation, and makes a lot of sense to me too.  There's 
also some precedent with code bubbles 
(http://www.andrewbragdon.com/codebubbles_site.asp), brackets 
(http://brackets.io/) and even lighttable (http://www.lighttable.com).

It's also something I've given thought to in the past, although I was thinking 
more along the lines of being able to make a buffer up from bits of different 
files with related code and have those bits go back to the right files when 
saved, and with more of a leaning towards narrowing and nested modes than 
actual nested buffers.  But now that you mention it, I like your idea better, 
and I'd love to have some prototype code in Zile that we can share and 
collaborate on -- which probably means migrating Zee back into the Zile tree, 
and that in turn requires a bit more refactoring, in so far as I'm stalled on 
importing my zz patches at the point I radically simplified the keycode system, 
in a non-Zmacs compatible way... until the keycode implementation in the shared 
Zile tree is abstracted out enough to support both.

> This ties in with something else I was thinking about, namely to make Zee a 
> readline replacement (in some way, not sure exactly what).

I guess you mean logging in to a terminal pops up Zee rather than a shell 
prompt, and you launch your commands from there?  If so, that's something I'd 
also like to see.

> This all leads back to the idea of nested buffers. I say "all", because "Zee 
> as readline" points that way,

So far so good...

> as does structured editing (which I've listed as an aim for Zee).

...as in XML?  Bleh.  Anything XML can do, Lisp and/or JSON can do better.

> I've seen this sort of thing before (I can't remember where, and I'm pretty 
> sure I couldn't find it last time I looked either, but I remember seeing an 
> editor with nested images and even terminals being demo'd;

Are you thinking of the terminal program with mouse interaction with scroll 
back?  I remember a project several years ago, which ironically leveraged XML 
to embed images and other mousable elements into e.g. the output of ls, which 
would show images that you could click and zoom, and folder icons you could 
drill down into etc.  I can't find a reference now either, but I have a vague 
memory that it was an experiment by Carsten Haitzler (sp?) of Enlightenment 
fame.

> an academic but closed-source project). It also fits with the idea of 
> pervasive, permanent undo (undo everything, everything saved on disk).

Permanent undo is interesting too, and I've been reading about some clever data 
structures (Splay Ropes, and other functional tree structures) that provide a 
similar feature.  So much cool stuff to do, and so little time!! :)

Cheers,
-- 
Gary V. Vaughan (gary AT vaughan DOT pe)

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


reply via email to

[Prev in Thread] Current Thread [Next in Thread]