From: David Kastrup <dak@gnu.org>
Cc: juri@jurta.org, ken.manheimer@gmail.com, emacs-devel@gnu.org,
storm@cua.dk
Subject: Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21
Date: Sun, 10 Sep 2006 00:55:36 +0200 [thread overview]
Message-ID: <85lkosd507.fsf@lola.goethe.zz> (raw)
In-Reply-To: <E1GM9hq-0003H6-33@fencepost.gnu.org> (Richard Stallman's message of "Sat\, 09 Sep 2006 16\:45\:38 -0400")
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
next prev parent reply other threads:[~2006-09-09 22:55 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85lkosd507.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.org \
--cc=ken.manheimer@gmail.com \
--cc=storm@cua.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).