all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: charles@aurox.ch
Cc: 34723@debbugs.gnu.org
Subject: bug#34723: 27.0.50; customize and improve diff-mode recentering
Date: Tue, 05 Mar 2019 17:46:11 +0200	[thread overview]
Message-ID: <8336o1e33w.fsf@gnu.org> (raw)
In-Reply-To: <m2imwzvgld.fsf@aurox.ch> (charles@aurox.ch)

> Date: Sun, 03 Mar 2019 21:38:22 +0100
> From: charles@aurox.ch (Charles A. Roelli)
> 
> In Bug#32991 we touched on diff-mode conditionally recentering when
> you use diff-hunk-next or diff-hunk-prev.  We found that this behavior
> does not respect scroll-related variables (though Stefan suggested we
> might be able to recenter while taking into account these variables).
> It would be nice to allow disabling the behavior.
> 
> There are also cases where the diff-mode recentering ends up showing
> less of the hunk than would have been displayed without the
> recentering, which must be a bug.  In general, I don't understand why
> recentering is thought to "show more" of a hunk in a buffer, when it
> might show either less or more of a hunk in a buffer.
> 
> For example, if you look at the diff of commit 7523a9e in a
> single-window GUI frame in master (emacs -Q), and type
> 
> M-: (set-frame-height (selected-frame) 15) RET
> M-g c 450 RET
> C-l C-l n
> 
> Emacs recenters and shows less of the hunk that you moved to.  This is
> contrived, but is something you might come across a lot in small
> windows, especially with longer hunks.
> 
> As a solution we could make C-M-l (reposition-window) work in
> diff-mode and call that instead from diff-hunk-next and
> diff-hunk-prev, with some customizable variable to enable or disable
> the behavior.  Or fix the recentering code to stop recentering in
> cases like the above.

I've read this description and that in bug#32991, several times, and I
still cannot figure out whether you are saying that there's a problem
in recentering per se (and in the related redisplay code), or you are
saying that diff-mode does something in its application code that
indirectly and inadvertently causes unwarranted recentering.  Could
you please clarify which is the case here?  Depending on that, the
solution should be either in diff-mode or in the display engine
(however, I have hard time believing that we have use cases where the
display engine ignores scroll-related variables).

Thanks.





  parent reply	other threads:[~2019-03-05 15:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03 20:38 bug#34723: 27.0.50; customize and improve diff-mode recentering Charles A. Roelli
2019-03-03 21:33 ` Juri Linkov
2019-03-04 19:06   ` Charles A. Roelli
2019-03-04 21:12     ` Juri Linkov
2019-03-05 16:11     ` Eli Zaretskii
2019-03-05 20:11       ` Charles A. Roelli
2019-03-05 20:22         ` Eli Zaretskii
2019-03-07 19:12           ` Charles A. Roelli
2019-03-05 15:46 ` Eli Zaretskii [this message]
2019-03-05 19:49   ` Charles A. Roelli
2019-03-05 19:44     ` Eli Zaretskii
2019-03-05 20:37       ` Charles A. Roelli
2019-03-06 16:06         ` Eli Zaretskii
2019-03-07 19:49           ` Charles A. Roelli
2019-03-13 19:40             ` Stefan Monnier
2019-03-13 19:56               ` Stefan Monnier
2019-03-16 19:39                 ` Charles A. Roelli
2019-03-16 22:37                   ` Stefan Monnier
2019-03-16 20:21               ` Charles A. Roelli
2019-03-22 19:32                 ` Stefan Monnier

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=8336o1e33w.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34723@debbugs.gnu.org \
    --cc=charles@aurox.ch \
    /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.