unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dani Moncayo <dmoncayo@gmail.com>
To: 10971@debbugs.gnu.org
Subject: bug#10971: Problem with `split-window-keep-point' set to `nil'
Date: Thu, 8 Mar 2012 22:12:54 +0100	[thread overview]
Message-ID: <CAH8Pv0h2AdD+0NTLRHFQX-1KK-Yjxj-8dij6-K7Y10jfjmunKQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

Recipe:

0. emacs -Q
1. M-: (setq split-window-keep-point nil) RET
2. Visit the attached file.
3. C-x 2

The point in the original (top) window has moved (unnecessarily) from
the first line to the last visible one.

The docstring of the variable `split-window-keep-point' says:

 If non-nil, C-x 2 preserves point in the new window.
 If nil, adjust point in the two windows to minimize redisplay.
 [...]

But in this case there was no need to adjust point, because it was in
a position which would remain visible after the splitting.

This behavior is specially annoying if you are in a Dired buffer and
do `C-o' on a file (the point jumps to the last visible line).

-- 
Dani Moncayo

[-- Attachment #2: f1 --]
[-- Type: application/octet-stream, Size: 394 bytes --]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100


             reply	other threads:[~2012-03-08 21:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 21:12 Dani Moncayo [this message]
2012-03-08 22:44 ` bug#10971: Problem with `split-window-keep-point' set to `nil' Dani Moncayo
2012-03-09 15:21 ` martin rudalics
2012-03-09 16:24   ` martin rudalics
2012-03-10  8:48     ` Dani Moncayo
2012-03-11 14:06       ` 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

  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=CAH8Pv0h2AdD+0NTLRHFQX-1KK-Yjxj-8dij6-K7Y10jfjmunKQ@mail.gmail.com \
    --to=dmoncayo@gmail.com \
    --cc=10971@debbugs.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).