Po Lu writes: > Eli Zaretskii writes: > > >> That's the technical description of the implementation. It doesn't >> explain when canvases can be useful and for what purposes. > > Canvases are useful for when I want to be able to control a portion of a > screen dynamically, in a fast way, from Lisp code. For instance, > displaying a constantly changing bar chart or graph inside Emacs. > >> But the result of this painting is some graphical object, similar to >> an image, that will be displayed within a buffer, right? > > Correct. > >> Did I miss the code that tells Emacs the click was on a canvas? E.g., >> if you click on a canvas, what does posn-object return when passed the >> click event as its argument? > > Oops. I missed that. Thanks for bringing it up. Here is a version of the patch with several of the problems you mentioned rectified.