all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yurivkhan@gmail.com>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Musings on creating an HTML-based WYSIWYG mode
Date: Wed, 02 May 2018 10:36:15 +0000	[thread overview]
Message-ID: <CAP_d_8VoNeF4tz83t4HPy3VemG5GnyyWQKpn_XfEEMNGNOLwTw@mail.gmail.com> (raw)
In-Reply-To: <m3r2mus7ws.fsf@gnus.org>

On Wed, May 2, 2018 at 4:53 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:

> I was thinking about things, like, "what does it mean to kill a
> rectangle in a buffer that's auto-reformatted"?  Do we re-render after
> each "piece" that's been killed?  (Probably not.)  What about when the
> user types `M-x query-replace-regexp RET ^foo RET bar'...  If we
> re-render after each replacement (or not), then there might be lines
> starting with "foo" after it has run, anyway (because things will be
> re-flowing).

You can experience these things already with current Emacs. Just generate
some lines that are longer than your window width, and enable
visual-line-mode.

* Rectangle operations break pretty horribly. That is, they behave as if no
line wrapping was in effect, acting on parts of the logical lines defined
in terms of character offset from beginning of line.

* Regular expression ^ and $ work in terms of logical lines, too.

And you know what — that is okay. When you know you have (almost) no
control over how words get laid out into lines, you stop worrying about
that and let text flow freely.

For rectangle operations, I know three use cases in plain text:
indentation, tables, and multi-column layouts. All of these have direct
HTML+CSS replacements that are better exposed as separate editing commands:
apply style; clone style; modify some aspect of the style at point.



  reply	other threads:[~2018-05-02 10:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01 14:54 Musings on creating an HTML-based WYSIWYG mode Lars Ingebrigtsen
2018-05-01 19:00 ` Søren Pilgård
2018-05-01 20:11   ` Lars Ingebrigtsen
2018-05-02  8:16     ` Søren Pilgård
2018-05-02  9:22     ` Joost Kremers
2018-05-02  9:36       ` Van L
2018-05-02  1:45 ` Stefan Monnier
2018-05-02  9:50   ` Lars Ingebrigtsen
2018-05-02 10:36     ` Yuri Khan [this message]
2018-05-02 10:43       ` Lars Ingebrigtsen
2018-05-02 10:49         ` Yuri Khan
2018-05-02 20:32   ` Michael Heerdegen
2018-05-02  3:11 ` Richard Stallman
2018-05-02  3:50   ` Van L

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=CAP_d_8VoNeF4tz83t4HPy3VemG5GnyyWQKpn_XfEEMNGNOLwTw@mail.gmail.com \
    --to=yurivkhan@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.