From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.bugs Subject: bug#19848: Minibuffer completion does not work with ECB package? Date: Sun, 11 Dec 2016 22:57:51 +0100 (CET) Message-ID: <20161211.225751.1026701823420104094.thorsten.bonow@withouthat.org> References: <54DD0AAF.7030005@alice.it> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1481500034 20491 195.159.176.226 (11 Dec 2016 23:47:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Dec 2016 23:47:14 +0000 (UTC) To: 19848@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 12 00:47:10 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGDpj-0004Go-LH for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Dec 2016 00:47:07 +0100 Original-Received: from localhost ([::1]:57600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGDpn-00062T-RX for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Dec 2016 18:47:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGDph-00062C-Iu for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2016 18:47:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGDpe-0004ZY-9g for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2016 18:47:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51382) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGDpe-0004ZQ-5x for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2016 18:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cGDpd-0004aZ-R2 for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2016 18:47:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <54DD0AAF.7030005@alice.it> Resent-From: Thorsten Bonow Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Dec 2016 23:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19848-submit@debbugs.gnu.org id=B19848.148150001617627 (code B ref 19848); Sun, 11 Dec 2016 23:47:01 +0000 Original-Received: (at 19848) by debbugs.gnu.org; 11 Dec 2016 23:46:56 +0000 Original-Received: from localhost ([127.0.0.1]:38548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGDpX-0004aE-0Y for submit@debbugs.gnu.org; Sun, 11 Dec 2016 18:46:55 -0500 Original-Received: from withouthat.org ([81.169.138.67]:58312 helo=h93074.serverkompetenz.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGC8K-00023U-Ms for 19848@debbugs.gnu.org; Sun, 11 Dec 2016 16:58:13 -0500 Original-Received: by h93074.serverkompetenz.net (Postfix, from userid 105) id 7867E3B8185; Sun, 11 Dec 2016 22:58:07 +0100 (CET) Original-Received: from talkietoaster (aftr-88-153-7-7.unity-media.net [88.153.7.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h93074.serverkompetenz.net (Postfix) with ESMTPSA id 9C5D43B8120 for <19848@debbugs.gnu.org>; Sun, 11 Dec 2016 22:58:03 +0100 (CET) Original-Received: from [::1] (helo=localhost) by talkietoaster with esmtp (Exim 4.88) (envelope-from ) id 1cGC8A-0000cF-9n for 19848@debbugs.gnu.org; Sun, 11 Dec 2016 22:58:02 +0100 X-Face: ,i\0yx1|cRm0qV.lmJ%Z(_0e-.@or]1; 7lZof/?"lf; yH3U0}^Fl+-=1/VPQ8u2aW-k_q3V +YG_z3tmNc,QQg=F`wZg9ZufzHu/CJ?(sz5h>5@5juZnD'V/Jxe#$B<{ X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) X-Mailman-Approved-At: Sun, 11 Dec 2016 18:46:53 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:126892 Archived-At: > It seems that minibuffer completion does not work properly if ECB > package is installed (from MELPA, with : Options | Manage Emacs > Packages), and active. > For example, if I want to strip the trailing withe spaces (M-x > delete-trailing-whitespace), I try > M-x del > In the minibuffer I get > Click on a completion to select it. > In this buffer, type RET to select the completion near point. > Possible completions are: > delete-backward-char delete-blank-lines > [...] > but at this point, if I click on 'delete-trailing-whitespace', I get > Minibuffer is not active for completion > If I try to exit with C-G, it print 'Quit', but does not exit. In short, > whatever I do I cannot exit minibuffer if not quitting Emacs. Hi, I don't think it's an Emacs bug. I think ECB chokes on the Emacs 25 version of `minibuffer-completion-help' from "minibuffer.el". Version 25 of `minibuffer-completion-help' now calls `display-buffer-at-bottom' which appears not to be adapted to the ECB layout. (ECB divides its frame into special ECB windows on the left or right side of the frame and one main "edit-area". By advising the window functions like `display-buffer', the ECB layout is left undisturbed; window functions only act on the "edit-area". Since `display-buffer-at-bottom' is not advised, this now fails with Emacs 25.) As a workaround till this is fixed in ECB I wrote an advice for `display-buffer-at-bottom', which overrides this defun in the ECB frame and calls 'display-buffer-use-some-window' instead. A call to `display-buffer-use-some-window' in other frames will call the unmodified defun. The Completion buffer takes up the whole "edit-area", but selecting a completion works for me now. Toto (defun display-buffer-at-bottom--display-buffer-at-bottom-around (orig-fun &rest args) "Bugfix for ECB: cannot use `display-buffer-at-bottom', call `display-buffer-use-some-window' instead in ECB frame." (if (and ecb-minor-mode (equal (selected-frame) ecb-frame)) (apply 'display-buffer-use-some-window args) (apply orig-fun args))) (advice-add 'display-buffer-at-bottom :around #'display-buffer-at-bottom--display-buffer-at-bottom-around)