unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: invisible text and point
Date: Sun, 25 May 2003 23:37:37 -0500 (CDT)	[thread overview]
Message-ID: <200305260437.h4Q4bbh14766@eel.dms.auburn.edu> (raw)

There has been a relatively recent change in the treatment of point
near invisible text.  That change can be very confusing to the user
and apparently also to the Emacs code.  I noticed several bugs which
seem to be related to the change in question.  I have the impression
that they all could be undone by reverting the change.

Do the following both in Emacs-21.3 and Emacs-21.3.50.

C-h i m cvs RETURN

Put point on the * of

* CVS commands::                CVS commands share some things

C-u C-x = shows that in Emacs-21.3 we are where we think we are, on
the *, but in 21.3.50, we are on an invisible -.  The consequences
are:

try m

In Emacs-21.3, our default is "CVS commands" (what else), but in
21.3.50, it is Special Files.

C-g.  Now try RETURN.

In Emacs-21.3, we go to the expected place, but in 21.3.50, we get an
error message.

Reverting the change would automatically get rid of these bugs.  It
would also be easy to fix these bugs without reverting the change.
However, I have the impression that if one went on a bug hunt one
could find tons of similar bugs.  For instance, with point in
invisible text, one could easily get extremely strange defaults for
C-h f, C-h v, M-x man and so on...

There are worse things going on which only happen in the presence of
invisible text and only in 21.3.50, which I strongly suspect (even
though I am not 100% sure) to be related to the same change.

Do, say C-u C-x =, which pops up a new window.

Move that window upward with mouse-1.  No problem until we hit that
same spot with the invisible text.  There Emacs goes in an infinite
loop, apparently in the C code.  C-g is no help.

Start a new Emacs.

C-h i g (bash)Redirections RETURN

Just hit the down arrow key.  No problem until we hit some invisible
text after "Redirecting Output".  Infinite loop. no response to C-g.

Try everything over, but first do:

M-: (setq buffer-invisibility-spec nil)

No infinite loops, no problems.
No infinite loops, no problems in 21.3 either, regardless of
buffer-invisibility-spec.

I realize that putting point inside that invisible text has some
advantages in terms of stickiness.  However, in user produced buffers,
a user sophisticated enough to be playing around with invisibility
properties is probably sophisticated enough to handle stickiness in
the way that is best for him/her.  The Emacs produced buffers we are
talking about are all read-only to begin with, but to avoid confusing
users who, for some reason make them writable, we could give
text-property-default-nonsticky a buffer-local value and make the
invisibility property non-sticky in those particular buffers.

All of this is, of course just a suggestion.  It is possible to fix
all above bugs without reverting the change.  In the case of m and
RETURN in info, that would actually be easy, fixing the infinite loops
might be more complex.  However, as already mentioned, I believe that
the above bugs are just a small tip of a much bigger iceberg and that
there must be plenty more bugs related to the change.  The change in
question does not appear in any released version of Emacs, only in
21.3.50, so only people using the CVS would have gotten a shot at
encountering these bugs.  I encountered three in a few hours.  That
probably is because I was using info extensively, which contains
invisible text.
  
Sincerely,

Luc.

             reply	other threads:[~2003-05-26  4:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26  4:37 Luc Teirlinck [this message]
2003-05-26  4:53 ` invisible text and point Luc Teirlinck
2003-05-26  5:03 ` Luc Teirlinck
2003-05-26  5:16   ` Luc Teirlinck
2003-05-26 13:07     ` Luc Teirlinck
2003-05-26 14:51 ` Stefan Monnier
     [not found] ` <200305261721.h4QHLigb001231@rum.cs.yale.edu>
2003-05-26 18:13   ` Luc Teirlinck
2003-05-26 18:26     ` Stefan Monnier
2003-05-27  2:13       ` Luc Teirlinck
2003-05-27  3:07         ` Luc Teirlinck
2003-05-27  7:26         ` David Kastrup
2003-05-27 22:41 ` 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=200305260437.h4Q4bbh14766@eel.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    /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).