From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: compute-motion inconsistency
Date: 23 Jul 2004 11:46:37 +0200 [thread overview]
Message-ID: <x5iscft5s2.fsf@lola.goethe.zz> (raw)
In-Reply-To: <m3u0vzp0i9.fsf@kfs-l.imdomain.dk>
storm@cua.dk (Kim F. Storm) writes:
> The interface to compute-motion is inconsistent, and the
> implementation is inconsistent too.
>
> Problem is the "width" arg, quoting from the doc string:
>
> | width is the number of columns available to display text;
> | this affects handling of continuation lines.
> | This is usually the value returned by `window-width', less one (to allow
> | for the continuation glyph).
>
> But on window based display, there is no continuation glyph, so
> typically the value provided for the width arg is one too small.
> I checked the caller of compute-motion (and compute_motion
> at the C level), and the calls are not consistent either.
>
> Some calls subtract 1 unconditionally,
> some subtract 1 on non-window systems,
> and some do not subtract 1 at all.
>
> IIRC, the ones which does this correctly (the second category) I
> have fixed myself while working on redisplay over the past years.
I somewhat doubt that they do this correctly. I think that things
differ again if one customizes the fringes off.
In my opinion, it is a complete mistake not to leave the continuation
glyph mess actually to compute-motion itself as soon as the WINDOW
parameter is actually present.
> For backwards compatibility, I suggest the following change to
> compute-motion:
>
> If "width" equals (1- (window-width)) on a window system,
> automatically use (window-width) instead.
>
> If "width" equals (window-width) on a non-window system,
> automatically subtract 1 (for the continuation glyph).
That's not "compatibility", that is madness. I don't think that this
sort of change, which makes things utterly incomprehensible and
unpredictable for the sake of some backward compatibility idea, is
warranted.
I prefer an incompatible change where just window-width can be used,
always. We had inconsistent behavior and usage before, tough.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2004-07-23 9:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-23 8:54 compute-motion inconsistency Kim F. Storm
2004-07-23 9:46 ` David Kastrup [this message]
2004-07-23 12:56 ` Kim F. Storm
2004-07-23 18:44 ` Stefan Monnier
2004-07-23 19:04 ` David Kastrup
2004-07-24 19:44 ` Richard Stallman
2004-07-25 22:24 ` Kim F. Storm
2004-08-02 15:28 ` Kim F. Storm
2004-08-02 21:17 ` Andreas Schwab
2004-08-02 23:45 ` Kim F. Storm
2004-08-03 9:48 ` Andreas Schwab
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=x5iscft5s2.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.