unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lukasz Pawelczyk <havner@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: "16909@debbugs.gnu.org" <16909@debbugs.gnu.org>
Subject: bug#16909: 24.3; scrolling *Completions* window with tab sometimes chooses a wrong window
Date: Wed, 5 Mar 2014 10:48:40 +0100	[thread overview]
Message-ID: <CACL4Mm8_EeAurDP1zCtg+WJoWiaHAv5-OBXmJ3m6_Ns4HT26Vw@mail.gmail.com> (raw)
In-Reply-To: <5316D1BC.3000804@gmx.at>

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

On Wed, Mar 5, 2014 at 8:26 AM, martin rudalics <rudalics@gmx.at> wrote:

> >> We have to detect the moment when the window is closed automatically
> >> anyway.  At that time we can either kill the buffer or reset
> >> `other-window-scroll-buffer’.
> >
> > I’m still not sure that even using this variable is a wise idea. It
> might be used
> > by a user to configure his things.
>
> By design it's a plain variable and not a user option.


In that case it's ok.



> > A simple custom function that will always scroll
> > *Completions* window seems like a better choice. You can always scroll
> > by buffer name. No need to force the usage of scroll-other-window
> function.
>
> IIRC the initial intention was to make the *Completions* window the
> `next-window' so it would get scrolled automatically by C-M-v.  When
> that failed, `other-window-scroll-buffer' was invented to handle the
> case where the *Completions* window was not the next window.  I doubt
> that a custom function would gain anything in this regard - it would
> still have to find the window to scroll and detect when it's no more
> needed.
>

If that's the case, sure.


> I meant that if you only kill the buffer (after we used autocomplete) and
> > then user will scroll-other-window (for whatever reason) it won’t behave
> as
> > if its value is nil. We’d have to make it nil as well (as you mentioned
> now).
>
> Why?  If `other-window-scroll-buffer' denotes a dead buffer, it now
> should be tantamount to nil.  Or am I missing something?


If the 'other-window-scroll-buffer' is pointing to a dead buffer
'scroll-other-window'
does not fallback to its normal behaviour. You get an 'invalid buffer'
message.
So we don't have to kill the *Completions* buffer. We need to set the
variable back
to nil to resume normal user operations after using auto complete scrolling.


> If I had an idea where to start I would have sent a patch instead of
> reporting a bug :-/
>
> I thought you had because you earlier said that
>
>    All of this happens because a window that's chosen for displaying a
> window
>    for completion is created with 'display-buffer', while the window that
> is
>    scrolled with TAB during completion is choosen with a 'other-window'
>    ('scroll-other-window') function. And as shown here those windows are
> not
>    always the same.
>
> which gave me the impression that you already did some preliminary
> investigative work.


My investigation was to figure out what is going on, not precisely where to
fix it and was
based on semantic's autocomplete which behaves exactly the same. I just
thought
that reporting this in base emacs functionality might get a higher chance
to get
attention. And the mechanism and a cause seems to be exactly the same.
I didn't manage to pinpoint where it happens in case of elisp auto complete.
Only for semantic displayor one (which needs fixing as well).


-- 
Regards
Havner

[-- Attachment #2: Type: text/html, Size: 4185 bytes --]

  reply	other threads:[~2014-03-05  9:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 16:41 bug#16909: 24.3; scrolling *Completions* window with tab sometimes chooses a wrong window Lukasz Pawelczyk
2014-02-28 18:24 ` martin rudalics
2014-02-28 18:28   ` Lukasz Pawelczyk
2014-03-01 11:54     ` martin rudalics
2014-03-01 12:11       ` Lukasz Pawelczyk
2014-03-01 19:18         ` martin rudalics
2014-03-04 23:22           ` Lukasz Pawelczyk
2014-03-05  7:26             ` martin rudalics
2014-03-05  9:48               ` Lukasz Pawelczyk [this message]
2014-03-05 14:03                 ` martin rudalics
2014-03-06 10:43                   ` Lukasz Pawelczyk
2014-03-06 17:27                     ` martin rudalics
2022-02-13  9:16 ` Lars Ingebrigtsen
2022-03-13 20:35   ` Lars Ingebrigtsen

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=CACL4Mm8_EeAurDP1zCtg+WJoWiaHAv5-OBXmJ3m6_Ns4HT26Vw@mail.gmail.com \
    --to=havner@gmail.com \
    --cc=16909@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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).