edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] Bringing Delete Back
Date: Tue, 15 Sep 2015 11:50:25 -0400	[thread overview]
Message-ID: <20150815115025.eklhad@comcast.net> (raw)

Here are some thoughts on bringing the d command back in browse mode.
Every implementation has some caveats on certain web pages.
We just have to be ok with that.

When a line is deleted, mark all nodes on that line as deleted,
or invisible or some such.
Also mark any descendant nodes of these nodes.
They might not appear on the page at this time,
but innerHTML could add text to them later, and then they would
appear on the page, and we don't want that, since we deleted
the structure that contains it.
With nodes so marked, they would not render, and the line would not reappear.

It would be difficult, though not impossible, to undo this change.
Very likely there would be no undo command.
This is not unusual.
Delete in directory mode deletes the file,
and delete in database mode deletes the row, and there is no undo.
So I think this is ok.
You can always rebrowse or refresh the page if you screwed up.

The last node deleted could extend well beyond the current line.
It could be a preformatted <pre> poem that goes on for 3 pages.
So you delete a line and after rerender, or any javascript action,
the whole poem is gone.
This seems to be quite rare.
A web page can barely put to words together without changing font or style or something.
So I think this would be a very rare case, I'm just saying it could happen.

On the other side, if you delete the fifth line from a preformatted poem,
you haven't deleted any nodes, and upon rerender the entire poem reappears,
including the line you deleted.
Again I think this is rare.
In practice people delete entire blocks or logical sections from a web page,
not the middle of a paragraph.

I'll continue to think about this and other d implementations for a bit.

Karl Dahlke

                 reply	other threads:[~2015-09-15 15:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20150815115025.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /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).