emacs-devel
[Top][All Lists]
Advanced

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

Re: Musings on creating an HTML-based WYSIWYG mode


From: Yuri Khan
Subject: Re: Musings on creating an HTML-based WYSIWYG mode
Date: Wed, 02 May 2018 10:36:15 +0000

On Wed, May 2, 2018 at 4:53 PM Lars Ingebrigtsen <address@hidden> 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 via email to

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