9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Patch: snarf paste support for (e)enter, and refactoring
@ 2024-09-07 11:21 sirjofri
  2024-09-10  2:22 ` thedaemon
  0 siblings, 1 reply; 4+ messages in thread
From: sirjofri @ 2024-09-07 11:21 UTC (permalink / raw)
  To: 9front

Hello,

This patch adds snarf and paste support to the two library functions enter and eenter. It also adds an internal function _genenter to share lots of the code. This does not change the interfaces of (e)enter though, for compatibility reasons.

In total, this adds 100 lines of code, but removes duplicate code for drawing and interpreting input.

I did test it with standard ascii, as well as some simple sequences of greek letters, but there could still be bugs. UTF-8 handling code is mostly inspired by/copied from acme.

More importantly, I can imagine you don't like the structure here and there, as it's more complex than the simple approach we currently have. Just let me know and I'll adjust it accordingly.

The patch is pretty long, so here's just a link to the file. If needed, I can also paste the data directly, just let me know.

https://sirjofri.de/oat/patches/eesp.diff

sirjofri

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] Patch: snarf paste support for (e)enter, and refactoring
  2024-09-07 11:21 [9front] Patch: snarf paste support for (e)enter, and refactoring sirjofri
@ 2024-09-10  2:22 ` thedaemon
  2024-09-20 17:38   ` sirjofri
  0 siblings, 1 reply; 4+ messages in thread
From: thedaemon @ 2024-09-10  2:22 UTC (permalink / raw)
  To: 9front

Quoth sirjofri <sirjofri+ml-9front@sirjofri.de>:
> Hello,
> 
> This patch adds snarf and paste support to the two library functions enter and eenter. It also adds an internal function _genenter to share lots of the code. This does not change the interfaces of (e)enter though, for compatibility reasons.
> 
> In total, this adds 100 lines of code, but removes duplicate code for drawing and interpreting input.
> 
> I did test it with standard ascii, as well as some simple sequences of greek letters, but there could still be bugs. UTF-8 handling code is mostly inspired by/copied from acme.
> 
> More importantly, I can imagine you don't like the structure here and there, as it's more complex than the simple approach we currently have. Just let me know and I'll adjust it accordingly.
> 
> The patch is pretty long, so here's just a link to the file. If needed, I can also paste the data directly, just let me know.
> 
> https://sirjofri.de/oat/patches/eesp.diff
> 
> sirjofri
Thank you!  I
will try this out as soon as I can figure out how to apply this.  One
day I'll use diff enough to memorize the command, that is not today.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] Patch: snarf paste support for (e)enter, and refactoring
  2024-09-10  2:22 ` thedaemon
@ 2024-09-20 17:38   ` sirjofri
  2024-09-21 11:24     ` umbraticus
  0 siblings, 1 reply; 4+ messages in thread
From: sirjofri @ 2024-09-20 17:38 UTC (permalink / raw)
  To: 9front

Hi,

Any news on this? Ping?

sirjofri

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] Patch: snarf paste support for (e)enter, and refactoring
  2024-09-20 17:38   ` sirjofri
@ 2024-09-21 11:24     ` umbraticus
  0 siblings, 0 replies; 4+ messages in thread
From: umbraticus @ 2024-09-21 11:24 UTC (permalink / raw)
  To: 9front

Firtstly, thanks for going at this: we continue to edge
ever closer to a consistent text interface...

I haven't been able to go through the code yet & probably
not qualified to comment anyway, but I found a few things:

Serious problem:

Snarfing seems to work fine but pasting is busted. First one
works, subsequent B1–B3s insert all kinds of nonsense...

Convenience:

Your diff didn't include the necessary additions to OFILES
and HFILES lists in the mkfile.

Nice-to-haves, down the line:

It would be nice if you could select with B1 and have B2 do
the snarf even if the cursor has moved outside the box.

As mentioned probably thru another channel, clicking 
in the label portion being equivalent to pressing enter
is probably undesireable...

Double-clicking behaviour.

umbraticus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-21 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-07 11:21 [9front] Patch: snarf paste support for (e)enter, and refactoring sirjofri
2024-09-10  2:22 ` thedaemon
2024-09-20 17:38   ` sirjofri
2024-09-21 11:24     ` umbraticus

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).