all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: dan@haxney.org, rms@gnu.org, eli@barzilay.org,
	emacs-devel@gnu.org, nix@esperi.org.uk, monnier@iro.umontreal.ca,
	dmoncayo@gmail.com, stephen@xemacs.org
Subject: Re: Proposal to improve the nomenclature of scrolling directions
Date: Sat, 10 Nov 2012 16:49:58 +0200	[thread overview]
Message-ID: <83ip9dy0kp.fsf@gnu.org> (raw)
In-Reply-To: <509E6071.5030102@gmx.at>

> Date: Sat, 10 Nov 2012 15:10:57 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: dan@haxney.org, rms@gnu.org, eli@barzilay.org, emacs-devel@gnu.org, 
>  nix@esperi.org.uk, monnier@iro.umontreal.ca, dmoncayo@gmail.com, 
>  stephen@xemacs.org
> 
>  >> Not necessarily.  We can always move point lazily, that is, whenever it
>  >> is requested.
>  >
>  > That requires changes to window-scrolling functions, since currently
>  > they do move point, and they do it non-lazily.  See
>  > window_scroll_pixel_based, where it calls SET_PT_BOTH etc.
> 
> I meant to move `point' lazily _after_ we're done with scrolling.

Do you mean moving the real point or its emulation?  If the former, it
is currently done as part of window_scroll_pixel_based, and that part
will need to be changed if you want point to stay put disregarding the
scrolling commands.

> If the emulation is on and the command is not a scrolling command
> recognized by the emulation, move `point' to where it was before
> scrolling.  That's what I do in `scroll-restore-mode' (if wanted).

You do that in scroll-restore-mode because the C code moves point.
But if C code won't move point in these situations, then there will be
no reason to move point back, because it will stay put.

>  > And what does "whenever it is requested" means, anyway, in practical
>  > terms?
> 
> Whenever the current command is not a scroll command.  In
> `scroll-restore-mode' I do that in a pre-command hook.
> 
>  > Those "other editors" that allow point to stay out of the
>  > window will scroll the display back to show point when some command is
>  > invoked that modifies the buffer text.
> 
> Where would we have `forward-char' start moving when emulating such
> "other editors"?

At the original point position, i.e. forward-char will return there
and cause point be displayed after the move.

>  > Given that the modification
>  > commands don't require moving point, and C-v/M-v won't either (as this
>  > is the main justification for the feature we are discussing), what
>  > will?
> 
> The modification commands can require moving point, if desired.

Doesn't make sense, IMO: it defeats the reason for not moving point on
scroll in the first place.

I think the only commands that should move point in this mode are
those which, well, move point.  That is, goto-char, C-f/C-b, mouse-1
click, etc.  And these should cause display to scroll so that point
comes into view.

>  > You are describing the kludgey solution (IIUC), whereas I'm suggesting
>  > a non-kludgey one.
> 
> Every solution here will be kludgey.  Suppose you scroll a non-selected
> window and subsequently insert text into its buffer.  Would you insert
> it at its old `window-point' even if its `point' is somewhere else?

Why at window-point?  At point, of course.  Isn't this how things work
now?

> A basic invariant of Emacs is that at top-level any buffer's `point'
> coincides with `window-point' of the selected window, provided the
> buffer appears there.  Violating this invariant means we have to rethink
> lots of code, including things as fragile as the window configuration
> code.

I don't think anything I said violates this.  What am I missing?



  reply	other threads:[~2012-11-10 14:49 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-04 14:10 Proposal to improve the nomenclature of scrolling directions Dani Moncayo
2012-11-04 14:37 ` Stefan Monnier
2012-11-04 15:00   ` Dani Moncayo
2012-11-04 17:07     ` Juanma Barranquero
2012-11-04 17:30       ` Dani Moncayo
2012-11-04 17:31       ` Eli Zaretskii
2012-11-04 17:35         ` Dani Moncayo
2012-11-04 18:23           ` Eli Zaretskii
2012-11-04 19:10             ` Dani Moncayo
2012-11-04 19:39               ` Eli Zaretskii
2012-11-04 20:01                 ` Dani Moncayo
2012-11-05 11:07                 ` Richard Stallman
2012-11-05 12:25                   ` Dani Moncayo
2012-11-05 14:56                     ` Nix
2012-11-05 15:39                       ` Teemu Likonen
2012-11-07  8:12                       ` Harald Hanche-Olsen
2012-11-13  9:05                         ` Bastien
2012-11-13 17:05                           ` Stefan Monnier
2012-11-05  3:29           ` Stephen J. Turnbull
2012-11-05  7:27             ` Dani Moncayo
2012-11-05 12:44             ` Jambunathan K
2012-11-05  2:44     ` Stefan Monnier
2012-11-05  7:24       ` Dani Moncayo
2012-11-05 23:32         ` Stefan Monnier
2012-11-06 21:29           ` Daniel Hackney
2012-11-05 11:06 ` Richard Stallman
2012-11-05 15:00   ` Nix
2012-11-06  1:25     ` Stephen J. Turnbull
2012-11-06 17:24       ` Adrian Robert
2012-11-06 17:36         ` Eli Zaretskii
2012-11-06 17:50         ` Drew Adams
2012-11-06 19:14           ` John Yates
2012-11-05 18:05 ` Daniel Hackney
2012-11-06  1:53   ` Stephen J. Turnbull
2012-11-07 16:31     ` Nix
2012-11-08  1:49       ` Stefan Monnier
2012-11-08 17:33         ` Nix
2012-11-08 18:14           ` Eli Barzilay
2012-11-08 18:18             ` Nix
2012-11-08 18:39               ` Eli Barzilay
2012-11-08 18:39               ` Stefan Monnier
2012-11-09  9:50                 ` martin rudalics
2012-11-09 14:18                   ` Stefan Monnier
2012-11-08 18:40               ` Eli Zaretskii
2012-11-08 18:48                 ` Juanma Barranquero
2012-11-08 19:29                   ` Eli Zaretskii
2012-11-09  2:52                 ` Richard Stallman
2012-11-09  7:35                   ` Eli Zaretskii
2012-11-09 14:20                     ` Nix
2012-11-09 14:56                       ` Eli Zaretskii
2012-11-09 20:24                         ` Nix
2012-11-10 11:09                         ` martin rudalics
2012-11-10 11:40                           ` Eli Zaretskii
2012-11-10 14:11                             ` martin rudalics
2012-11-10  0:13                     ` Richard Stallman
2012-11-10  7:42                       ` Eli Zaretskii
2012-11-10 11:09                         ` martin rudalics
2012-11-10 11:45                           ` Eli Zaretskii
2012-11-10 11:48                             ` Nix
2012-11-10 14:38                               ` Eli Zaretskii
2012-11-10 14:47                                 ` Nix
2012-11-10 14:10                             ` martin rudalics
2012-11-10 14:49                               ` Eli Zaretskii [this message]
2012-11-10 18:50                                 ` martin rudalics
2012-11-10 19:09                                   ` Eli Zaretskii
2012-11-10 11:10                       ` martin rudalics
2012-11-10 11:46                         ` Eli Zaretskii
2012-11-10 14:12                           ` martin rudalics
2012-11-09  9:51           ` martin rudalics
2012-11-09 14:19             ` Stefan Monnier
2012-11-10 11:05               ` martin rudalics
2012-11-08  7:18       ` Stephen J. Turnbull
2012-11-08 11:12         ` Stephen Leake
2012-11-08 15:43           ` Drew Adams
2012-11-08 17:35             ` Nix
  -- strict thread matches above, loose matches on Subject: below --
2012-11-06 17:55 Dmitry Gutov
2012-11-07  0:53 ` Richard Stallman
2012-11-07 15:17   ` Drew Adams
2012-11-07 16:23     ` Eli Zaretskii
2012-11-07 18:03       ` Drew Adams
2012-11-07 18:34         ` Eli Zaretskii
2012-11-07 21:00           ` Drew Adams
2012-11-07 21:17             ` Eli Zaretskii
2012-11-08 22:18         ` Daniel Hackney
2012-11-07 21:12   ` Mathias Dahl
2012-11-07 21:41     ` Dmitry Gutov
2012-11-08 19:26       ` Bruce Korb
2012-11-13  9:07       ` Bastien
     [not found] <201211080338.qA83c7NY006393@winooski.ccs.neu.edu>
     [not found] ` <20635.16010.769769.433949@winooski.ccs.neu.edu>
2012-11-08 16:48   ` Stefan Monnier
2012-11-09  9:50     ` martin rudalics
2012-11-09 14:17       ` Stefan Monnier
2012-11-09 15:27         ` Eli Barzilay
2012-11-10 11:05         ` martin rudalics
2012-11-10 11:38           ` Eli Zaretskii
2012-11-10 14:09             ` martin rudalics
2012-11-10 14:40               ` Eli Zaretskii
2012-11-10 18:49                 ` martin rudalics

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=83ip9dy0kp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dan@haxney.org \
    --cc=dmoncayo@gmail.com \
    --cc=eli@barzilay.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=nix@esperi.org.uk \
    --cc=rms@gnu.org \
    --cc=rudalics@gmx.at \
    --cc=stephen@xemacs.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.