9front - general discussion about 9front
 help / color / mirror / Atom feed
From: "Ethan Gardener" <eekee57@fastmail.fm>
To: ori@eigenstate.org, 9front@9front.org
Subject: Re: [9front] ipso(1) $editor
Date: Thu, 16 Apr 2020 11:18:15 +0100	[thread overview]
Message-ID: <7f697a66-4a40-4ec4-afa1-8c1863df5ba9@www.fastmail.com> (raw)
In-Reply-To: <6A8DD600F9EC9353EB31E599E93882B4@eigenstate.org>

On Mon, Apr 13, 2020, at 2:13 AM, ori@eigenstate.org wrote:
> > How about using the universal editor:
> >     /bin/B
> > ;)
> 
> So, I revisited this,
> 
> The problem with B is that many programs which start an editor
> also need to know when editing is finished. We have 'E' for this,
> but the method it uses is unbelievably janky: it waits for the
> file mtime to change.
> 
> Since my muscle memory leads to saving the file I'm working on
> fairly often, this is not a good solution.

same here. i'm rather opposed to programs which pop up an editor at all, i prefer to prepare things up front and leave the job to run, but that's beside the point. your changes seem workable to me, (modulo details,) but i have a philosophical objection: all this is added complexity to work around a design problem.

how does this look in other systems? when tty/console programs want the user to edit something, they can start an editor and wait for it to finish. gui programs can incorporate an editable text field from the same toolkit they get everything else, and block further interaction until the user signals it's done. the tty case is very simple. the gui case is also very simple with a good toolkit. also, in both cases, the text appears for editing in the place the user is already looking at. this solution proposed for plan 9 is none of these things. it's not *very* complex, but it is unnecessary complexity which moves plan 9 another step further from the simple system it pretends to be.

can plan 9 programs start $editor like tty programs? let's see...

@{
	rfork n
	unmount /mnt/plumb
	$editor $file
}
what could go wrong if a text-only program does this? if editor = ed or sam -d, nothing; it'll be fine. (caveat: i haven't actually tested it. ;) if editor = sam, the user will have to manually select the file to edit; an annoyance and it hides information which may be present in the file. (in certain moods, i wouldn't know why sam was suddenly running.) options such as -a could be set too. if editor = acme, then you really want editor = (acme -c1), at minimum. this is all right if you don't rely on the plumber to start acme. instead, start it at login with a different -c option. summary: it's fine if you don't rely on $editor to start your system-wide editor, or maybe even if you do.

what about graphical programs under plan 9? if they can stop reading and writing cons kbd and draw until the editor is finished, and if editor = sam or acme, they can do exactly the same as text-only programs. i'm not sure whether ed or sam -d would work or not. i think they will but the window will look ugly. maybe there's a way around it.

then there's the possibility of an all-singing, all-dancing gui program emulating rio to host sam or acme in a portion of its own window. that might be a bit much. :)

in all cases, if $editor is suitable, i can't foresee any problems. maybe there's something i've forgotten.


  parent reply	other threads:[~2020-04-16 10:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <362DF8C1B0A64514457A3CC11BA305F7@ewsd.inri.net>
2020-03-12  2:24 ` Trevor Higgins
2020-03-12  2:29   ` sl
2020-03-13 16:45   ` Ethan Gardener
2020-03-13 17:04     ` hiro
2020-03-13 17:08       ` Ethan Gardener
2020-03-13 17:12         ` hiro
2020-03-13 17:14           ` Ethan Gardener
2020-04-13  1:13     ` ori
2020-04-13  1:31       ` hiro
2020-04-13  3:31       ` Anthony Martin
2020-04-13  3:35         ` ori
2020-04-13  3:47           ` ori
2020-04-16 10:18       ` Ethan Gardener [this message]
2020-04-16 16:05         ` Steve Simon
2020-04-17 19:53           ` ori
2020-04-18 10:51           ` Ethan Gardener
2020-04-22 11:03             ` hiro
     [not found] <EE136F7DAFC0826091FA862A624F0BF5@ewsd.inri.net>
2020-03-12  2:10 ` ori
2020-03-13 16:30   ` hiro
2020-03-13 16:39     ` Stanley Lieber
2020-03-13 16:42       ` hiro
2020-03-13 17:18     ` Steve Simon
2020-03-13 17:28       ` hiro
2020-03-13 21:23       ` Silas McCroskey
2020-03-13 22:04         ` Stanley Lieber
2020-03-13 23:44           ` Ethan Gardener
2020-03-14  0:55             ` Stanley Lieber
2020-03-14 11:20               ` Ethan Gardener
2020-03-13 17:35     ` ori
2020-03-13 19:33       ` Ethan Gardener
2020-03-11 15:22 Stanley Lieber
2020-03-11 22:16 ` [9front] " Steve Simon
2020-03-12  1:49   ` sl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f697a66-4a40-4ec4-afa1-8c1863df5ba9@www.fastmail.com \
    --to=eekee57@fastmail.fm \
    --cc=9front@9front.org \
    --cc=ori@eigenstate.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).