GNU bug report logs - #24828
26.0.50; Renaming of display-buffer-in-major-side-window broke which-key.el

Previous Next

Package: emacs;

Reported by: Óscar Fuentes <ofv <at> wanadoo.es>

Date: Sun, 30 Oct 2016 18:22:02 UTC

Severity: minor

Merged with 31194

Found in versions 26.0.50, 26.1

Done: Óscar Fuentes <ofv <at> wanadoo.es>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24828 in the body.
You can then email your comments to 24828 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24828; Package emacs. (Sun, 30 Oct 2016 18:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Óscar Fuentes <ofv <at> wanadoo.es>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 30 Oct 2016 18:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50;
 Renaming of display-buffer-in-major-side-window broke which-key.el
Date: Sun, 30 Oct 2016 19:21:05 +0100
As the subject says. Maybe an alias is in order?

I don't know if there are more cases like this.


In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, X toolkit)
 of 2016-10-21 built on qcore
Repository revision: 0929e061fb544c0f4c10ff0412a41cf7e8148270
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:	Ubuntu 16.10




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24828; Package emacs. (Sun, 30 Oct 2016 19:36:01 GMT) Full text and rfc822 format available.

Message #8 received at 24828 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Óscar Fuentes <ofv <at> wanadoo.es>, 
 24828 <at> debbugs.gnu.org, justin <at> burkett.cc
Subject: Re: bug#24828: 26.0.50;
 Renaming of display-buffer-in-major-side-window broke which-key.el
Date: Sun, 30 Oct 2016 20:34:46 +0100
> Renaming of display-buffer-in-major-side-window broke which-key.el
>
> As the subject says. Maybe an alias is in order?
>
> I don't know if there are more cases like this.

Hmm...  all this is obviously my fault.  As a matter of fact, I wasn't
aware that side windows were anywhere used at all.

The problem is that ‘display-buffer-in-major-side-window’, which I
renamed to ‘window--make-major-side-window’, actually is an internal
function which should not be used outside of window.el.  With other
words: If there is anything ‘window--make-major-side-window’ does which
‘display-buffer-in-side-window’ doesn't, then I should fix that in the
latter rather than exposing the side window internals.

I added the author to the list of recipients.  Maybe he can tell us
more.  If there's no other way, I'll obviously make the alias.

Thanks for the report, martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24828; Package emacs. (Mon, 31 Oct 2016 07:43:01 GMT) Full text and rfc822 format available.

Message #11 received at 24828 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Justin Burkett <justin <at> burkett.cc>, 24828 <at> debbugs.gnu.org
Subject: Re: bug#24828: 26.0.50;
 Renaming of display-buffer-in-major-side-window broke which-key.el
Date: Mon, 31 Oct 2016 08:42:35 +0100
> I wasn't aware that that function was internal, since it appears to
> function like the other display-buffer actions.

Unfortunately so.  It was my fault to pretend otherwise.

> If I remember right that
> code was written by a contributor, and I don't remember the motivation for
> choosing that one. If it really is internal then I will investigate
> changing to the proper method when I have some more time.

I see.  The problem is that the structure on the right

    ;; +-------------------------+         +-------------------------+
    ;; |     regular window      |         |     regular window      |
    ;; |                         |         +------------+------------+
    ;; +------------+------------+   -->   | side-win 1 | side-win 2 |
    ;; | side-win 1 | side-win 2 |         |------------+------------|
    ;; |            |            |         |     which-key window    |
    ;; +------------+------------+         +------------+------------+

was never really supported.  I initially wanted to allow that but later
found out that I cannot reliably split side windows in both directions.
It might work with Emacs 24 in a few basic use cases but will surely
break with more complicated setups.  So you essentially will have to
fall back on

    ;; +-------------------------+
    ;; |     regular window      |
    ;; |                         |
    ;; +------+-------+----------|
    ;; | side-| side- | which-key|
    ;; | win-1| win-2 | window   |
    ;; +------+-------+----------+

or

    ;; +-------------------------+
    ;; |     regular window      |
    ;; |                         |
    ;; +----------- +------------|
    ;; | side-win-1 | which-key  |
    ;; |            | window     |
    ;; +------------+------------+

sooner or later anyway.  For this, ‘which-key’ should either supply a
side window slot value for customization and/or tell the user how to
customize ‘display-buffer-alist’ for displaying the which-key window.
Then the user can decide which windows she wants which-key to share with
(the completions window looks like a good candidate because it's
ephemeral too).

Note that side windows were initially designed as more persistent but I
can easily see that the ‘which-key’ use case might come in pretty handy
too.  Hence it should be possible to make the side-win-1 and side-win-2
windows temporarily very small in order to give the which-key window
sufficient space.

From what I've seen, ‘which-key’ is a fine mode, very neatly written.
It should be in ELPA.  In any case, keep up the good work.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24828; Package emacs. (Mon, 31 Oct 2016 17:58:01 GMT) Full text and rfc822 format available.

Message #14 received at 24828 <at> debbugs.gnu.org (full text, mbox):

From: Justin Burkett <justin <at> burkett.cc>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 24828 <at> debbugs.gnu.org
Subject: Re: bug#24828: 26.0.50;
 Renaming of display-buffer-in-major-side-window broke which-key.el
Date: Mon, 31 Oct 2016 13:31:12 -0400
[Message part 1 (text/plain, inline)]
Martin,

Thank you for the explanation (and for the kind words). I will follow your
suggestions.

Best,
Justin

On Mon, Oct 31, 2016 at 3:42 AM, martin rudalics <rudalics <at> gmx.at> wrote:

> > I wasn't aware that that function was internal, since it appears to
> > function like the other display-buffer actions.
>
> Unfortunately so.  It was my fault to pretend otherwise.
>
> > If I remember right that
> > code was written by a contributor, and I don't remember the motivation
> for
> > choosing that one. If it really is internal then I will investigate
> > changing to the proper method when I have some more time.
>
> I see.  The problem is that the structure on the right
>
>     ;; +-------------------------+         +-------------------------+
>     ;; |     regular window      |         |     regular window      |
>     ;; |                         |         +------------+------------+
>     ;; +------------+------------+   -->   | side-win 1 | side-win 2 |
>     ;; | side-win 1 | side-win 2 |         |------------+------------|
>     ;; |            |            |         |     which-key window    |
>     ;; +------------+------------+         +------------+------------+
>
> was never really supported.  I initially wanted to allow that but later
> found out that I cannot reliably split side windows in both directions.
> It might work with Emacs 24 in a few basic use cases but will surely
> break with more complicated setups.  So you essentially will have to
> fall back on
>
>     ;; +-------------------------+
>     ;; |     regular window      |
>     ;; |                         |
>     ;; +------+-------+----------|
>     ;; | side-| side- | which-key|
>     ;; | win-1| win-2 | window   |
>     ;; +------+-------+----------+
>
> or
>
>     ;; +-------------------------+
>     ;; |     regular window      |
>     ;; |                         |
>     ;; +----------- +------------|
>     ;; | side-win-1 | which-key  |
>     ;; |            | window     |
>     ;; +------------+------------+
>
> sooner or later anyway.  For this, ‘which-key’ should either supply a
> side window slot value for customization and/or tell the user how to
> customize ‘display-buffer-alist’ for displaying the which-key window.
> Then the user can decide which windows she wants which-key to share with
> (the completions window looks like a good candidate because it's
> ephemeral too).
>
> Note that side windows were initially designed as more persistent but I
> can easily see that the ‘which-key’ use case might come in pretty handy
> too.  Hence it should be possible to make the side-win-1 and side-win-2
> windows temporarily very small in order to give the which-key window
> sufficient space.
>
> From what I've seen, ‘which-key’ is a fine mode, very neatly written.
> It should be in ELPA.  In any case, keep up the good work.
>
> martin
>
>
[Message part 2 (text/html, inline)]

Reply sent to Óscar Fuentes <ofv <at> wanadoo.es>:
You have taken responsibility. (Mon, 31 Oct 2016 18:24:01 GMT) Full text and rfc822 format available.

Notification sent to Óscar Fuentes <ofv <at> wanadoo.es>:
bug acknowledged by developer. (Mon, 31 Oct 2016 18:24:02 GMT) Full text and rfc822 format available.

Message #19 received at 24828-done <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 24828-done <at> debbugs.gnu.org, Justin Burkett <justin <at> burkett.cc>
Subject: Re: bug#24828: 26.0.50;
 Renaming of display-buffer-in-major-side-window broke which-key.el
Date: Mon, 31 Oct 2016 19:23:44 +0100
which-key.el was "fixed" with the following commit message:

 Remove use of display-buffer-in-major-side-window

 According to emacs bug #24828, this is an internal function and should
 not be used. Following the advice from that report, switch to
 display-buffer-in-side-window and add an option for the user to specify
 the slot value for that function.

Closing this bug. Let's hope that there are no more packages out there
that use this function(s).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24828; Package emacs. (Tue, 01 Nov 2016 07:42:02 GMT) Full text and rfc822 format available.

Message #22 received at 24828 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Justin Burkett <justin <at> burkett.cc>
Cc: 24828 <at> debbugs.gnu.org
Subject: Re: bug#24828: 26.0.50;
 Renaming of display-buffer-in-major-side-window broke which-key.el
Date: Tue, 01 Nov 2016 08:41:42 +0100
Thank you very much for fixing this on your side.

BTW, you might eventually want to make the first sentence of doc-strings
always occupy the first line of the doc-string.  This makes them work
better with things like ‘eldoc-mode’.  Also the doc-strings of
‘which-key-side-window-max-width/-height’ do not quite match their
customization type - IIUC the latter always ask for a float.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24828; Package emacs. (Tue, 01 Nov 2016 07:43:01 GMT) Full text and rfc822 format available.

Message #25 received at 24828-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Óscar Fuentes <ofv <at> wanadoo.es>
Cc: 24828-done <at> debbugs.gnu.org, Justin Burkett <justin <at> burkett.cc>
Subject: Re: bug#24828: 26.0.50;
 Renaming of display-buffer-in-major-side-window broke which-key.el
Date: Tue, 01 Nov 2016 08:41:49 +0100
> Closing this bug.

Thanks again for reporting it.

> Let's hope that there are no more packages out there
> that use this function(s).

Fingers crossed.

martin




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Nov 2016 12:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 17 Apr 2018 16:31:02 GMT) Full text and rfc822 format available.

Forcibly Merged 24828 31194. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 17 Apr 2018 16:31:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 18 May 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.