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: Wed, 22 Sep 2004 09:44:19 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     If I understand Kim correctly, then simple tables where the first
>     column contains a caption for the row would be an example where it
>     would matter.
>
> Is it common practice to use "a caption for a row" in a document?

Maybe not, but it shows the general concept of what is displayed in
one table cell can be _completely_ unrelated to what is displayed in
another table cell.

>
>     E.g. tables with different font sizes.  Try this:
>
>     <html><body>
>     <table>
>     <tr>
>     <td><font size=7>AAA</font></td>
>     <td>bbbbbb<br>cccccc</td>
>     </tr>
>     </table>
>     </body></html>
>
> Is this a useful thing to do?  How important is it
> for a word processor to support this sort of thing?

Very important.

Consider also the example that instead of AAA we have a tall image,
and bbbb ccccc etc is text that is displayed next to that image like
this:

+---------+
|         | this text
|         | is shown
|         | on multiple
|         | lines on the
|         | right side of
|         | an image
+---------+


I still think my idea to use "anonymous" windows as the base of a
block display model would be a good solution (and we already have 95%
of the code to do it).

It could be done like this:

(let* ((b (get-buffer-create "X"))
       (w (make-anonymous-window b)))
  (with-current-buffer b
    (insert 
"this text    
is shown     
on multiple  
lines on the 
right side of
an image"))
  (insert-image IMAGE)
  (insert-anonymous-window w))


The insert-anonymous-window would do something like

(defun insert-anonymous-window (w)
  (insert (propertize "*" 'display `(window ,w))))

Of course, cursor movement need to know how to move in and out of the
anonymous window when we move through the display -- that might be
doable with point-enter and point-leave properties, or we need some
other mechanism.







reply via email to

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