unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: invisible text and point
Date: Mon, 26 May 2003 13:13:23 -0500 (CDT)	[thread overview]
Message-ID: <200305261813.h4QIDN815240@eel.dms.auburn.edu> (raw)
In-Reply-To: <200305261721.h4QHLigb001231@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu)

I posted a follow-up to my original message from yesterday evening
this morning.  I no longer propose "reverting" to the emacs-21.3
behavior (actually, I only did this because I misinterpreted it
yesterday, as I noticed this morning), but "mimicking it better", by
making sure that (point) returns the position of a visible character.

Since my conjecture that the infinite loops were also related to the
problem was apparently a premature conclusion based on the fact that
the bugs did not occur in 21.3 and happened at similar places as the
other bug, we are left with the m and RETURN bugs in info.  Just
fixing those individual bugs would not really seem to really address
the problem, which is more general.  Namely a huge fraction of Emacs
commands act based on the return value of (point).  Since point is not
where the user believes it is, this is bound to confuse the user.  I
do not know whether it would be feasible to make all interactive
commands act based on the "user-visible" displayed position of point
instead.  That would really eliminate the need for any change.

Stefan Monnier wrote:

   Point is not put inside the invisible text.  It's put at one of the
   two ends.  In this case it happens to be "just before" rather than
   "just after" because the stickiness is the default one so that inserting
   a char at the end would lead to a hidden char whereas inserting a char
   at the beginning would lead to a visible char: the choice is to prefer
   putting point at a position such that inserted text is visible.

   I believe that the `intangible' change mentioned underneath in the NEWS
   file did the same for intangible&invisible text.

Yes, but semantics aside, if (point) returns the position of an
invisible character, we have the kind of problems of which the m and
RETURN behaviors in info are symptomatic.

   Or rather make it "front-sticky" rather than "rear-sticky", such
   that when the user sees point in front of letter "a", `char-after'
   will indeed show letter ?a.  Right now, it's the opposite: if point
   is right after letter "a" `char-before' will indeed return ?a.

That would work for those buffers.  I would guess that there probably
are good reasons to keep invisible rear-sticky in general.  In that
case, we would be left with the problem of making sure that the user
would understand in which buffers invisibility is front-sticky and in
which it is rear-sticky.

Sincerely,

Luc.

  parent reply	other threads:[~2003-05-26 18:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26  4:37 invisible text and point Luc Teirlinck
2003-05-26  4:53 ` 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 [this message]
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=200305261813.h4QIDN815240@eel.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /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).