unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rudalics@gmx.at, emacs-devel@gnu.org
Subject: Re: Layered display API
Date: Sat, 16 Aug 2014 03:03:33 +0400	[thread overview]
Message-ID: <53EE91C5.9060502@yandex.ru> (raw)
In-Reply-To: <83sikygssk.fsf@gnu.org>

On 08/15/2014 10:39 AM, Eli Zaretskii wrote:

>> Well, since we don't only need to replace the displayed characters, but
>> also modify them, this doesn't do a lot of work for us.
>
> Not sure why you would need to modify them.  My understanding is that
> you include in the overlay some of the displayed text, and also
> include your own text.

Yes, we take the displayed text, *modify* its copy to overwrite some 
pieces of it with our text, and put it on our overlay. So one of the 
hard parts, if done perfectly, would be to obtain the displayed text 
correctly.

> What I'm suggesting will allow you not to duplicate the displayed
> text, but just add an overlay with your own.

Sorry, I'm getting strongly mixed signals here: just recently, when I 
enumerated a list of requirements for displaying our popup, you replied:

"""
Given these requirements, I think the only 2 alternatives to implement
them for GUI frames are:

   . tooltip frames, suitably beefed up to provide some features they
     currently don't, like more control of colors and faces

   . some low-level graphics feature that would allow to overlay an
     arbitrary pixmap on the window display (this is far from my area
     of expertise, so I cannot say anything more about this
     possibility)

Nothing else seems possible, because if we rely on the current display
engine, we will be unable to fully control at least the vertical
position of the lines in your popup, and in some cases (e.g.,
line-prefix) also the horizontal position.
"""

So, which part of the job would the new text property perform, and which 
part of it will be left to us to implement?

> See above: because what exists doesn't do the job for you well enough.
> Copying into your overlay existing text from buffer, other overlays,
> and display strings is fragile design with known deficiencies (which
> were revealed in this thread).  Having a special property that would
> avoid all that is a win, IMO.  For example, you will be able to stop
> worrying about line-prefix and images.

Let's imagine this sample case:

   (insert "e\naaaaaa\n")
   (insert (propertize " " 'display "bbbbbb\ncccccc")

(By the way, try this out in *scratch* and do some C-n, C-p. Do you see 
the movement error? Here, the cursor always jumps over the "aaa..." 
line when moving toward the beginning of the buffer.)

Let's say the point is at the end of the first line (after "e"), and 
we'd like to display a popup under it, 4 columns wide and 2 lines tall. 
If the popup is all filled with "x" characters, it should look like this:

e.
axxxxa
bxxxxb
cccccc

If the new property was already implemented, what would the code to do 
this look like?



  reply	other threads:[~2014-08-15 23:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <86tx5r7l1j.fsf@yandex.ru>
     [not found] ` <53E097F7.5050407@gmx.at>
     [not found]   ` <53E0ABF9.7070506@yandex.ru>
     [not found]     ` <8338dbqcai.fsf@gnu.org>
     [not found]       ` <53E14AF4.6050804@yandex.ru>
     [not found]         ` <83k36mpbxg.fsf@gnu.org>
2014-08-06 12:40           ` Layered display API (was: bug#18195: 24.3.92; window-screen-lines is not accurate) Dmitry Gutov
2014-08-06 17:19             ` Eli Zaretskii
2014-08-06 18:20               ` Alp Aker
2014-08-06 18:39                 ` Eli Zaretskii
2014-08-06 20:48                   ` Layered display API Stefan Monnier
2014-08-07  2:45                     ` Eli Zaretskii
2014-08-06 20:49               ` Dmitry Gutov
2014-08-07 15:39                 ` Eli Zaretskii
2014-08-11  1:14                   ` Dmitry Gutov
2014-08-11 15:01                     ` Eli Zaretskii
2014-08-13  2:42                       ` Dmitry Gutov
2014-08-13 12:46                         ` Stefan Monnier
2014-08-13 15:29                           ` Eli Zaretskii
2014-08-13 16:27                           ` Dmitry Gutov
2014-08-13 17:07                             ` Eli Zaretskii
2014-08-13 17:45                             ` Stefan Monnier
2014-08-13 15:28                         ` Eli Zaretskii
2014-08-14  2:35                           ` Dmitry Gutov
2014-08-14  2:53                             ` Eli Zaretskii
2014-08-14 13:12                               ` Dmitry Gutov
2014-08-14 15:20                                 ` Eli Zaretskii
2014-08-15  1:20                                   ` Dmitry Gutov
2014-08-15  6:39                                     ` Eli Zaretskii
2014-08-15 23:03                                       ` Dmitry Gutov [this message]
2014-08-16  7:41                                         ` Eli Zaretskii
2014-08-16  9:17                                           ` Dmitry Gutov
2014-08-14  2:06                       ` Bo Lin
2014-08-14  2:49                         ` Eli Zaretskii
2014-08-14 16:08                           ` Bo Lin
2014-08-14 16:19                             ` Eli Zaretskii
2014-08-14 16:42                               ` Bo Lin
2014-08-06 20:56               ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53EE91C5.9060502@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /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 public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).