emacs-devel
[Top][All Lists]
Advanced

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

Re: enriched-mode and switching major modes.


From: Kim F. Storm
Subject: Re: enriched-mode and switching major modes.
Date: Sun, 19 Sep 2004 00:11:42 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

"Eli Zaretskii" <address@hidden> writes:

> That is where I think we disagree: I think that the amount of Lisp
> code that relies on being able to deduce lots of layout-related issues
> by merely looking at the buffer is HUGE.  You really do NOT want to
> modify every Emacs command like CUA Mode did.

I think you confuse CUA with s-region.el and pc-select.el which does
modify a lot of commands, or make strange key bindings to achieve the 
"use shift to start/extend the region" behaviour.

CUA mode does NOT modify any "ordinary" commands.

Instead, CUA has a list of commands which it should recognize as "cursor
movement", so it can know when a shifted cursor movement key should
activate/extend the region.

>
>> And then there is also the point that this approach fails for the more
>> complicated things: tables with different font heights, paragraphs
>> with background colours and borders ...
>
> I suggest to discuss that and try to identify the specific problems
> that you think will cause such an approach to fail.  Then we might
> have a better idea of the limitations of this approach, and could talk
> about solutions.
>
> In other words, the current design might indeed have to be changed,
> but I think you will agree that such changes need to be kept to a
> minimum, lest we end up redesigning Emacs.  Talking about specific
> problems will help to come up with such a minimal set of changes.


I can see one such example:

Consider

 A
 A

to mean ONE double height A, while

 b
 c

are two normal height characters.

With the current emacs display engine, there is no way
to display something simple like

 AAAbbbbbbb
 AAAccccccc

The best emacs can do is:

 AAAbbbbbbb
 AAA
    ccccccc

as it has a primitive "no overlapping line" display model.

Even worse if you have two 1.5 height characters on two lines (top half
of X belongs to the A, bottom half of X belongs to H)

 A   < line 1
 X
 H   < line 2
   
You cannot display a mix of 2 and 3 lines like this:

 AAAbbbbbbb
 XXXccccccc
 HHHddddddd

Again, the best emacs can do is something like

 AAAbbbbbbb
 VVV
 ^^^ccccccc
 HHH
    ddddddd

Still, in all of these examples, it is quite easy to see what <down>
arrow should do, and not too difficult to see what <right> should do
either.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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