ecb-home / ecb

ECB Main Repository
Other
54 stars 11 forks source link

Completions window and minibuffer error #38

Closed mgavin closed 5 years ago

mgavin commented 5 years ago

First off, I love ecb and wish I had the talent to revive this project.

My issue is how the completions window appears in the minibuffer and creates a situation where you can't escape from the minibuffer .. This is using the latest version of ecb and emacs.

mgavin commented 5 years ago

emacs is 26.1 and ecb would be 07272017 from melpa

ware commented 5 years ago

If you submit a pull request that fixes the issue I can review it. I love ecb too which is why I volunteered to maintain it but at this point I don't even really use emacs so getting the time to try and fix these issues is rare.

mgavin commented 5 years ago

I think this has to do with the different warnings in the byte compilation about display-buffer-function, special-display-function, special-display-buffer-names, and special-display-regexps all being obsolete variables as of 24.3, and the warning says to use display-buffer-alist instead for all cases. (I think this issue mostly comes from ecb-layout.el)

In ecb-display-buffer-xemacs: ecb-layout.el:2002:37:Warning: ‘display-buffer-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2051:23:Warning: ‘display-buffer-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2235:40:Warning: ‘display-buffer-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2115:44:Warning: ‘special-display-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2097:38:Warning: ‘special-display-buffer-names’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2097:38:Warning: ‘special-display-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2097:38:Warning: ‘special-display-buffer-names’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2097:38:Warning: ‘special-display-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2102:31:Warning: ‘special-display-regexps’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2102:31:Warning: ‘special-display-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2102:31:Warning: ‘special-display-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. In ecb-check-for-special-buffer: ecb-layout.el:2899:36:Warning: ‘special-display-function’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2905:36:Warning: ‘special-display-buffer-names’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2913:68:Warning: ‘special-display-buffer-names’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead. ecb-layout.el:2909:29:Warning: ‘special-display-regexps’ is an obsolete variable (as of 24.3); use ‘display-buffer-alist’ instead.

I remember trying to read the documentation on display-buffer-alist, but didn't grasp how to adapt the previous variables... worrying that different functions would even need a rewrite.

mgavin commented 5 years ago

Well, after looking through ECB, I think the underlying logic should still work, it just needs to be updated to all that has changed between 24.3 and today (like 'cl-' warnings, display-buffer-alist warnings, save-excursion+set-buffer warnings...)

As for this issue, there are several places (in ecb-layout.el) referencing the minibuffer window that address how completions would screw it up... I didn't figure out I could use that anywhere else..

Here's what I've done to get around the completions window in the minibuffer. Put this in my .emacs file:

(add-to-list 'display-buffer-alist
             `(,(regexp-quote "*Completions*") display-buffer-use-some-window))

Where you check if the Completions buffer were to come up, then tell it to use some other (non-dedicated) window.

I'll close this issue for now, since ECB errors seem to go beyond just the minibuffer and have to do with the general layout logic

jolhoeft commented 5 years ago

Oh, thank you. That has been driving me nuts.

dan-corneanu commented 4 years ago

Nice, this works.