* (no subject) @ 2006-09-02 18:08 Richard Stallman 2006-09-03 21:30 ` cursor doesn't show through transparent images in emacs 22, unlike emacs 21 Kim F. Storm 0 siblings, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-09-02 18:08 UTC (permalink / raw) Cc: juri, emacs-devel, storm In-reply-to: <2cd46e7f0609010846o7b393dd5xef60a645125d08@mail.gmail.com> (ken.manheimer@gmail.com) Subject: Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 bcc: rms-outgoing@gnu.org Reply-to: rms@gnu.org References: <2cd46e7f0608181622w23c7d2b0h9b963deeadfd1c06@mail.gmail.com> <E1GHpIm-00027E-7t@fencepost.gnu.org> <87wt8sbhux.fsf@jurta.org> <m3zmdoa2h7.fsf@kfs-l.imdomain.dk> <2cd46e7f0608291431k1d26dac9l1f41c271da28495e@mail.gmail.com> <85y7t7mdha.fsf@lola.goethe.zz> <2cd46e7f0608291512ne9a865av7fb7bb537658887a@mail.gmail.com> <E1GIUKm-0000Gd-Tx@fencepost.gnu.org> <2cd46e7f0608301120q190d710bya04f85359e79e29@mail.gmail.com> <E1GIr5F-0000KL-6z@fencepost.gnu.org> <2cd46e7f0609010846o7b393dd5xef60a645125d08@mail.gmail.com> --text follows this line-- > What happens when you do not specify any :mask attribute? > Is that the case where the cursor fails to show? yes. > If I understand right, then this is a bug, as I previously said. i think i agree. the only question i have concerns the resonsibility and disrcetion of the application developer. I think we have a responsibility to make sure that the default way of displaying an image does work properly with the cursor. To have some peculiar option which means the cursor does not display properly might be excusable, but it's not excusable for the default to display wrong. I suggested: That would be bad, since it would change the geometry. What I think he proposed is to show the cursor over the outer parts of the image. That seems good for this case. Is anyone working on this? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-02 18:08 (no subject) Richard Stallman @ 2006-09-03 21:30 ` Kim F. Storm 2006-09-04 17:17 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-09-03 21:30 UTC (permalink / raw) Cc: juri, Ken Manheimer, emacs-devel Richard Stallman <rms@gnu.org> writes: > I think we have a responsibility to make sure that the default way of > displaying an image does work properly with the cursor. To have some > peculiar option which means the cursor does not display properly might > be excusable, but it's not excusable for the default to display wrong. > But it's not a new default -- it's been like that since 21.1. Nobody has complained about it until now, so it's not a big problem and there is a trivial workaround. > I suggested: > > That would be bad, since it would change the geometry. > What I think he proposed is to show the cursor over the outer parts > of the image. That seems good for this case. > > Is anyone working on this? I don't think so. PS: Changing this requires updates to all of X, W32 and MAC ports. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-03 21:30 ` cursor doesn't show through transparent images in emacs 22, unlike emacs 21 Kim F. Storm @ 2006-09-04 17:17 ` Richard Stallman 2006-09-04 22:42 ` Kim F. Storm 0 siblings, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-09-04 17:17 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel > I think we have a responsibility to make sure that the default way of > displaying an image does work properly with the cursor. To have some > peculiar option which means the cursor does not display properly might > be excusable, but it's not excusable for the default to display wrong. > But it's not a new default -- it's been like that since 21.1. Maybe that just means everybody specifies :mask. This is definitely a bug, and I think we should fix it. and there is a trivial workaround. What exactly is the workaround you recommend? PS: Changing this requires updates to all of X, W32 and MAC ports. That depends on how it is done. Let's see how that workaround works. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-04 17:17 ` Richard Stallman @ 2006-09-04 22:42 ` Kim F. Storm 2006-09-06 8:49 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-09-04 22:42 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel Richard Stallman <rms@gnu.org> writes: > But it's not a new default -- it's been like that since 21.1. > > Maybe that just means everybody specifies :mask. Or that nobody uses images without a border. > This is definitely a bug, and I think we should fix it. > > and there is a trivial workaround. > > What exactly is the workaround you recommend? Use :mask ... > > PS: Changing this requires updates to all of X, W32 and MAC ports. > > That depends on how it is done. Writing a border into the image requires those updates. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-04 22:42 ` Kim F. Storm @ 2006-09-06 8:49 ` Richard Stallman 2006-09-06 9:15 ` David Kastrup 0 siblings, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-09-06 8:49 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel > What exactly is the workaround you recommend? Use :mask ... Then how about changing the default value for :mask? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-06 8:49 ` Richard Stallman @ 2006-09-06 9:15 ` David Kastrup 2006-09-06 10:00 ` Kim F. Storm 2006-09-07 6:54 ` Richard Stallman 0 siblings, 2 replies; 83+ messages in thread From: David Kastrup @ 2006-09-06 9:15 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel, Kim F. Storm Richard Stallman <rms@gnu.org> writes: > > What exactly is the workaround you recommend? > > Use :mask ... > > Then how about changing the default value for :mask? There is no sensible default. What is useful as a mask depends on the image in question. Using heuristic-mask can mean that the whole image flashes, but it can also mean that just a single corner pixel blinks. Even when a mask is specified, using the whole mask as a cursor indication is not a good idea, since a large image with a background will then flash horribly. The right fix in my opinion would be to use the border of the image (extending into the image itself if the border is too small, overwriting the image when no mask is given, but maybe heeding the mask if it is given). For a block cursor, there should be a maximum number of pixels that is affected. If this number is exceeded, a box cursor would be used with a thickness that does not cause the number of pixels to exceed the threshold, but lets it have at least the thickness of a box cursor + 1 pixel. Something like that. Yes, sounds tiresome. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-06 9:15 ` David Kastrup @ 2006-09-06 10:00 ` Kim F. Storm 2006-09-06 16:12 ` Ken Manheimer 2006-09-07 6:54 ` Richard Stallman 1 sibling, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-09-06 10:00 UTC (permalink / raw) Cc: juri, ken.manheimer, rms, emacs-devel David Kastrup <dak@gnu.org> writes: > Richard Stallman <rms@gnu.org> writes: > >> > What exactly is the workaround you recommend? >> >> Use :mask ... >> >> Then how about changing the default value for :mask? > > There is no sensible default. What is useful as a mask depends on the > image in question. Using heuristic-mask can mean that the whole image > flashes, but it can also mean that just a single corner pixel blinks. > > Even when a mask is specified, using the whole mask as a cursor > indication is not a good idea, since a large image with a background > will then flash horribly. The right fix in my opinion would be to use > the border of the image (extending into the image itself if the border > is too small, overwriting the image when no mask is given, but maybe > heeding the mask if it is given). For a block cursor, there should be > a maximum number of pixels that is affected. If this number is > exceeded, a box cursor would be used with a thickness that does not > cause the number of pixels to exceed the threshold, but lets it have > at least the thickness of a box cursor + 1 pixel. > > Something like that. Yes, sounds tiresome. Indeed. So... can we please postpone resolving this until after the release. There is currently a work-around (using :mask) in the FEW (if any) cases where there is no border around an image that could be used for the cursor. And the other work-around is to specify a border. This is not a new bug -- it's been like this since 21.1, and only recently have we had just one user complaining about it. And he seems satisfied with the changes I made to use a block cursor for small images. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-06 10:00 ` Kim F. Storm @ 2006-09-06 16:12 ` Ken Manheimer 0 siblings, 0 replies; 83+ messages in thread From: Ken Manheimer @ 2006-09-06 16:12 UTC (permalink / raw) Cc: juri, rms, emacs-devel On 9/6/06, Kim F. Storm <storm@cua.dk> wrote: > David Kastrup <dak@gnu.org> writes: > > > Richard Stallman <rms@gnu.org> writes: > > > >> > What exactly is the workaround you recommend? > >> > >> Use :mask ... > >> > >> Then how about changing the default value for :mask? > > > > There is no sensible default. What is useful as a mask depends on the > > image in question. Using heuristic-mask can mean that the whole image > > flashes, but it can also mean that just a single corner pixel blinks. > > > > Even when a mask is specified, using the whole mask as a cursor > > indication is not a good idea, since a large image with a background > > will then flash horribly. The right fix in my opinion would be to use > > the border of the image (extending into the image itself if the border > > is too small, overwriting the image when no mask is given, but maybe > > heeding the mask if it is given). For a block cursor, there should be > > a maximum number of pixels that is affected. If this number is > > exceeded, a box cursor would be used with a thickness that does not > > cause the number of pixels to exceed the threshold, but lets it have > > at least the thickness of a box cursor + 1 pixel. > > > > Something like that. Yes, sounds tiresome. > > Indeed. So... > > can we please postpone resolving this until after the release. > > There is currently a work-around (using :mask) in the FEW (if any) > cases where there is no border around an image that could be used for > the cursor. And the other work-around is to specify a border. > > This is not a new bug -- it's been like this since 21.1, and only > recently have we had just one user complaining about it. And he > seems satisfied with the changes I made to use a block cursor > for small images. the one catch is that i had not connected the :mask image spec with my problem. perhaps i'm dense, but i wonder whether the issue of background, cursor, and image mask deserves some greater prominence in the image documentation, so those floundering as i was get more guidance. as it currently stands, i wouldn't have connected the fact that the mask can expose the "background of the frame" with the thing i was trying to achieve, which is showing the cursor in the image. (i may have given it a try, but not been clear enough about whether to expect the cursor to show through that i would notice whether or not it worked.) so i expect that at least some documentation improvement is in order. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-06 9:15 ` David Kastrup 2006-09-06 10:00 ` Kim F. Storm @ 2006-09-07 6:54 ` Richard Stallman 2006-09-07 7:47 ` David Kastrup 1 sibling, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-09-07 6:54 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel, storm There is no sensible default. What is useful as a mask depends on the image in question. Using heuristic-mask can mean that the whole image flashes, but it can also mean that just a single corner pixel blinks. 1. So what? Another default can't be worse than the present one, and it would be better MOST of the time. 2. Maybe we need another possible :mask value which would specify drawing the cursor in the way that you suggested. 3. If #2 is too complex to do now, maybe we should make it an error to fail to specify :mask on an image on a character in the buffer. That is simple. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-07 6:54 ` Richard Stallman @ 2006-09-07 7:47 ` David Kastrup 2006-09-09 20:45 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: David Kastrup @ 2006-09-07 7:47 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel, storm Richard Stallman <rms@gnu.org> writes: > There is no sensible default. What is useful as a mask depends on the > image in question. Using heuristic-mask can mean that the whole image > flashes, but it can also mean that just a single corner pixel blinks. > > 1. So what? Another default can't be worse than the present one, > and it would be better MOST of the time. The present setting results in almost all cases in a recognizable cursor position (images with border 0 are possible only come Emacs 22.1). The indication is not perfect in all cases, but vastly better than a large flashing image. Which would happen to be the result of the new default in most cases. I have experienced that: trust me, this default _is_ worse, much much worse than the existing one. The existing one is quirky, your suggestion would be result in it becoming horrible. preview-latex had to go to quite disadvantageous techniques to avoid large-scale flashing in Emacs 21. You'd reintroduce it. > 2. Maybe we need another possible :mask value which would specify > drawing the cursor in the way that you suggested. I think it would be a mistake to abuse :mask just in order to get the cursor to display in a useful way. In particular since it would mean that customizing the cursor type would have no effect on images, and all image managing software would have to implement their own idea of a cursor. > 3. If #2 is too complex to do now, maybe we should make it an error to > fail to specify :mask on an image on a character in the buffer. > That is simple. It will also break wagonloads of existing code. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-07 7:47 ` David Kastrup @ 2006-09-09 20:45 ` Richard Stallman 2006-09-09 22:55 ` David Kastrup 2006-09-10 0:21 ` Kim F. Storm 0 siblings, 2 replies; 83+ messages in thread From: Richard Stallman @ 2006-09-09 20:45 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel, storm The present setting results in almost all cases in a recognizable cursor position (images with border 0 are possible only come Emacs 22.1). Are you saying that the problem of failing to show the cursor only applies when the border is 0, and that that is a new feature? In that case, let's limit my recommendations to the case when the border is 0. We can give :mask a different default, or make the lack of :mask an error, only when border is 0. I have experienced that: trust me, this default _is_ worse, much much worse than the existing one. That makes no sense at all. The current default (in the case with border 0) is not to show the cursor at all. (If I'm mistaken, please explain.) If we change it to heuristic-mask, then usually it would show the cursor. That is better than not showing the cursor. If you want me to believe this is worse, you'll have to demonstrate it with clear explanation, not emotional upset. preview-latex had to go to quite disadvantageous techniques to avoid large-scale flashing in Emacs 21. You'd reintroduce it. Would you please show the justification for that claim?x I think it would be a mistake to abuse :mask just in order to get the cursor to display in a useful way. There is no "abuse" in changing the default. In particular since it would mean that customizing the cursor type would have no effect on images, Why do you think it would mean that? > 3. If #2 is too complex to do now, maybe we should make it an error to > fail to specify :mask on an image on a character in the buffer. > That is simple. It will also break wagonloads of existing code. I doubt it. You've said border 0 is a new feature, so there can't be so much existing code that uses it. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-09 20:45 ` Richard Stallman @ 2006-09-09 22:55 ` David Kastrup 2006-09-10 0:21 ` Kim F. Storm 1 sibling, 0 replies; 83+ messages in thread From: David Kastrup @ 2006-09-09 22:55 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel, storm Richard Stallman <rms@gnu.org> writes: > The present setting results in almost all cases in a recognizable > cursor position (images with border 0 are possible only come Emacs > 22.1). > > Are you saying that the problem of failing to show the cursor > only applies when the border is 0, and that that is a new feature? Yes. > In that case, let's limit my recommendations to the case when the > border is 0. We can give :mask a different default, or make the > lack of :mask an error, only when border is 0. It is my opinion that we should not meddle with the defaults of mask, since mask may serve independent purposes: it is well possible that the _image_ has a transparency layer and specifies a mask. And when this mask just happens to be opaque (not an uncommon occurence), we are back to square one: masks can perfectly well be all opaque. The proper solution would be to draw in the image itself. If we instead use a temporary fix instead, it should not be interlocked with :mask since the final, proper solution should be independent of mask, too. > I have experienced that: trust me, this default _is_ worse, > much much worse than the existing one. > > That makes no sense at all. The current default (in the case with > border 0) is not to show the cursor at all. (If I'm mistaken, > please explain.) If we change it to heuristic-mask, then usually it > would show the cursor. That is better than not showing the cursor. We had cases in the combined Emacs/preview-latex history where the cursor was not displayed (we have not used :border yet). The user will usually remember how he arrived at the character and not lose track of the cursor. If he gets away from the screen, a quick cursor movement forth and back will reestablish the position. The alternative is that the graphic on which the cursor is positioned will be flashing (since the graphics tend to be characters on background, this means the lion share of the graphics). Now we have put the customization option for a flashing cursor into the top of the options menu because people get close to epileptic reactions by a 10x20 square (at most) flashing at them. If a graphic taking half the screen or more is flashing (easily an area larger by a factor of 1000), even the most insensitive person will get close to getting a heart attack. It is _very_ _very_ disconcerting, much more so than the cursor just disappearing. The cursor disappearing feels like a quirk: you can play around it, make do by moving the cursor back and forth to figure out where you are. The whole screen flashing at you feels like an attack on your sanity. It is impossible to concentrate or do anything sensible except move the cursor elsewhere. > If you want me to believe this is worse, you'll have to demonstrate > it with clear explanation, not emotional upset. > > preview-latex had to go to quite disadvantageous techniques to avoid > large-scale flashing in Emacs 21. You'd reintroduce it. > > Would you please show the justification for that claim? In preview-latex under Emacs 21, we generate images with a colored border and let just this border become transparent. This means that the images are useless for anything else. There is a mode to cut and paste a text passage into mail messages, and those color-border images under Emacs-21 need to be regenerated without a border then. The cursor display in Emacs 22 (a box around the cursor) was decent enough to just use that: no artificial play with transparent borders was needed. The corresponding definition looks like the following: ;;; Note that the following default introduces a border only when ;;; Emacs blinks politely when point is on an image (the tested ;;; unrelated function was introduced at about the time image blinking ;;; became tolerable). (defcustom preview-transparent-border (unless (fboundp 'posn-object-x-y) 1.5) "Width of transparent border for previews in pt. Setting this to a numeric value will add a border of `preview-transparent-color' around images, and will turn the heuristic-mask setting of images to default to 't since then the borders are correctly detected even in case of palette operations. If the transparent color is something not present otherwise in the image, the cursor display will affect just this border. A width of 0 is interpreted by PostScript as meaning a single pixel, other widths are interpreted as PostScript points (1/72 of 1in)" :group 'preview-appearance :type '(choice (const :value nil :tag "No border") (number :value 1.5 :tag "Border width in pt"))) > I think it would be a mistake to abuse :mask just in order to get the > cursor to display in a useful way. > > There is no "abuse" in changing the default. But :mask, :border and :cursor are unrelated things. Making their defaults depend on one another does not see like a good idea. > In particular since it would mean > that customizing the cursor type would have no effect on images, > > Why do you think it would mean that? There are cursor types of block and bar. How would you display block and bar cursors by fiddling with the default of :mask? > > 3. If #2 is too complex to do now, maybe we should make it an > > error to fail to specify :mask on an image on a character in > > the buffer. That is simple. > > It will also break wagonloads of existing code. > > I doubt it. You've said border 0 is a new feature, so there can't > be so much existing code that uses it. Admitted. I just don't think that making this an error is the right migration path: ultimately, the cursor should just be drawn in the image area. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-09 20:45 ` Richard Stallman 2006-09-09 22:55 ` David Kastrup @ 2006-09-10 0:21 ` Kim F. Storm 2006-09-10 13:04 ` Richard Stallman 1 sibling, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-09-10 0:21 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel Richard Stallman <rms@gnu.org> writes: > The present setting results in almost all cases in a recognizable > cursor position (images with border 0 are possible only come Emacs > 22.1). > > Are you saying that the problem of failing to show the cursor > only applies when the border is 0, and that that is a new feature? > > In that case, let's limit my recommendations to the case when the > border is 0. We can give :mask a different default, or make the lack > of :mask an error, only when border is 0. I just installed a change to always use the hollow cursor (which draws inside the image border) for non-transparent images (with no mask). It was a one-line change, not requiring changes to any platform files (contrary to what I said earlier, we do already have the necessary code to draw into the image -- namely the "draw hollow cursor" code). I hope this settles the current issue. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-10 0:21 ` Kim F. Storm @ 2006-09-10 13:04 ` Richard Stallman 2006-09-10 20:25 ` Kim F. Storm 0 siblings, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-09-10 13:04 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel I just installed a change to always use the hollow cursor (which draws inside the image border) for non-transparent images (with no mask). "Inside the image border" has two natural meanings: * Over the region that is the border * Over a region that is smaller than the border and which the border circumscribes. The former would be a no-op with border 0; the latter would not. Which one did you implement? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-10 13:04 ` Richard Stallman @ 2006-09-10 20:25 ` Kim F. Storm 2006-09-10 23:00 ` Robert J. Chassell 2006-09-11 14:11 ` Richard Stallman 0 siblings, 2 replies; 83+ messages in thread From: Kim F. Storm @ 2006-09-10 20:25 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel Richard Stallman <rms@gnu.org> writes: > I just installed a change to always use the hollow cursor (which draws > inside the image border) for non-transparent images (with no mask). > > "Inside the image border" has two natural meanings: > > * Over the region that is the border > > * Over a region that is smaller than the border and which the border > circumscribes. > > The former would be a no-op with border 0; the latter would not. > Which one did you implement? It is a 1-pixel hollow rectangle along the "outer edge" of the area occupied by the "image glyph" (whether it has a border, relief, both or none) -- just like the hollow cursor on any other glyph. So if the image has a border, the hollow cursor is in the border -- otherwise it is in the image itself. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-10 20:25 ` Kim F. Storm @ 2006-09-10 23:00 ` Robert J. Chassell 2006-09-11 5:32 ` tomas 2006-09-11 8:08 ` Kim F. Storm 2006-09-11 14:11 ` Richard Stallman 1 sibling, 2 replies; 83+ messages in thread From: Robert J. Chassell @ 2006-09-10 23:00 UTC (permalink / raw) Cc: Kim F. Storm It is a 1-pixel hollow rectangle along the "outer edge" ... In other words, is it a 3 by 3 pixel square without color of any sort in the central pixel, i.e., black in the central pixel, but some other color, such as red in the other eight, of the nine pixels that make up the square? I am not sure what you mean by `1-pixel hollow'. What do you mean when you say `a 1-pixel hollow rectangle'? Do you mean without color, or do you mean transparent, that is to say, permitting the color of what you refer to as ` the "outer edge" ' to show through, or partially transparent (and if so, how much)? Or do you mean that it is a one pixel square without color, that is to say black, in that one pixel? Or something else? I do not grasp what you mean. Please be more precise for people like us, who see many alternatives. -- Robert J. Chassell bob@rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.rattlesnake.com http://www.teak.cc ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-10 23:00 ` Robert J. Chassell @ 2006-09-11 5:32 ` tomas 2006-09-11 8:08 ` Kim F. Storm 1 sibling, 0 replies; 83+ messages in thread From: tomas @ 2006-09-11 5:32 UTC (permalink / raw) Cc: Kim F. Storm, emacs-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Sep 10, 2006 at 11:00:49PM +0000, Robert J. Chassell wrote: > It is a 1-pixel hollow rectangle along the "outer edge" ... > > In other words, is it a 3 by 3 pixel square without color of any sort > in the central pixel [...] I think I got it: take tha whole image glyph (possibly with border, if it has one). cut from it all around a strip, 1 pixel wide along the (rectangular) edge. This is the "area" of the cursor. It is a hollow rectangle whose exterior is m x n pixels and whose interior is (m-1) x (n-1) pixels, if the original glyph was m x n pixels. HTH - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFBPTlBcgs9XrR2kYRAot5AJ4hW5F7Ez7rblCaMQVgOvRotdcf5wCcDmSA 3dGDBM+OP/52p0zlCVsor8s= =6+Wm -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-10 23:00 ` Robert J. Chassell 2006-09-11 5:32 ` tomas @ 2006-09-11 8:08 ` Kim F. Storm 2006-09-11 8:16 ` David Kastrup 2006-09-11 11:56 ` Robert J. Chassell 1 sibling, 2 replies; 83+ messages in thread From: Kim F. Storm @ 2006-09-11 8:08 UTC (permalink / raw) Cc: emacs-devel "Robert J. Chassell" <bob@rattlesnake.com> writes: > Please be more precise for people like us, who see many alternatives. Is this less ambiguous? The cursor is shown as a 1-pixel wide line drawn along edge of the combined image + border area. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-11 8:08 ` Kim F. Storm @ 2006-09-11 8:16 ` David Kastrup 2006-09-11 11:56 ` Robert J. Chassell 1 sibling, 0 replies; 83+ messages in thread From: David Kastrup @ 2006-09-11 8:16 UTC (permalink / raw) Cc: bob, emacs-devel storm@cua.dk (Kim F. Storm) writes: > "Robert J. Chassell" <bob@rattlesnake.com> writes: > >> Please be more precise for people like us, who see many alternatives. > > Is this less ambiguous? > > The cursor is shown as a 1-pixel wide line drawn along edge > of the combined image + border area. "[...] drawn inside the edge of [...]". The edge itself is 0 pixels wide and just between pixels. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-11 8:08 ` Kim F. Storm 2006-09-11 8:16 ` David Kastrup @ 2006-09-11 11:56 ` Robert J. Chassell 2006-09-11 12:51 ` Kim F. Storm 1 sibling, 1 reply; 83+ messages in thread From: Robert J. Chassell @ 2006-09-11 11:56 UTC (permalink / raw) Cc: emacs-devel The cursor is shown as a 1-pixel wide line drawn along edge of the combined image + border area. Ah! Am I right in understanding that you mean the cursor is a loop as wide [first meaning of `wide'] as the combined image + border, and that the loop is one pixel wide [second meaning of `wide']? In a picture +----------------------+ | | | rest of | | image | | | | | | | +----------------------+ <----------------------> width, first meaning The + - and | consist of the cursor, a loop. Am I right in understanding that you mean the width, second meaning, of the loop is one pixel, or on one of my screens, a little less than 0.2 mm but in others more than 0.25 mm? When you say the 1-pixel wide line is `hollow', what do you mean? Do you mean the center of the loop is the image, i.e., the cursor does not cover it up, and that the 1-pixel wide line is some color such as black or red? Or do you mean that pixels in the loop itself are without color, meaning dark (trying to be black) on an RGB projection system? Or what? -- Robert J. Chassell bob@rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.rattlesnake.com http://www.teak.cc ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-11 11:56 ` Robert J. Chassell @ 2006-09-11 12:51 ` Kim F. Storm 2006-09-11 14:40 ` Robert J. Chassell 0 siblings, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-09-11 12:51 UTC (permalink / raw) Cc: emacs-devel "Robert J. Chassell" <bob@rattlesnake.com> writes: > The cursor is shown as a 1-pixel wide line drawn along edge > of the combined image + border area. > > Ah! Am I right in understanding that you mean the cursor is a loop as > wide [first meaning of `wide'] as the combined image + border, and > that the loop is one pixel wide [second meaning of `wide']? Yes. > Am I right in understanding that you mean the width, second meaning, > of the loop is one pixel, or on one of my screens, a little less than > 0.2 mm but in others more than 0.25 mm? Yes, a pixel is a pixel is a pixel... > When you say the 1-pixel wide line is `hollow', what do you mean? It is similar to the other types of "hollow cursors" we have -- i.e. the rest of the underlying glyph is still visible. > > Do you mean the center of the loop is the image, i.e., the cursor does > not cover it up, Yes. > and that the 1-pixel wide line is some color such as > black or red? Yes, it drawn in the current "cursor color". Have you never seen Emacs draw a hollow cursor before? -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-11 12:51 ` Kim F. Storm @ 2006-09-11 14:40 ` Robert J. Chassell 0 siblings, 0 replies; 83+ messages in thread From: Robert J. Chassell @ 2006-09-11 14:40 UTC (permalink / raw) Cc: emacs-devel > When you say the 1-pixel wide line is `hollow', what do you > mean? It is similar to the other types of "hollow cursors" we have -- i.e. the rest of the underlying glyph is still visible. > Do you mean the center of the loop is the image, i.e., the > cursor does not cover it up, Yes. Now I understand. Some of my pictures are big, and I did not realize that you meant the cursor to go around them and that movement be within a cursor. The Emacs' hollow cursors I have seen before have all been small, about one character in size. > ... and that the 1-pixel wide line is some color > such as black or red? Yes, it drawn in the current "cursor color". My current "cursor color" is white, which may be a color in a picture, so it could be not be seen. Now you make sense. Thank you. -- Robert J. Chassell bob@rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.rattlesnake.com http://www.teak.cc ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-09-10 20:25 ` Kim F. Storm 2006-09-10 23:00 ` Robert J. Chassell @ 2006-09-11 14:11 ` Richard Stallman 1 sibling, 0 replies; 83+ messages in thread From: Richard Stallman @ 2006-09-11 14:11 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel So if the image has a border, the hollow cursor is in the border -- otherwise it is in the image itself. Sounds good. Thanks. ^ permalink raw reply [flat|nested] 83+ messages in thread
* cursor doesn't show through transparent images in emacs 22, unlike emacs 21 @ 2006-08-18 23:22 Ken Manheimer 2006-08-18 23:33 ` Drew Adams 2006-08-19 23:09 ` Kim F. Storm 0 siblings, 2 replies; 83+ messages in thread From: Ken Manheimer @ 2006-08-18 23:22 UTC (permalink / raw) i don't know how to get anything but the outermost pixels of the cursor to show behind transparent images in emacs 22, while the cursor body shows through the transparent part of images in emacs 21. here's a fairly simple way to produce the effect: emacs -q include the following text in the scratch buffer: (put-text-property 1 2 'display (find-image '((:type xpm :file "info.xpm")))) evaluate the expression, and the first character in the buffer should turn into the info question mark glyph. put the cursor on the first character. in emacs 22, only the outermost pixel of the cursor shows. in emacs 21, the cursor color shows through everything but the question mark symbol, itself. the info xpm images shipped with emacs 21.4 and 22.0.50 are identical. is this a bug, or am i doing something wrong? -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* RE: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-18 23:22 Ken Manheimer @ 2006-08-18 23:33 ` Drew Adams 2006-08-19 17:49 ` Ken Manheimer 2006-08-19 23:09 ` Kim F. Storm 1 sibling, 1 reply; 83+ messages in thread From: Drew Adams @ 2006-08-18 23:33 UTC (permalink / raw) emacs -q include the following text in the scratch buffer: (put-text-property 1 2 'display (find-image '((:type xpm :file "info.xpm")))) That doesn't seem to do anything for me; it just returns nil. Do I need to do something else? (I'm using Emacs on Windows.) ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-18 23:33 ` Drew Adams @ 2006-08-19 17:49 ` Ken Manheimer 0 siblings, 0 replies; 83+ messages in thread From: Ken Manheimer @ 2006-08-19 17:49 UTC (permalink / raw) Cc: Emacs-Devel On 8/18/06, Drew Adams <drew.adams@oracle.com> wrote: > emacs -q > include the following text in the scratch buffer: > (put-text-property 1 2 'display (find-image '((:type xpm > :file "info.xpm")))) > > That doesn't seem to do anything for me; it just returns nil. Do I need to > do something else? (I'm using Emacs on Windows.) you need to find an image that comes with your emacs that has a transparent background, and provide the right parameters to find-image - the right type and path to the image off of the image-load-path. i nearly missed your reply, by the way - i miss some emacs-devel traffic, so it's a good idea to cc me directly if you want to be sure to get my attention. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-18 23:22 Ken Manheimer 2006-08-18 23:33 ` Drew Adams @ 2006-08-19 23:09 ` Kim F. Storm 2006-08-20 1:49 ` Ken Manheimer ` (2 more replies) 1 sibling, 3 replies; 83+ messages in thread From: Kim F. Storm @ 2006-08-19 23:09 UTC (permalink / raw) Cc: Emacs-Devel "Ken Manheimer" <ken.manheimer@gmail.com> writes: > i don't know how to get anything but the outermost pixels of the > cursor to show behind transparent images in emacs 22, while the cursor > body shows through the transparent part of images in emacs 21. In emacs 22, we don't show a block cursor on images; instead we just put a border on the image. The rationale is that the old behaviour was really ugly in most cases ... particularly when using a blinking cursor. Is this something you really need? -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-19 23:09 ` Kim F. Storm @ 2006-08-20 1:49 ` Ken Manheimer 2006-08-20 5:00 ` Ken Manheimer 2006-08-20 12:05 ` Richard Stallman 2006-08-20 9:03 ` Jason Rumney 2006-08-20 12:05 ` Richard Stallman 2 siblings, 2 replies; 83+ messages in thread From: Ken Manheimer @ 2006-08-20 1:49 UTC (permalink / raw) Cc: Emacs-Devel On 8/19/06, Kim F. Storm <storm@cua.dk> wrote: > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > > > i don't know how to get anything but the outermost pixels of the > > cursor to show behind transparent images in emacs 22, while the cursor > > body shows through the transparent part of images in emacs 21. > > In emacs 22, we don't show a block cursor on images; instead we just > put a border on the image. The rationale is that the old behaviour was > really ugly in most cases ... particularly when using a blinking cursor. > > Is this something you really need? yes. it's terrible the way it is. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-20 1:49 ` Ken Manheimer @ 2006-08-20 5:00 ` Ken Manheimer 2006-08-20 6:42 ` David Kastrup 2006-08-20 12:05 ` Richard Stallman 1 sibling, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-20 5:00 UTC (permalink / raw) Cc: Emacs-Devel [-- Attachment #1: Type: text/plain, Size: 1472 bytes --] On 8/19/06, Ken Manheimer <ken.manheimer@gmail.com> wrote: > On 8/19/06, Kim F. Storm <storm@cua.dk> wrote: > > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > > > > > i don't know how to get anything but the outermost pixels of the > > > cursor to show behind transparent images in emacs 22, while the cursor > > > body shows through the transparent part of images in emacs 21. > > > > In emacs 22, we don't show a block cursor on images; instead we just > > put a border on the image. The rationale is that the old behaviour was > > really ugly in most cases ... particularly when using a blinking cursor. > > > > Is this something you really need? > > yes. it's terrible the way it is. the two pictures show views of the same buffer, one with the cursor in the window, the other with the cursor in another window. they're indistinguishable. not good. of course, there's more to the picture. i didn't show how the mode line lights up to indicate that the current buffer is active. unfortunately, as i've determined over the month or so i was hoping to get used to it (and maybe stumble on the solution, since i failed to do so in the while i spent initially trying to figure it what i was doing wrong), but i still look for the blatant - but, unfortunately, absent - cue of the boldly lit cursor. it's usually there, would be just the right thing, and its absence is broken, at least for my situation. -- ken ken.manheimer@gmail.com http://myriadicity.net [-- Attachment #2: allout-widgets_with.png --] [-- Type: image/png, Size: 7774 bytes --] [-- Attachment #3: allout-widgets_without.png --] [-- Type: image/png, Size: 7300 bytes --] [-- Attachment #4: Type: text/plain, Size: 142 bytes --] _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-20 5:00 ` Ken Manheimer @ 2006-08-20 6:42 ` David Kastrup 0 siblings, 0 replies; 83+ messages in thread From: David Kastrup @ 2006-08-20 6:42 UTC (permalink / raw) Cc: Emacs-Devel, Kim F. Storm "Ken Manheimer" <ken.manheimer@gmail.com> writes: > On 8/19/06, Ken Manheimer <ken.manheimer@gmail.com> wrote: >> On 8/19/06, Kim F. Storm <storm@cua.dk> wrote: >> > "Ken Manheimer" <ken.manheimer@gmail.com> writes: >> > >> > > i don't know how to get anything but the outermost pixels of the >> > > cursor to show behind transparent images in emacs 22, while the cursor >> > > body shows through the transparent part of images in emacs 21. >> > >> > In emacs 22, we don't show a block cursor on images; instead we just >> > put a border on the image. The rationale is that the old behaviour was >> > really ugly in most cases ... particularly when using a blinking cursor. >> > >> > Is this something you really need? >> >> yes. it's terrible the way it is. > > the two pictures show views of the same buffer, one with the cursor in > the window, the other with the cursor in another window. they're > indistinguishable. not good. Have you disabled cursor blinking? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-20 1:49 ` Ken Manheimer 2006-08-20 5:00 ` Ken Manheimer @ 2006-08-20 12:05 ` Richard Stallman 2006-08-20 15:10 ` Ken Manheimer 1 sibling, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-08-20 12:05 UTC (permalink / raw) Cc: emacs-devel, storm yes. it's terrible the way it is. What exactly are you trying to do, which comes out so terrible? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-20 12:05 ` Richard Stallman @ 2006-08-20 15:10 ` Ken Manheimer 2006-08-20 17:27 ` David Kastrup 2006-08-22 3:09 ` Richard Stallman 0 siblings, 2 replies; 83+ messages in thread From: Ken Manheimer @ 2006-08-20 15:10 UTC (permalink / raw) Cc: emacs-devel, storm On 8/20/06, Richard Stallman <rms@gnu.org> wrote: > yes. it's terrible the way it is. > > What exactly are you trying to do, which comes out so terrible? sorry - i did elaborate later that evening in a subsequent message, including a few pictures that show what i feel is a real problem. here's the details of the problem. in my allout outliner extensions, the outline structure is represented with graphics characters - icons for the connecting lines and item bullets. single character navigation is available when the cursor is on the structural elements (like allout's "hotspot" navigation, but extended), so browsing and even moving between edits is simplified by moving to the structural icons. with this bug, however, it's hard to tell whether or not the cursor is in the window or another. in my (now, a couple of months worth of) experience, highlighting of the mode line is not sufficient because the cue of the highlighted cursor is normally so pronounced that it eclipses all other cues. (that's not a bad thing - the cursor is the central focus of active editing, and this activation an appropriate piece of info for it to convey, along with location.) being used to the highlighted cursor cue, it's absence is a problem - when returning to my editing session, or from editing in separate frame, i frequently spend time distracted, wondering whether or not the cursor is active. you would think i'd look at the mode line, but usually i move the cursor around. talk about the editor getting in the way of editing... if you have doubts about the severity of the problem, please look at the pictures in my previous message. while it omits some information that actually is present, it presents what i, for one, actually notice while editing, and what's there is inadequate to gauge an important detail - whether or not the cursor is active. in my case, it would be sufficient to have a buffer-local variable that says "highlight cursor behind transparent graphics". that variable could default to off or on, i don't care. another provision on top of that, which might be a thorough solution, would be to allow such a setting per graphic - so that a buffer could have it on and selected graphics could inhibit it, or vice versa. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-20 15:10 ` Ken Manheimer @ 2006-08-20 17:27 ` David Kastrup 2006-08-22 3:09 ` Richard Stallman 1 sibling, 0 replies; 83+ messages in thread From: David Kastrup @ 2006-08-20 17:27 UTC (permalink / raw) Cc: storm, rms, emacs-devel "Ken Manheimer" <ken.manheimer@gmail.com> writes: > On 8/20/06, Richard Stallman <rms@gnu.org> wrote: >> yes. it's terrible the way it is. >> >> What exactly are you trying to do, which comes out so terrible? > > sorry - i did elaborate later that evening in a subsequent message, > including a few pictures that show what i feel is a real problem. > here's the details of the problem. I ask again: have you disabled cursor blinking? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-20 15:10 ` Ken Manheimer 2006-08-20 17:27 ` David Kastrup @ 2006-08-22 3:09 ` Richard Stallman 2006-08-22 8:03 ` David Kastrup 2006-08-22 13:19 ` Ken Manheimer 1 sibling, 2 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-22 3:09 UTC (permalink / raw) Cc: emacs-devel, storm with this bug, however, it's hard to tell whether or not the cursor is in the window or another. I see why this is a problem. So I suppose that anything which makes the cursor visible would solve the problem. Right? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-22 3:09 ` Richard Stallman @ 2006-08-22 8:03 ` David Kastrup 2006-08-22 13:45 ` Ken Manheimer 2006-08-22 13:19 ` Ken Manheimer 1 sibling, 1 reply; 83+ messages in thread From: David Kastrup @ 2006-08-22 8:03 UTC (permalink / raw) Cc: Ken Manheimer, storm, emacs-devel Richard Stallman <rms@gnu.org> writes: > with this bug, however, it's hard to > tell whether or not the cursor is in the window or another. > > I see why this is a problem. > > So I suppose that anything which makes the cursor visible > would solve the problem. Right? I don't know why Ken has chosen not to reply on the list, but he told me in private that he has disabled cursor blinking (or rather, lets it commence only after 30 seconds). Of course, the blinking will make a very visible difference for the default settings. So our worry is just for people who have tampered with the defaults. His proposal to use transparency is not really useful except for special cases since a) images are not always the size of his small icons, and so could be vastly more obnoxious when blinking b) images don't all have transparency. Different ways to do this: a) offer to make the cursor border on selected frames thicker b) offer to use a different cursor color for selected frames -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-22 8:03 ` David Kastrup @ 2006-08-22 13:45 ` Ken Manheimer 2006-08-24 11:31 ` Kim F. Storm 0 siblings, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-22 13:45 UTC (permalink / raw) Cc: storm, rms, emacs-devel On 8/22/06, David Kastrup <dak@gnu.org> wrote: > Richard Stallman <rms@gnu.org> writes: > > > with this bug, however, it's hard to > > tell whether or not the cursor is in the window or another. > > > > I see why this is a problem. > > > > So I suppose that anything which makes the cursor visible > > would solve the problem. Right? > > I don't know why Ken has chosen not to reply on the list, but he told > me in private that he has disabled cursor blinking (or rather, lets it > commence only after 30 seconds). it was just an oversight - i meant to reply to the list and you, but forgot to hit "reply-to". what i wrote: sorry, i didn't realize you had directed that to me. no, but i delay cursor bliking for 20 seconds, because i find it distracting, and only want it happening when imy attention has gone away to something else and is coming back. are you suggesting that the blinking would be enough of a cue for an active buffer? > Of course, the blinking will make a very visible difference for the > default settings. So our worry is just for people who have tampered > with the defaults. the blink of the border is a distinct cue. i still think the absence of the solid cursor is misleading, in this case. to put it in an affirmative sense, the presence of the solid cursor would be more clear. > His proposal to use transparency is not really useful except for > special cases since > a) images are not always the size of his small icons, and so could be > vastly more obnoxious when blinking i understand that icons are often large, so that a solid cursor would be distracting and garish, doubly so with blinking. > b) images don't all have transparency. i think it's reasonable in those cases to not expect the cursor to show through. that said, i wouldn't mind having a display option for the images to xor the image colors, or something like that, when the cursor is on them. > Different ways to do this: > > a) offer to make the cursor border on selected frames thicker > > b) offer to use a different cursor color for selected frames i suppose both of those would work. from seeing the effect of the solid cursor showing through in emacs 21, my impression is that it's the most natural - consistent and clear - signal, in cases like my character-sized icons, where it is suitable. as i think i suggested in a previous message, the solution i would prefer would be to have some way to qualify icons so that they get a solid cursor in their transparent areas, and the default would be to have it inactive. eg, a qualifier for xpm, png, gif, and other transparent-capable images, like :solid-cursor: `:solid-cursor-shows BOOLEAN' When true, the cursor will appear solid through the transparent regions of the image when the cursor is situated on the image and the window is active. The default is for only the cursor border to show, whether or not the window is active. by having the default be off, then the disruption of oversize blinking icons will be avoided. i am hardly acquainted with display system, so don't know whether this is doable without undue effort. xor for non-transparent icons (and transparent ones, for that matter) could be a related option, if it were doable. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-22 13:45 ` Ken Manheimer @ 2006-08-24 11:31 ` Kim F. Storm 2006-08-24 11:49 ` David Kastrup ` (2 more replies) 0 siblings, 3 replies; 83+ messages in thread From: Kim F. Storm @ 2006-08-24 11:31 UTC (permalink / raw) Cc: rms, emacs-devel "Ken Manheimer" <ken.manheimer@gmail.com> writes: > as i think i suggested in a previous message, the solution i would > prefer would be to have some way to qualify icons so that they get a > solid cursor in their transparent areas, and the default would be to > have it inactive. eg, a qualifier for xpm, png, gif, and other > transparent-capable images, like :solid-cursor: > > `:solid-cursor-shows BOOLEAN' > When true, the cursor will appear solid through the transparent > regions of the image > when the cursor is situated on the image and the window is > active. The default is for > only the cursor border to show, whether or not the window is active. > > by having the default be off, then the disruption of oversize blinking > icons will be avoided. Below is a patch which adds a new image :cursor property where you can specify the actual type of cursor to show on the image in the selected window (that is more flexible than your suggestion, and just as easy to do). Due to limitations in what cursors can be displayed for an image (bar and hbar both gives a solid box??), it only works to set it to box, hollow, and t (which means use whatever cursor-type is in the buffer). As an additional part of the patch, it only changes the cursor from box to hollow for images which as greater than 4 times the frame's default font size i.e. small images will behave like normal glyphs with respect to the box cursor. We can use either or both methods -- WDYT ? *** xdisp.c 22 Aug 2006 23:28:12 +0200 1.1113 --- xdisp.c 24 Aug 2006 13:12:33 +0200 *************** *** 367,373 **** Lisp_Object Qimage; /* The image map types. */ ! Lisp_Object QCmap, QCpointer; Lisp_Object Qrect, Qcircle, Qpoly; /* Non-zero means print newline to stdout before next mini-buffer --- 367,373 ---- Lisp_Object Qimage; /* The image map types. */ ! Lisp_Object QCmap, QCpointer, QCcursor; Lisp_Object Qrect, Qcircle, Qpoly; /* Non-zero means print newline to stdout before next mini-buffer *************** *** 21210,21217 **** if (!w->cursor_off_p) { if (glyph != NULL && glyph->type == IMAGE_GLYPH) { ! if (cursor_type == FILLED_BOX_CURSOR) ! cursor_type = HOLLOW_BOX_CURSOR; } return cursor_type; } --- 21210,21238 ---- if (!w->cursor_off_p) { if (glyph != NULL && glyph->type == IMAGE_GLYPH) { ! struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id); ! if (img != NULL && IMAGEP (img->spec)) ! { ! /* If image has a :cursor property, use that in selected window. ! If property value is `t', use current cursor_type. */ ! Lisp_Object cursor_prop; ! if ((cursor_prop = Fplist_get (XCDR (img->spec), QCcursor), ! !NILP (cursor_prop))) ! return (EQ (cursor_prop, Qt) ! ? cursor_type ! : get_specified_cursor_type (cursor_prop, width)); ! ! /* Just show border around images to avoid excessive blinking ! for "large images". */ ! if (cursor_type == FILLED_BOX_CURSOR ! && (img->width > WINDOW_FRAME_COLUMN_WIDTH (w) * 4 ! || img->height > WINDOW_FRAME_LINE_HEIGHT (w) * 4)) ! cursor_type = HOLLOW_BOX_CURSOR; ! } ! else ! /* Just show border around images to avoid excessive blinking */ ! if (cursor_type == FILLED_BOX_CURSOR) ! cursor_type = HOLLOW_BOX_CURSOR; } return cursor_type; } *************** *** 23709,23714 **** --- 23730,23737 ---- staticpro (&QCmap); QCpointer = intern (":pointer"); staticpro (&QCpointer); + QCcursor = intern (":cursor"); + staticpro (&QCcursor); Qrect = intern ("rect"); staticpro (&Qrect); Qcircle = intern ("circle"); -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 11:31 ` Kim F. Storm @ 2006-08-24 11:49 ` David Kastrup 2006-08-25 13:48 ` Kim F. Storm 2006-08-24 14:20 ` Ken Manheimer 2006-08-25 20:23 ` Richard Stallman 2 siblings, 1 reply; 83+ messages in thread From: David Kastrup @ 2006-08-24 11:49 UTC (permalink / raw) Cc: Ken Manheimer, rms, emacs-devel storm@cua.dk (Kim F. Storm) writes: > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > >> as i think i suggested in a previous message, the solution i would >> prefer would be to have some way to qualify icons so that they get a >> solid cursor in their transparent areas, and the default would be to >> have it inactive. eg, a qualifier for xpm, png, gif, and other >> transparent-capable images, like :solid-cursor: >> >> `:solid-cursor-shows BOOLEAN' >> When true, the cursor will appear solid through the transparent >> regions of the image >> when the cursor is situated on the image and the window is >> active. The default is for >> only the cursor border to show, whether or not the window is active. >> >> by having the default be off, then the disruption of oversize blinking >> icons will be avoided. > > Below is a patch which adds a new image :cursor property where you can > specify the actual type of cursor to show on the image in the selected > window (that is more flexible than your suggestion, and just as easy > to do). > > Due to limitations in what cursors can be displayed for an image (bar > and hbar both gives a solid box??), it only works to set it to > box, hollow, and t (which means use whatever cursor-type is in the > buffer). > > > As an additional part of the patch, it only changes the cursor > from box to hollow for images which as greater than 4 times the > frame's default font size i.e. small images will behave like > normal glyphs with respect to the box cursor. > > > We can use either or both methods -- WDYT ? I don't like the hardwired factor of 4: after all, nothing like this will be applied if you use large fonts. I think we should try to make characters and images behave comparably. Having a general size limitation variable available for block cursors, whether we are talking images or characters, would be more consistent. This size limitation could be specified as either float (multiple of default font size) or integer (pixels? Or 10ths of points?). Of course, if an image has no transparency, we probably need to use a box cursor, anyway. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 11:49 ` David Kastrup @ 2006-08-25 13:48 ` Kim F. Storm 0 siblings, 0 replies; 83+ messages in thread From: Kim F. Storm @ 2006-08-25 13:48 UTC (permalink / raw) Cc: Ken Manheimer, rms, emacs-devel David Kastrup <dak@gnu.org> writes: > I don't like the hardwired factor of 4: after all, nothing like this > will be applied if you use large fonts. I think we should try to make > characters and images behave comparably. Having a general size > limitation variable available for block cursors, whether we are > talking images or characters, would be more consistent. > > This size limitation could be specified as either float (multiple of > default font size) or integer (pixels? Or 10ths of points?). What about the simpler approach in the patch below? It simply uses a hollow cursor if the image size is > WxH where WxH is max(32, default width|height), i.e. block cursor is used on all images <= 32x32 and possibly larger images if the default font size is larger than that. It is not customizable, but I suppose it will give satifying results for most practical uses. > > Of course, if an image has no transparency, we probably need to use a > box cursor, anyway. Did you mean hollow cursor? *** xdisp.c 24 Aug 2006 22:38:58 +0200 1.1114 --- xdisp.c 25 Aug 2006 15:38:42 +0200 *************** *** 21213,21221 **** /* Use normal cursor if not blinked off. */ if (!w->cursor_off_p) { ! if (glyph != NULL && glyph->type == IMAGE_GLYPH) { ! if (cursor_type == FILLED_BOX_CURSOR) ! cursor_type = HOLLOW_BOX_CURSOR; } return cursor_type; } --- 21213,21233 ---- /* Use normal cursor if not blinked off. */ if (!w->cursor_off_p) { ! if (glyph != NULL && glyph->type == IMAGE_GLYPH ! && cursor_type == FILLED_BOX_CURSOR) { ! /* Using a block cursor on large images can be very annoying. ! So use a hollow cursor for "large" images. */ ! struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id); ! if (img != NULL && IMAGEP (img->spec)) ! { ! /* Arbitrarily, interpret "Large" as >32x32 and >NxN ! where N = size of default frame font size. ! This should cover most of the "tiny" icons people may use. */ ! ! if (img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w)) ! || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w))) ! cursor_type = HOLLOW_BOX_CURSOR; ! } } return cursor_type; } -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 11:31 ` Kim F. Storm 2006-08-24 11:49 ` David Kastrup @ 2006-08-24 14:20 ` Ken Manheimer 2006-08-24 14:26 ` Kim F. Storm 2006-08-25 20:23 ` Richard Stallman 2 siblings, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-24 14:20 UTC (permalink / raw) Cc: rms, emacs-devel On 8/24/06, Kim F. Storm <storm@cua.dk> wrote: > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > > > as i think i suggested in a previous message, the solution i would > > prefer would be to have some way to qualify icons so that they get a > > solid cursor in their transparent areas, and the default would be to > > have it inactive. eg, a qualifier for xpm, png, gif, and other > > transparent-capable images, like :solid-cursor: > > > > `:solid-cursor-shows BOOLEAN' > > When true, the cursor will appear solid through the transparent > > regions of the image > > when the cursor is situated on the image and the window is > > active. The default is for > > only the cursor border to show, whether or not the window is active. > > > > by having the default be off, then the disruption of oversize blinking > > icons will be avoided. > > Below is a patch which adds a new image :cursor property where you can > specify the actual type of cursor to show on the image in the selected > window (that is more flexible than your suggestion, and just as easy > to do). yay! > Due to limitations in what cursors can be displayed for an image (bar > and hbar both gives a solid box??), it only works to set it to > box, hollow, and t (which means use whatever cursor-type is in the > buffer). > > > As an additional part of the patch, it only changes the cursor > from box to hollow for images which as greater than 4 times the > frame's default font size i.e. small images will behave like > normal glyphs with respect to the box cursor. > > We can use either or both methods -- WDYT ? if i'm understanding correctly, i think either or both methods will satisfy my needs - thanks! i'm not clear how the two interact - will the :cursor setting only affect glyphs larger than 4 times the frame's default font size? or does it mean that glyphs will have particular cursors if they either are 4 times the size or if they have an explicit :cursor display setting? my concern is settled either way, but the documentation may be complex if there's no simple answer. i also wonder whether it will be confusing to have the option for graphics formats that don't support transparency, but have no strong opinions about this. i agree w/david about making the scaling threshold a parameter. that could actually help with documentation by providing an artifact that's conveys some of the explanation. i would lean towards a scaling factor rather than absolute pixels/points, but haven't thought that through. by the way, i (eagerly) applied your patch by hand, but am unable to compile - i'm getting complaints about QCursor being undeclared: xdisp.c: In function `get_window_cursor_type': xdisp.c:21219: error: `QCcursor' undeclared (first use in this function) xdisp.c:21219: error: (Each undeclared identifier is reported only once xdisp.c:21219: error: for each function it appears in.) xdisp.c: In function `syms_of_xdisp': xdisp.c:23733: error: `QCcursor' undeclared (first use in this function) did i miss something, or is there more to the patch? ken > *** xdisp.c 22 Aug 2006 23:28:12 +0200 1.1113 > --- xdisp.c 24 Aug 2006 13:12:33 +0200 > *************** > *** 367,373 **** > Lisp_Object Qimage; > [...] -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 14:20 ` Ken Manheimer @ 2006-08-24 14:26 ` Kim F. Storm 2006-08-24 15:53 ` Ken Manheimer 0 siblings, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-24 14:26 UTC (permalink / raw) Cc: rms, emacs-devel "Ken Manheimer" <ken.manheimer@gmail.com> writes: > i'm not clear how the two interact - will the :cursor setting only > affect glyphs larger than 4 times the frame's default font size? or > does it mean that glyphs will have particular cursors if they either > are 4 times the size or if they have an explicit :cursor display > setting? my concern is settled either way, but the documentation may > be complex if there's no simple answer. A :cursor property takes precedence over the other methods. > i also wonder whether it will be confusing to have the option for > graphics formats that don't support transparency, but have no strong > opinions about this. It is _your_ responsibility to use the proper cursor for your image :-) > i agree w/david about making the scaling threshold a parameter. that > could actually help with documentation by providing an artifact that's > conveys some of the explanation. i would lean towards a scaling > factor rather than absolute pixels/points, but haven't thought that > through. It's no big deal. > > by the way, i (eagerly) applied your patch by hand, but am unable to > compile - i'm getting complaints about QCursor being undeclared: You overlooked the first part of the patch which adds QCcursor... -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 14:26 ` Kim F. Storm @ 2006-08-24 15:53 ` Ken Manheimer 2006-08-24 19:56 ` Kim F. Storm 0 siblings, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-24 15:53 UTC (permalink / raw) Cc: rms, emacs-devel On 8/24/06, Kim F. Storm <storm@cua.dk> wrote: > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > > i'm not clear how the two interact - will the :cursor setting only > > affect glyphs larger than 4 times the frame's default font size? or > > does it mean that glyphs will have particular cursors if they either > > are 4 times the size or if they have an explicit :cursor display > > setting? my concern is settled either way, but the documentation may > > be complex if there's no simple answer. > > A :cursor property takes precedence over the other methods. > > > i also wonder whether it will be confusing to have the option for > > graphics formats that don't support transparency, but have no strong > > opinions about this. > > It is _your_ responsibility to use the proper cursor for your image :-) fair enough. > > i agree w/david about making the scaling threshold a parameter. that > > could actually help with documentation by providing an artifact that's > > conveys some of the explanation. i would lean towards a scaling > > factor rather than absolute pixels/points, but haven't thought that > > through. > > It's no big deal. > > > by the way, i (eagerly) applied your patch by hand, but am unable to > > compile - i'm getting complaints about QCursor being undeclared: > > You overlooked the first part of the patch which adds QCcursor... whoops. thanks, that did it! i now get a full box cursor showing through the transparent parts of my glyphs - with no additional changes on my part. in case some exercising of the :cursor part of the change would be helpful, i experimented with changing the image cursor to hbar. i was unable to see any change - the solid cursor still shows behind the image. i tried using text-properties-at to check whether the :cursor property was there, and got: (display (image :type xpm :cursor hbar :file "/home/klm/lib/emacs/allout_dev/allout-icons-dark-bg/closed.xpm" :ascent center :mask (heuristic t))) i would expect to see an hbar. my expectation or actions may be mistaken, and i don't need to clear this up (the full box is what i need), but can experiment further if it would be helpful. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 15:53 ` Ken Manheimer @ 2006-08-24 19:56 ` Kim F. Storm 2006-08-24 21:41 ` Ken Manheimer 2006-08-25 14:28 ` Kim F. Storm 0 siblings, 2 replies; 83+ messages in thread From: Kim F. Storm @ 2006-08-24 19:56 UTC (permalink / raw) Cc: rms, emacs-devel "Ken Manheimer" <ken.manheimer@gmail.com> writes: > i would expect to see an hbar. my expectation or actions may be > mistaken, and i don't need to clear this up (the full box is what i > need), but can experiment further if it would be helpful. As I said in a previous posting, a bar or hbar cursor is shown as a box on an image. That's a different bug. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 19:56 ` Kim F. Storm @ 2006-08-24 21:41 ` Ken Manheimer 2006-08-25 14:28 ` Kim F. Storm 1 sibling, 0 replies; 83+ messages in thread From: Ken Manheimer @ 2006-08-24 21:41 UTC (permalink / raw) Cc: rms, emacs-devel On 8/24/06, Kim F. Storm <storm@cua.dk> wrote: > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > > > i would expect to see an hbar. my expectation or actions may be > > mistaken, and i don't need to clear this up (the full box is what i > > need), but can experiment further if it would be helpful. > > As I said in a previous posting, a bar or hbar cursor is shown as a > box on an image. That's a different bug. i missed that. hollow works as it ought, so i can confirm the :cursor part of your patch. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 19:56 ` Kim F. Storm 2006-08-24 21:41 ` Ken Manheimer @ 2006-08-25 14:28 ` Kim F. Storm 2006-08-25 15:24 ` Ken Manheimer 1 sibling, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-25 14:28 UTC (permalink / raw) Cc: rms, emacs-devel storm@cua.dk (Kim F. Storm) writes: > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > >> i would expect to see an hbar. my expectation or actions may be >> mistaken, and i don't need to clear this up (the full box is what i >> need), but can experiment further if it would be helpful. > > As I said in a previous posting, a bar or hbar cursor is shown as a > box on an image. That's a different bug. So rather that trying to fix that (non-trivial as it must be done on all platforms), I'd prefer to postpone installing the :cursor property change (in some form) until after the release. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-25 14:28 ` Kim F. Storm @ 2006-08-25 15:24 ` Ken Manheimer 2006-08-26 10:08 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-25 15:24 UTC (permalink / raw) Cc: rms, emacs-devel On 8/25/06, Kim F. Storm <storm@cua.dk> wrote: > storm@cua.dk (Kim F. Storm) writes: > > > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > > > >> i would expect to see an hbar. my expectation or actions may be > >> mistaken, and i don't need to clear this up (the full box is what i > >> need), but can experiment further if it would be helpful. > > > > As I said in a previous posting, a bar or hbar cursor is shown as a > > box on an image. That's a different bug. > > So rather that trying to fix that (non-trivial as it must be done on > all platforms), I'd prefer to postpone installing the :cursor property > change (in some form) until after the release. just to be sure i'm being clear - i don't have a concern about the hbar/box problem. i was just exercising more of your patch because you had gone to the trouble of implementing it. in fact, my concerns would be settled with the changes, currently being discussed, that enable the filled-in box cursor for glyphs of size comparable to the frame's default font. i hope that one of those alternatives will be included with the release, independent of the :cursor provisions. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-25 15:24 ` Ken Manheimer @ 2006-08-26 10:08 ` Richard Stallman 0 siblings, 0 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-26 10:08 UTC (permalink / raw) Cc: emacs-devel, storm in fact, my concerns would be settled with the changes, currently being discussed, that enable the filled-in box cursor for glyphs of size comparable to the frame's default font. Before considering proposals for new features to address this problem, I want to understand the nature of the problem. I sent mail yesterday explaining a confusion that I think we need to clear up, in order to make sure we understand the situation. When this is cleared up, we will see how to proceed. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-24 11:31 ` Kim F. Storm 2006-08-24 11:49 ` David Kastrup 2006-08-24 14:20 ` Ken Manheimer @ 2006-08-25 20:23 ` Richard Stallman 2006-08-25 22:35 ` Kim F. Storm 2006-08-25 23:01 ` Ken Manheimer 2 siblings, 2 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-25 20:23 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel > as i think i suggested in a previous message, the solution i would > prefer would be to have some way to qualify icons so that they get a > solid cursor in their transparent areas, and the default would be to > have it inactive. eg, a qualifier for xpm, png, gif, and other > transparent-capable images, like :solid-cursor: > > `:solid-cursor-shows BOOLEAN' > When true, the cursor will appear solid through the transparent > regions of the image This does not make sense without more context. For instance, what behavior would a value of nil specify? And what happens in non-transparent regions of the image? Meanwhile, something about this wording bothers me: the idea that the cursor appears "through" part of the image. Is this based on the assumption that the image is "on top of" the cursor? If so, I think that assumption is backwards and must be changed. The cursor is "on top of" the image; if we want to display a cursor on the image, the image should not be allowed to block it out! ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-25 20:23 ` Richard Stallman @ 2006-08-25 22:35 ` Kim F. Storm 2006-08-26 12:22 ` Richard Stallman 2006-08-25 23:01 ` Ken Manheimer 1 sibling, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-25 22:35 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel Richard Stallman <rms@gnu.org> writes: > Meanwhile, something about this wording bothers me: the idea that the > cursor appears "through" part of the image. Is this based on the > assumption that the image is "on top of" the cursor? A block cursor on an image is shown by using the cursor color as the background color in the image. That's not changed from emacs 21, and I don't see any reason to change it now for 22. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-25 22:35 ` Kim F. Storm @ 2006-08-26 12:22 ` Richard Stallman 2006-08-26 21:37 ` Kim F. Storm 0 siblings, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-08-26 12:22 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel A block cursor on an image is shown by using the cursor color as the background color in the image. I think this means that if the image blocks out the background color, then the cursor won't appear. Is that correct? I think that is a problem. But it looks like the problem that was reported is different. How do they differ? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-26 12:22 ` Richard Stallman @ 2006-08-26 21:37 ` Kim F. Storm 2006-08-27 14:34 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-26 21:37 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel Richard Stallman <rms@gnu.org> writes: > A block cursor on an image is shown by using the cursor color > as the background color in the image. > > I think this means that if the image blocks out the background color, > then the cursor won't appear. Is that correct? I think that is a problem. Maybe -- but it's not a new problem. It's the same as it was in 21.x, and I don't recall any reports of that behaviour being a problem. > But it looks like the problem that was reported is different. How > do they differ? The current complaint is that we unconditionally replace the box cursor by a hollow cursor on images -- even small images (comparable in size to a character glyph) where the box cursor would do fine (and did fine in emacs 21.x). My change addresses this problem by making a distinction between small and "larger" images. IMO, this is the right fix for emacs 22. OTOH, my change does not try to address (the never-repoprted, non-existent?) problem with using a box cursor on images. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-26 21:37 ` Kim F. Storm @ 2006-08-27 14:34 ` Richard Stallman 2006-08-27 20:37 ` Ken Manheimer ` (2 more replies) 0 siblings, 3 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-27 14:34 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel > I think this means that if the image blocks out the background color, > then the cursor won't appear. Is that correct? I think that is a problem. Maybe -- but it's not a new problem. It's the same as it was in 21.x, and I don't recall any reports of that behaviour being a problem. How could it possibly not be a problem? Is it that nobody uses non-transparent images? Nobody cares about seeing the cursor in buffers that use non-transparent images? The current complaint is that we unconditionally replace the box cursor by a hollow cursor on images -- even small images (comparable in size to a character glyph) where the box cursor would do fine (and did fine in emacs 21.x). My change addresses this problem by making a distinction between small and "larger" images. IMO, this is the right fix for emacs 22. It is ok with me. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 14:34 ` Richard Stallman @ 2006-08-27 20:37 ` Ken Manheimer 2006-08-27 21:45 ` Kim F. Storm 2006-08-27 20:42 ` Juri Linkov 2006-08-27 22:23 ` Kim F. Storm 2 siblings, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-27 20:37 UTC (permalink / raw) Cc: emacs-devel, Kim F. Storm On 8/27/06, Richard Stallman <rms@gnu.org> wrote: > > I think this means that if the image blocks out the background color, > > then the cursor won't appear. Is that correct? I think that is a problem. > > Maybe -- but it's not a new problem. It's the same as it was in 21.x, and > I don't recall any reports of that behaviour being a problem. > > How could it possibly not be a problem? Is it that nobody uses > non-transparent images? Nobody cares about seeing the cursor in buffers > that use non-transparent images? i just experimented, filling in the transparent part of one of my icons with a solid color. the cursor still shows in that region, instead of that color. naturally figuring i made a mistake (as those of you reading this probably do), i looked at the image with something else, and the solid color showed where i put it. i started twiddling with the image and, doing an (clear-image-cache) after each change, discovered that if i made the top-left and bottom-right corner pixels transparent, the solid color showed as it should. putting the solid color in one or the other of those corners, however, causes emacs to treat it as transparent, at least as far as showing the cursor in it. (a bit more experimenting shows that the combinations of corners to qualify a solid corner for treatment as transparent is a bit more elaborate. i'd like to see the algorithm, but satisfying that curiousity is not sufficient reason to get acquainted with the display system. this behavior certainly doesn't satisfy the principle of least surprise, and deserves some documentation, if it doesn't already have it.) the upshot is that the small glyphs will benefit from kim's change, even if they lack transparency, with the cursor color showing instead of the color that occupies some combination of the corners - or maybe some other criteria, who knows. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 20:37 ` Ken Manheimer @ 2006-08-27 21:45 ` Kim F. Storm 2006-08-28 22:10 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-27 21:45 UTC (permalink / raw) Cc: rms, emacs-devel "Ken Manheimer" <ken.manheimer@gmail.com> writes: > the upshot is that the small glyphs will benefit from kim's change, > even if they lack transparency, with the cursor color showing instead > of the color that occupies some combination of the corners - or maybe > some other criteria, who knows. Emacs looks at the corners of the image to _guess_ the image's background/tranparent color if the image format doesn't explicit contain this information. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 21:45 ` Kim F. Storm @ 2006-08-28 22:10 ` Richard Stallman 2006-08-28 22:27 ` Ken Manheimer 2006-08-28 22:33 ` Kim F. Storm 0 siblings, 2 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-28 22:10 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel Emacs looks at the corners of the image to _guess_ the image's background/tranparent color if the image format doesn't explicit contain this information. Does this mean that every image should have the cursor showing through in some places? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-28 22:10 ` Richard Stallman @ 2006-08-28 22:27 ` Ken Manheimer 2006-08-29 17:18 ` Richard Stallman 2006-08-28 22:33 ` Kim F. Storm 1 sibling, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-28 22:27 UTC (permalink / raw) Cc: emacs-devel, Kim F. Storm On 8/28/06, Richard Stallman <rms@gnu.org> wrote: > Emacs looks at the corners of the image to _guess_ the image's > background/tranparent color if the image format doesn't explicit > contain this information. > > Does this mean that every image should have the cursor showing through > in some places? yes. my experiments and kim's analysis confirm that. juri unravelled another part of the problem, which kim incorporated in his fix, and i think that all the expressed concerns have been satisfied. the world is a better place.-) thanks, kim! -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-28 22:27 ` Ken Manheimer @ 2006-08-29 17:18 ` Richard Stallman 0 siblings, 0 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-29 17:18 UTC (permalink / raw) Cc: emacs-devel, storm > Does this mean that every image should have the cursor showing through > in some places? yes. my experiments and kim's analysis confirm that. juri unravelled another part of the problem, which kim incorporated in his fix, and i think that all the expressed concerns have been satisfied. the world is a better place.-) thanks, kim! Thanks to everyone who helped fix this. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-28 22:10 ` Richard Stallman 2006-08-28 22:27 ` Ken Manheimer @ 2006-08-28 22:33 ` Kim F. Storm 1 sibling, 0 replies; 83+ messages in thread From: Kim F. Storm @ 2006-08-28 22:33 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel Richard Stallman <rms@gnu.org> writes: > Emacs looks at the corners of the image to _guess_ the image's > background/tranparent color if the image format doesn't explicit > contain this information. > > Does this mean that every image should have the cursor showing through > in some places? For all practical purposes, yes. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 14:34 ` Richard Stallman 2006-08-27 20:37 ` Ken Manheimer @ 2006-08-27 20:42 ` Juri Linkov 2006-08-27 22:24 ` Kim F. Storm 2006-08-28 22:09 ` Richard Stallman 2006-08-27 22:23 ` Kim F. Storm 2 siblings, 2 replies; 83+ messages in thread From: Juri Linkov @ 2006-08-27 20:42 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel, storm > > I think this means that if the image blocks out the background color, > > then the cursor won't appear. Is that correct? I think that is a problem. > > Maybe -- but it's not a new problem. It's the same as it was in 21.x, and > I don't recall any reports of that behaviour being a problem. > > How could it possibly not be a problem? Is it that nobody uses > non-transparent images? Nobody cares about seeing the cursor in buffers > that use non-transparent images? I guess this is not a problem because usually a border is visible around non-transparent images with the cursor. What a real problem is that displaying different types of cursors on small transparent images is illogical now. This is a serious UI problem. Currently, the box cursor is displayed as a hollow cursor on images, but the bar cursor is displayed as a filled box cursor. But this should be vice versa: the box cursor should be displayed as a box cursor that fills transparent areas and has the 1-pixel border, but the bar cursor should be displayed as a hollow cursor. -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 20:42 ` Juri Linkov @ 2006-08-27 22:24 ` Kim F. Storm 2006-08-28 21:27 ` Juri Linkov 2006-08-28 22:09 ` Richard Stallman 1 sibling, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-27 22:24 UTC (permalink / raw) Cc: ken.manheimer, rms, emacs-devel Juri Linkov <juri@jurta.org> writes: > What a real problem is that displaying different types of cursors on small > transparent images is illogical now. This is a serious UI problem. > Currently, the box cursor is displayed as a hollow cursor on images, but > the bar cursor is displayed as a filled box cursor. But this should be > vice versa: the box cursor should be displayed as a box cursor that fills > transparent areas and has the 1-pixel border, but the bar cursor should be > displayed as a hollow cursor. I didn't think about it that way, but you are right. So I have installed a change to fix this. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 22:24 ` Kim F. Storm @ 2006-08-28 21:27 ` Juri Linkov 0 siblings, 0 replies; 83+ messages in thread From: Juri Linkov @ 2006-08-28 21:27 UTC (permalink / raw) Cc: ken.manheimer, rms, emacs-devel > I didn't think about it that way, but you are right. > So I have installed a change to fix this. Thank you. Your change makes more sense. -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 20:42 ` Juri Linkov 2006-08-27 22:24 ` Kim F. Storm @ 2006-08-28 22:09 ` Richard Stallman 2006-08-28 22:44 ` Juri Linkov 1 sibling, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-08-28 22:09 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel, storm > How could it possibly not be a problem? Is it that nobody uses > non-transparent images? Nobody cares about seeing the cursor in buffers > that use non-transparent images? I guess this is not a problem because usually a border is visible around non-transparent images with the cursor. How does the border change the outcome? Does the cursor appear in the border? Why is there usually a border? Is it because Lisp programs that display a non-transparent image usually request a border? Is there something about these images that causes Emacs to add a border? In what circumstances would there not be a border? But this should be vice versa: the box cursor should be displayed as a box cursor that fills transparent areas and has the 1-pixel border, I do not understand. What does it mean to say a cursor "has the 1-pixel border"? Which border is that, and why does the cursor have it? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-28 22:09 ` Richard Stallman @ 2006-08-28 22:44 ` Juri Linkov 2006-08-28 23:02 ` Kim F. Storm 2006-08-29 17:18 ` Richard Stallman 0 siblings, 2 replies; 83+ messages in thread From: Juri Linkov @ 2006-08-28 22:44 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel, storm > I guess this is not a problem because usually a border is visible around > non-transparent images with the cursor. > > How does the border change the outcome? It is possible to visually distinguish images with the border from images without it. > Does the cursor appear in the border? The hollow cursor is displayed on the image as the 1-pixel border around it. > Why is there usually a border? Is it because Lisp programs that > display a non-transparent image usually request a border? Is there > something about these images that causes Emacs to add a border? When Lisp programs request a border, then the margin explicitly specified by the `:margin' keyword affects how the cursor in displayed on images. After Kim's changes, the box cursor fills the margin with the cursor's color, and the bar cursor doesn't fill the margin and uses the hollow cursor with the 1-pixel border. I think this is good behavior. > In what circumstances would there not be a border? The only problem I see now with Kim's changes is that the box cursor on non-transparent images with no margin is not visible at all. E.g. try to put the box cursor on this image: (insert-image (create-image (make-string 8 0) 'xbm t :width 8 :height 8 :background "grey75" :foreground "black" :relief -2 :margin 0 :ascent 'center)) The box cursor is not visible. Maybe it should be displayed as the hollow cursor on non-transparent images? -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-28 22:44 ` Juri Linkov @ 2006-08-28 23:02 ` Kim F. Storm 2006-08-29 21:31 ` Ken Manheimer 2006-08-29 17:18 ` Richard Stallman 1 sibling, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-28 23:02 UTC (permalink / raw) Cc: ken.manheimer, rms, emacs-devel Juri Linkov <juri@jurta.org> writes: > E.g. try to put the box cursor on this image: > > (insert-image (create-image (make-string 8 0) > 'xbm t :width 8 :height 8 > :background "grey75" > :foreground "black" > :relief -2 > :margin 0 > :ascent 'center)) > > The box cursor is not visible. But there is still a visible difference when the cursor is on the image. As I said, I believe that the current behaviour is ok for all practical purposes... -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-28 23:02 ` Kim F. Storm @ 2006-08-29 21:31 ` Ken Manheimer 2006-08-29 21:36 ` David Kastrup 0 siblings, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-29 21:31 UTC (permalink / raw) Cc: Juri Linkov, rms, emacs-devel On 8/28/06, Kim F. Storm <storm@cua.dk> wrote: > Juri Linkov <juri@jurta.org> writes: > > > E.g. try to put the box cursor on this image: > > > > (insert-image (create-image (make-string 8 0) > > 'xbm t :width 8 :height 8 > > :background "grey75" > > :foreground "black" > > :relief -2 > > :margin 0 > > :ascent 'center)) > > > > The box cursor is not visible. > > But there is still a visible difference when the cursor is on the image. to which juri responded: < I see no visible difference. Kim? i also see no visible difference when i do or don't put the cursor on the image - certainly no sign of the cursor, when it's there. (was the corners heuristic defeated by this particular image?) -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-29 21:31 ` Ken Manheimer @ 2006-08-29 21:36 ` David Kastrup 2006-08-29 22:12 ` Ken Manheimer 0 siblings, 1 reply; 83+ messages in thread From: David Kastrup @ 2006-08-29 21:36 UTC (permalink / raw) Cc: Juri Linkov, emacs-devel, rms, Kim F. Storm "Ken Manheimer" <ken.manheimer@gmail.com> writes: > On 8/28/06, Kim F. Storm <storm@cua.dk> wrote: >> Juri Linkov <juri@jurta.org> writes: >> >> > E.g. try to put the box cursor on this image: >> > >> > (insert-image (create-image (make-string 8 0) >> > 'xbm t :width 8 :height 8 >> > :background "grey75" >> > :foreground "black" >> > :relief -2 >> > :margin 0 >> > :ascent 'center)) >> > >> > The box cursor is not visible. >> >> But there is still a visible difference when the cursor is on the image. > > to which juri responded: > > < I see no visible difference. Kim? > > i also see no visible difference when i do or don't put the cursor on > the image - certainly no sign of the cursor, when it's there. (was > the corners heuristic defeated by this particular image?) I don't think it is applied unless one uses the :heuristik-mask property or its equivalent. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-29 21:36 ` David Kastrup @ 2006-08-29 22:12 ` Ken Manheimer 2006-08-30 17:58 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-29 22:12 UTC (permalink / raw) Cc: Juri Linkov, emacs-devel, rms, Kim F. Storm On 8/29/06, David Kastrup <dak@gnu.org> wrote: > "Ken Manheimer" <ken.manheimer@gmail.com> writes: > > > On 8/28/06, Kim F. Storm <storm@cua.dk> wrote: > >> Juri Linkov <juri@jurta.org> writes: > >> > >> > E.g. try to put the box cursor on this image: > >> > > >> > (insert-image (create-image (make-string 8 0) > >> > 'xbm t :width 8 :height 8 > >> > :background "grey75" > >> > :foreground "black" > >> > :relief -2 > >> > :margin 0 > >> > :ascent 'center)) > >> > The box cursor is not visible. > >> > >> But there is still a visible difference when the cursor is on the image. > > > > to which juri responded: > > > > < I see no visible difference. Kim? > > > > i also see no visible difference when i do or don't put the cursor on > > the image - certainly no sign of the cursor, when it's there. (was > > the corners heuristic defeated by this particular image?) > > I don't think it is applied unless one uses the :heuristik-mask > property or its equivalent. looks like that's the interface i was missing, for controlling how the cursor is displayed when on an image. the info for it even mentions that the default heuristic is to assume the background color is the one that occurs most frequently in the images four corners. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-29 22:12 ` Ken Manheimer @ 2006-08-30 17:58 ` Richard Stallman 2006-08-30 18:20 ` Ken Manheimer 0 siblings, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-08-30 17:58 UTC (permalink / raw) Cc: juri, emacs-devel, storm > > i also see no visible difference when i do or don't put the cursor on > > the image - certainly no sign of the cursor, when it's there. (was > > the corners heuristic defeated by this particular image?) > > I don't think it is applied unless one uses the :heuristik-mask > property or its equivalent. looks like that's the interface i was missing, for controlling how the cursor is displayed when on an image. the info for it even mentions that the default heuristic is to assume the background color is the one that occurs most frequently in the images four corners. If I understand these paragraphs right, the first one seems to say that the cursor does not appear, and the second one says the cursor will not appear unless the programmer has used the :heuristic-mask property. Did I understand them right? If that is true, we have a bug, right? But the third paragraph seems to say that the default for :heuristic-mask is such as to make sure the cursor appears. Did I understand that right? If that is true, then maybe we don't have a bug. What's the real situation here? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-30 17:58 ` Richard Stallman @ 2006-08-30 18:20 ` Ken Manheimer 2006-08-31 18:16 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-30 18:20 UTC (permalink / raw) Cc: juri, emacs-devel, storm On 8/30/06, Richard Stallman <rms@gnu.org> wrote: > > > i also see no visible difference when i do or don't put the cursor on > > > the image - certainly no sign of the cursor, when it's there. (was > > > the corners heuristic defeated by this particular image?) > > > > I don't think it is applied unless one uses the :heuristik-mask > > property or its equivalent. > > looks like that's the interface i was missing, for controlling how the > cursor is displayed when on an image. the info for it even mentions > that the default heuristic is to assume the background color is the > one that occurs most frequently in the images four corners. > > If I understand these paragraphs right, the first one > seems to say that the cursor does not appear, and the second > one says the cursor will not appear unless the programmer has used > the :heuristic-mask property. Did I understand them right? > > If that is true, we have a bug, right? > > But the third paragraph seems to say that the default for > :heuristic-mask is such as to make sure the cursor appears. > Did I understand that right? > > If that is true, then maybe we don't have a bug. > > What's the real situation here? when i tried it, the cursor wouldn't show unless i included a ":mask 'heuristic" property. by default, i was referring to the type of heuristic used when you specify 'heuristic without a specific type. if i understand correctly from kim and juri's discussion, the only reason kim saw the cursor in his solid image without specifying a mask was because he use an image smaller than his default character size, so there was some empty border around the image. i believe kim suggested something like showing a margin with the cursor color around such images when there is no such border, which i expect is a good for that remaining case. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-30 18:20 ` Ken Manheimer @ 2006-08-31 18:16 ` Richard Stallman 2006-09-01 15:46 ` Ken Manheimer 0 siblings, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-08-31 18:16 UTC (permalink / raw) Cc: juri, emacs-devel, storm when i tried it, the cursor wouldn't show unless i included a ":mask 'heuristic" property. by default, i was referring to the type of heuristic used when you specify 'heuristic without a specific type. I still am not sure I understand you. Are you saying that when you specify `heuristic' for :mask, then the default is to choose one of the four corners? What happens when you do not specify any :mask attribute? Is that the case where the cursor fails to show? If so, then I understand; but until you confirm, I am not sure I understand. If I understand right, then this is a bug, as I previously said. i believe kim suggested something like showing a margin with the cursor color around such images when there is no such border, which i expect is a good for that remaining case. That would be bad, since it would change the geometry. What I think he proposed is to show the cursor over the outer parts of the image. That seems good for this case. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-31 18:16 ` Richard Stallman @ 2006-09-01 15:46 ` Ken Manheimer 0 siblings, 0 replies; 83+ messages in thread From: Ken Manheimer @ 2006-09-01 15:46 UTC (permalink / raw) Cc: juri, emacs-devel, storm On 8/31/06, Richard Stallman <rms@gnu.org> wrote: > when i tried it, the cursor wouldn't show unless i included a ":mask > 'heuristic" property. by default, i was referring to the type of > heuristic used when you specify 'heuristic without a specific type. > > I still am not sure I understand you. Are you saying that when you > specify `heuristic' for :mask, then the default is to choose one of > the four corners? something like that. (it does something complicated with combinations of corners to choose the color to use as background.) > What happens when you do not specify any :mask attribute? > Is that the case where the cursor fails to show? yes. > If so, then I understand; but until you confirm, I am not sure I > understand. > > If I understand right, then this is a bug, as I previously said. i think i agree. the only question i have concerns the resonsibility and disrcetion of the application developer. re responsiblity - if application developers are given some recourse to deliberately enable cursor visibility on their images, is it the right thing to have enabling it be the default? i'm inclined to think so, but am not certain. (my reason for raising the issue in the first place was because i had not found any such recourse, and needed it.) the discretion issue concerns whether it should be possible for the developer to disable visibility of the cursor in images of their choice. i feel pretty clear that should be possible, and probably should assume that was going to be provided, but want to make sure that's factored into any solution. > i believe kim suggested something like showing a margin with the > cursor color around such images when there is no such border, which i > expect is a good for that remaining case. > > That would be bad, since it would change the geometry. > What I think he proposed is to show the cursor over the outer parts > of the image. That seems good for this case. i agree. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-28 22:44 ` Juri Linkov 2006-08-28 23:02 ` Kim F. Storm @ 2006-08-29 17:18 ` Richard Stallman 2006-08-29 20:27 ` Juri Linkov 1 sibling, 1 reply; 83+ messages in thread From: Richard Stallman @ 2006-08-29 17:18 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel, storm When Lisp programs request a border, then the margin explicitly specified by the `:margin' keyword affects how the cursor in displayed on images. After Kim's changes, the box cursor fills the margin with the cursor's color, and the bar cursor doesn't fill the margin and uses the hollow cursor with the 1-pixel border. I think this is good behavior. It sounds plausible; if you find it easy to see the cursor this way then I expect it is good. The only problem I see now with Kim's changes is that the box cursor on non-transparent images with no margin is not visible at all. If that is so, how about changing the cursor to a different type when that case occurs? It should be easy and will solve this problem. Kim wrote: But there is still a visible difference when the cursor is on the image. What is that visible difference? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-29 17:18 ` Richard Stallman @ 2006-08-29 20:27 ` Juri Linkov 2006-08-30 8:09 ` Kim F. Storm 0 siblings, 1 reply; 83+ messages in thread From: Juri Linkov @ 2006-08-29 20:27 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel, storm > The only problem I see now with Kim's changes is that the box cursor > on non-transparent images with no margin is not visible at all. > > If that is so, how about changing the cursor to a different type when > that case occurs? It should be easy and will solve this problem. Changing the cursor to the hollow cursor on non-transparent images will solve this problem. > Kim wrote: > > But there is still a visible difference when the cursor is on the image. > > What is that visible difference? I see no visible difference. Kim? -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-29 20:27 ` Juri Linkov @ 2006-08-30 8:09 ` Kim F. Storm 2006-08-31 7:33 ` Richard Stallman 0 siblings, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-30 8:09 UTC (permalink / raw) Cc: ken.manheimer, rms, emacs-devel Juri Linkov <juri@jurta.org> writes: >> The only problem I see now with Kim's changes is that the box cursor >> on non-transparent images with no margin is not visible at all. >> >> If that is so, how about changing the cursor to a different type when >> that case occurs? It should be easy and will solve this problem. > > Changing the cursor to the hollow cursor on non-transparent images > will solve this problem. We already have this code to deal with cursor on non-transparent images: /* ... If the image doesn't have a mask, make a block cursor visible by drawing a rectangle around the image. I believe it's looking better if we do nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) { int r = s->img->relief; if (r < 0) r = -r; XDrawRectangle (s->display, s->window, s->gc, x - r, y - r, s->slice.width + r*2 - 1, s->slice.height + r*2 - 1); } The problem is that if there is no border (i.e. relief), it draws nothing. One fix would be to draw into the image. > >> Kim wrote: >> >> But there is still a visible difference when the cursor is on the image. >> >> What is that visible difference? > > I see no visible difference. Kim? I guess it is because I use a font size which is bigger than the image -- then I see the cursor in the background not occupied by the image. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-30 8:09 ` Kim F. Storm @ 2006-08-31 7:33 ` Richard Stallman 0 siblings, 0 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-31 7:33 UTC (permalink / raw) Cc: juri, ken.manheimer, emacs-devel The problem is that if there is no border (i.e. relief), it draws nothing. One fix would be to draw into the image. I think that is better than nothing; if we don't get a better idea, please implement that one. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 14:34 ` Richard Stallman 2006-08-27 20:37 ` Ken Manheimer 2006-08-27 20:42 ` Juri Linkov @ 2006-08-27 22:23 ` Kim F. Storm 2006-08-28 22:10 ` Richard Stallman 2 siblings, 1 reply; 83+ messages in thread From: Kim F. Storm @ 2006-08-27 22:23 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel Richard Stallman <rms@gnu.org> writes: > > I think this means that if the image blocks out the background color, > > then the cursor won't appear. Is that correct? I think that is a problem. > > Maybe -- but it's not a new problem. It's the same as it was in 21.x, and > I don't recall any reports of that behaviour being a problem. > > How could it possibly not be a problem? Is it that nobody uses > non-transparent images? Nobody cares about seeing the cursor in buffers > that use non-transparent images? Cursor display does not require tranparent images -- it replaces the image background (guesses color if not known) with the cursor color. > My change addresses this problem by making a distinction between > small and "larger" images. IMO, this is the right fix for emacs 22. > > It is ok with me. Installed. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-27 22:23 ` Kim F. Storm @ 2006-08-28 22:10 ` Richard Stallman 0 siblings, 0 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-28 22:10 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel > How could it possibly not be a problem? Is it that nobody uses > non-transparent images? Nobody cares about seeing the cursor in buffers > that use non-transparent images? Cursor display does not require tranparent images -- it replaces the image background (guesses color if not known) with the cursor color. Each thing that people say about this seems to conflict with what has been said before. I am completely lost now. ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-25 20:23 ` Richard Stallman 2006-08-25 22:35 ` Kim F. Storm @ 2006-08-25 23:01 ` Ken Manheimer 2006-08-26 12:22 ` Richard Stallman 1 sibling, 1 reply; 83+ messages in thread From: Ken Manheimer @ 2006-08-25 23:01 UTC (permalink / raw) Cc: emacs-devel, Kim F. Storm On 8/25/06, Richard Stallman <rms@gnu.org> wrote: > > as i think i suggested in a previous message, the solution i would > > prefer would be to have some way to qualify icons so that they get a > > solid cursor in their transparent areas, and the default would be to > > have it inactive. eg, a qualifier for xpm, png, gif, and other > > transparent-capable images, like :solid-cursor: > > > > `:solid-cursor-shows BOOLEAN' > > When true, the cursor will appear solid through the transparent > > regions of the image > > This does not make sense without more context. For instance, what > behavior would a value of nil specify? And what happens in > non-transparent regions of the image? i was using it only to elaborate certain details of my suggestion, not as the real documentation. as such, it was meant specifically for those following the context. non-transparent regions seems like a complicated issue. i expect that in many cases it's neither desirable nor practial to mess with them. some systems xor the colors under mouse icons, for instance, but there's no reason to expect the chosen colors would be particularly harmonious, or the icon to even be recognizable with such treatment. however, there's a bind for icons with no transparency - hopefully the highlighted bounding box cursor is sufficient there. > Meanwhile, something about this wording bothers me: the idea that the > cursor appears "through" part of the image. Is this based on the > assumption that the image is "on top of" the cursor? i could as easily have said that the cursor shows "in" the transparent parts of the image, leaving the opaque parts undisturbed. > If so, I think that assumption is backwards and must be changed. The > cursor is "on top of" the image; if we want to display a cursor on the > image, the image should not be allowed to block it out! i think we're on pretty safe ground doing having the opaque parts o the image block out the cursor. consider text characters - cursors being on the character could simply block them from view, reinforcing the paradigm of being on top of the character. that's a terrible loss of information - generally, the character is allowed to show through. the character might be shown in the inverse tone of the cursor, or some chosen color, or something. (emacs goes with a chosen color, i guess.) the situation with glyphs is not so simple, because they can have many, arbitrary colors. in my particular case, having the cursor show in the transparent region has the outline-structure bullet icons and guide lines acting very like elaborate text characters, except that their intricately colored opaque parts are not changed. it works well. -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-25 23:01 ` Ken Manheimer @ 2006-08-26 12:22 ` Richard Stallman 0 siblings, 0 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-26 12:22 UTC (permalink / raw) Cc: emacs-devel, storm non-transparent regions seems like a complicated issue. i expect that in many cases it's neither desirable nor practial to mess with them. It is not clear to me what sort of actions the term "mess with them" would cover. What I am sure of is that the cursor must be visible when it appears over a non-transparent image. Currently, when the cursor appears over a non-transparent image, is it visible? If so, how does it appear? ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-22 3:09 ` Richard Stallman 2006-08-22 8:03 ` David Kastrup @ 2006-08-22 13:19 ` Ken Manheimer 1 sibling, 0 replies; 83+ messages in thread From: Ken Manheimer @ 2006-08-22 13:19 UTC (permalink / raw) Cc: emacs-devel, storm On 8/21/06, Richard Stallman <rms@gnu.org> wrote: > with this bug, however, it's hard to > tell whether or not the cursor is in the window or another. > > I see why this is a problem. > > So I suppose that anything which makes the cursor visible > would solve the problem. Right? well, visible specifically when the buffer containing the cursor is active. (i did consider something like actually changing the icons when the cursor was on them, but that seemed way too invasive and brittle.) -- ken ken.manheimer@gmail.com http://myriadicity.net ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-19 23:09 ` Kim F. Storm 2006-08-20 1:49 ` Ken Manheimer @ 2006-08-20 9:03 ` Jason Rumney 2006-08-20 9:09 ` David Kastrup 2006-08-20 12:05 ` Richard Stallman 2 siblings, 1 reply; 83+ messages in thread From: Jason Rumney @ 2006-08-20 9:03 UTC (permalink / raw) Cc: Ken Manheimer, Emacs-Devel Kim F. Storm wrote: > In emacs 22, we don't show a block cursor on images; instead we just > put a border on the image. The rationale is that the old behaviour was > really ugly in most cases We used to do something different - like XOR the image with the cursor color or something. That was certainly ugly, but allowing the cursor color to show through transparent areas does not seem too ugly to me (though may involve lots of processing every time the cursor blinks, unless we cache two images for every image that is displayed). ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-20 9:03 ` Jason Rumney @ 2006-08-20 9:09 ` David Kastrup 0 siblings, 0 replies; 83+ messages in thread From: David Kastrup @ 2006-08-20 9:09 UTC (permalink / raw) Cc: Ken Manheimer, Emacs-Devel, Kim F. Storm Jason Rumney <jasonr@gnu.org> writes: > Kim F. Storm wrote: >> In emacs 22, we don't show a block cursor on images; instead we just >> put a border on the image. The rationale is that the old behaviour was >> really ugly in most cases > We used to do something different - like XOR the image with the cursor > color or something. That was certainly ugly, but allowing the cursor > color to show through transparent areas does not seem too ugly to me Apparently you never had the whole window flashing at you, preferably with green intermissions because of mouse-over. Images can get arbitrarily large. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 83+ messages in thread
* Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 2006-08-19 23:09 ` Kim F. Storm 2006-08-20 1:49 ` Ken Manheimer 2006-08-20 9:03 ` Jason Rumney @ 2006-08-20 12:05 ` Richard Stallman 2 siblings, 0 replies; 83+ messages in thread From: Richard Stallman @ 2006-08-20 12:05 UTC (permalink / raw) Cc: ken.manheimer, emacs-devel In emacs 22, we don't show a block cursor on images; instead we just put a border on the image. The rationale is that the old behaviour was really ugly in most cases ... particularly when using a blinking cursor. Is this something you really need? Unless this is so grave as to count as a bug, let's leave it alone, so we can proceed to pretest. ^ permalink raw reply [flat|nested] 83+ messages in thread
end of thread, other threads:[~2006-09-11 14:40 UTC | newest] Thread overview: 83+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-09-02 18:08 (no subject) Richard Stallman 2006-09-03 21:30 ` cursor doesn't show through transparent images in emacs 22, unlike emacs 21 Kim F. Storm 2006-09-04 17:17 ` Richard Stallman 2006-09-04 22:42 ` Kim F. Storm 2006-09-06 8:49 ` Richard Stallman 2006-09-06 9:15 ` David Kastrup 2006-09-06 10:00 ` Kim F. Storm 2006-09-06 16:12 ` Ken Manheimer 2006-09-07 6:54 ` Richard Stallman 2006-09-07 7:47 ` David Kastrup 2006-09-09 20:45 ` Richard Stallman 2006-09-09 22:55 ` David Kastrup 2006-09-10 0:21 ` Kim F. Storm 2006-09-10 13:04 ` Richard Stallman 2006-09-10 20:25 ` Kim F. Storm 2006-09-10 23:00 ` Robert J. Chassell 2006-09-11 5:32 ` tomas 2006-09-11 8:08 ` Kim F. Storm 2006-09-11 8:16 ` David Kastrup 2006-09-11 11:56 ` Robert J. Chassell 2006-09-11 12:51 ` Kim F. Storm 2006-09-11 14:40 ` Robert J. Chassell 2006-09-11 14:11 ` Richard Stallman -- strict thread matches above, loose matches on Subject: below -- 2006-08-18 23:22 Ken Manheimer 2006-08-18 23:33 ` Drew Adams 2006-08-19 17:49 ` Ken Manheimer 2006-08-19 23:09 ` Kim F. Storm 2006-08-20 1:49 ` Ken Manheimer 2006-08-20 5:00 ` Ken Manheimer 2006-08-20 6:42 ` David Kastrup 2006-08-20 12:05 ` Richard Stallman 2006-08-20 15:10 ` Ken Manheimer 2006-08-20 17:27 ` David Kastrup 2006-08-22 3:09 ` Richard Stallman 2006-08-22 8:03 ` David Kastrup 2006-08-22 13:45 ` Ken Manheimer 2006-08-24 11:31 ` Kim F. Storm 2006-08-24 11:49 ` David Kastrup 2006-08-25 13:48 ` Kim F. Storm 2006-08-24 14:20 ` Ken Manheimer 2006-08-24 14:26 ` Kim F. Storm 2006-08-24 15:53 ` Ken Manheimer 2006-08-24 19:56 ` Kim F. Storm 2006-08-24 21:41 ` Ken Manheimer 2006-08-25 14:28 ` Kim F. Storm 2006-08-25 15:24 ` Ken Manheimer 2006-08-26 10:08 ` Richard Stallman 2006-08-25 20:23 ` Richard Stallman 2006-08-25 22:35 ` Kim F. Storm 2006-08-26 12:22 ` Richard Stallman 2006-08-26 21:37 ` Kim F. Storm 2006-08-27 14:34 ` Richard Stallman 2006-08-27 20:37 ` Ken Manheimer 2006-08-27 21:45 ` Kim F. Storm 2006-08-28 22:10 ` Richard Stallman 2006-08-28 22:27 ` Ken Manheimer 2006-08-29 17:18 ` Richard Stallman 2006-08-28 22:33 ` Kim F. Storm 2006-08-27 20:42 ` Juri Linkov 2006-08-27 22:24 ` Kim F. Storm 2006-08-28 21:27 ` Juri Linkov 2006-08-28 22:09 ` Richard Stallman 2006-08-28 22:44 ` Juri Linkov 2006-08-28 23:02 ` Kim F. Storm 2006-08-29 21:31 ` Ken Manheimer 2006-08-29 21:36 ` David Kastrup 2006-08-29 22:12 ` Ken Manheimer 2006-08-30 17:58 ` Richard Stallman 2006-08-30 18:20 ` Ken Manheimer 2006-08-31 18:16 ` Richard Stallman 2006-09-01 15:46 ` Ken Manheimer 2006-08-29 17:18 ` Richard Stallman 2006-08-29 20:27 ` Juri Linkov 2006-08-30 8:09 ` Kim F. Storm 2006-08-31 7:33 ` Richard Stallman 2006-08-27 22:23 ` Kim F. Storm 2006-08-28 22:10 ` Richard Stallman 2006-08-25 23:01 ` Ken Manheimer 2006-08-26 12:22 ` Richard Stallman 2006-08-22 13:19 ` Ken Manheimer 2006-08-20 9:03 ` Jason Rumney 2006-08-20 9:09 ` David Kastrup 2006-08-20 12:05 ` Richard Stallman
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).