unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thorsten Bonow <thorsten.bonow@withouthat.org>
To: 19848@debbugs.gnu.org
Subject: bug#19848: Minibuffer completion does not work with ECB package?
Date: Sun, 11 Dec 2016 22:57:51 +0100 (CET)	[thread overview]
Message-ID: <20161211.225751.1026701823420104094.thorsten.bonow@withouthat.org> (raw)
In-Reply-To: <54DD0AAF.7030005@alice.it>


> 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<TAB>
 
> 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)






  reply	other threads:[~2016-12-11 21:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <54DB609F.5050405@alice.it>
2015-02-12 20:18 ` bug#19848: Minibuffer completion does not work with ECB package? Angelo Graziosi
2016-12-11 21:57   ` Thorsten Bonow [this message]
2019-11-01 23:35     ` Stefan Kangas
2019-11-29 13:09       ` Stefan Kangas
2020-01-15  5:34         ` Stefan Kangas
2020-01-15  5:56         ` Stefan Kangas

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=20161211.225751.1026701823420104094.thorsten.bonow@withouthat.org \
    --to=thorsten.bonow@withouthat.org \
    --cc=19848@debbugs.gnu.org \
    /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).