all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Barry Warsaw <barry@python.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 14829@debbugs.gnu.org
Subject: bug#14829: (no subject)
Date: Mon, 22 Jul 2013 13:41:10 -0400	[thread overview]
Message-ID: <20130722134110.0e8f042a@limelight.wooz.org> (raw)
In-Reply-To: <jwvsiz6wmbj.fsf-monnier+emacs@gnu.org>

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

On Jul 22, 2013, at 01:18 PM, Stefan Monnier wrote:

>> This fixes it for me.
>> ;; Work around a bug in split-window-keep-point and completion.
>> (defadvice completion-at-point (around completion-at-point-around)
>>   "Point safe completion"
>>   (let ((split-window-keep-point t))
>>     ad-do-it))
>> (ad-activate 'completion-at-point)
>
>Hmm... looking at it further I see that:
>- split-window-keep-point defaults to t.
>- the problem could affect other cases than completion.
>Basically, I'm leaning towards forcing split-window-keep-point to t in
>display-buffer, since AFAICT a value of nil only makes sense when you
>split a window into two so that they both show the same buffer, whereas
>in the case of display-buffer, you always want the current buffer's
>point to stay put.

This seems reasonable to me, as long as it doesn't affect C-x 2.

>Why do you (and other people) set split-window-keep-point to nil?
>What is the expected behavior from it?
>
>The docstring seems to indicate it's only meant to affect C-x 2 rather
>than all cases where we create a new window.  Martin?

C-x 2 is the only reason I set it to nil.  There used to be an old XEmacs hack
(might have been some of my personal elisp) that did what I think was called
"slow-splitting" although it was not actually slow.  It did exactly what C-x 2
with s-w-k-p set to nil does.  I love this for tall windows since in most
cases, nothing changes except you get a modeline in the middle of the window
where the split occurs.

So I'm all in favor of keeping the behavior for C-x 2 and inhibiting it for
all other purposes.  I have definitely encountered other situations that the
defadvice above does not handle.  One example is pdb-track in python-mode.
When you hit the breakpoint, the shell buffer is split with the code shown
below, but the split does not happen correct.  Point is left at the same bogus
place as described in the original bug report.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-07-22 17:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08 21:08 bug#14829: 24.3; split-window-keep-point breaks shell tab completion Barry Warsaw
2013-07-11 19:37 ` bug#14829: (no subject) Barry Warsaw
2013-07-22 17:18   ` Stefan Monnier
2013-07-22 17:37     ` martin rudalics
2013-07-22 17:42       ` Barry Warsaw
2013-07-23  7:10         ` martin rudalics
2013-07-22 18:56       ` Stefan Monnier
2013-07-23  7:10         ` martin rudalics
2013-07-23 13:09           ` Stefan Monnier
2013-07-23 13:38             ` Barry Warsaw
2013-07-25 10:05               ` martin rudalics
2013-07-27  2:52                 ` Barry Warsaw
2013-07-27  8:18                   ` martin rudalics
2013-07-29 16:56                   ` martin rudalics
2013-07-25 10:04             ` martin rudalics
2013-07-22 17:41     ` Barry Warsaw [this message]
2013-07-12  8:20 ` bug#14829: 24.3; split-window-keep-point breaks shell tab completion martin rudalics
2013-07-12  9:26   ` Eli Zaretskii
2013-07-12 10:12     ` martin rudalics
2013-07-12 14:18       ` Barry Warsaw
2013-07-12 14:12     ` Barry Warsaw

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=20130722134110.0e8f042a@limelight.wooz.org \
    --to=barry@python.org \
    --cc=14829@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.