From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: invisible text and point Date: Sun, 25 May 2003 23:37:37 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305260437.h4Q4bbh14766@eel.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1053923804 22272 80.91.224.249 (26 May 2003 04:36:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 26 May 2003 04:36:44 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 26 06:36:43 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19K9j1-0005n6-00 for ; Mon, 26 May 2003 06:36:43 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19K9w3-0006vu-00 for ; Mon, 26 May 2003 06:50:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19K9kD-0002SC-Ns for emacs-devel@quimby.gnus.org; Mon, 26 May 2003 00:37:57 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19K9jt-0002My-ME for emacs-devel@gnu.org; Mon, 26 May 2003 00:37:37 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19K9jr-0002I4-UF for emacs-devel@gnu.org; Mon, 26 May 2003 00:37:36 -0400 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19K9jr-0002Fx-KE for emacs-devel@gnu.org; Mon, 26 May 2003 00:37:35 -0400 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) by manatee.dms.auburn.edu (8.12.9/8.12.9) with ESMTP id h4Q4bXoc020929 for ; Sun, 25 May 2003 23:37:34 -0500 (CDT) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.11.6+Sun/8.11.6) id h4Q4bbh14766; Sun, 25 May 2003 23:37:37 -0500 (CDT) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14266 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14266 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.