all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs 24.4 disable popup in minibuffer
@ 2014-11-06 20:39 Sam Halliday
  2014-11-06 22:40 ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Sam Halliday @ 2014-11-06 20:39 UTC (permalink / raw
  To: help-gnu-emacs

Hi all,

I upgraded to emacs 24.4.1 on debian jessie and I was pretty impressed by the changelog!

However, one thing is not working so well for me: the popup completion in the minibuffer (which now seems to be the default). I preferred the old behaviour because the popup resizes the minibuffer, and more importantly, I think it is interfering with `magit-find-file-completing-read` which is possibly my most heavily-used feature.

1. Has anybody else also experienced problems with the magit file finder?
2. How can I turn off the popup completion in the minibuffer?

Best regards,
Sam


PS: https://github.com/fommil/unix/blob/master/.emacs


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
  2014-11-06 20:39 emacs 24.4 disable popup in minibuffer Sam Halliday
@ 2014-11-06 22:40 ` Stefan Monnier
  2014-11-07 14:45   ` Sam Halliday
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2014-11-06 22:40 UTC (permalink / raw
  To: help-gnu-emacs

> However, one thing is not working so well for me: the popup completion in
> the minibuffer (which now seems to be the default). I preferred the old

I don't know what you mean by "popup completion" and can't remember
making significant changes to the default completion code in 24.4.


        Stefan


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
  2014-11-06 22:40 ` Stefan Monnier
@ 2014-11-07 14:45   ` Sam Halliday
  2014-11-07 15:10     ` Stefan Monnier
       [not found]     ` <mailman.13131.1415373077.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Sam Halliday @ 2014-11-07 14:45 UTC (permalink / raw
  To: help-gnu-emacs

On Thursday, 6 November 2014 22:40:03 UTC, Stefan Monnier  wrote:
> > However, one thing is not working so well for me: the popup completion in
> > the minibuffer (which now seems to be the default). I preferred the old
> 
> I don't know what you mean by "popup completion" and can't remember
> making significant changes to the default completion code in 24.4.
> 
> 
>         Stefan

Thanks Stefan,

Hmm, I wonder if perhaps one of my melpa packages has updated at the same time and caused confusion. I'll bisect my .emacs: I'm basically getting popup completion in the minibuffer now where previously it would show different options in a new buffer (e.g. C-x b <prefix-TAB>)



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
  2014-11-07 14:45   ` Sam Halliday
@ 2014-11-07 15:10     ` Stefan Monnier
       [not found]     ` <mailman.13131.1415373077.1147.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2014-11-07 15:10 UTC (permalink / raw
  To: help-gnu-emacs

> Hmm, I wonder if perhaps one of my melpa packages has updated at the same
> time and caused confusion. I'll bisect my .emacs: I'm basically getting
> popup completion in the minibuffer now where previously it would show
> different options in a new buffer (e.g. C-x b <prefix-TAB>)

Since I still don't know what you mean by "popup completion", I can't
help you much further.


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
       [not found]     ` <mailman.13131.1415373077.1147.help-gnu-emacs@gnu.org>
@ 2014-11-07 19:15       ` Sam Halliday
  2014-11-07 20:04         ` Sam Halliday
  0 siblings, 1 reply; 11+ messages in thread
From: Sam Halliday @ 2014-11-07 19:15 UTC (permalink / raw
  To: help-gnu-emacs

On Friday, 7 November 2014 15:11:19 UTC, Stefan Monnier  wrote:
> > Hmm, I wonder if perhaps one of my melpa packages has updated at the same
> > time and caused confusion. I'll bisect my .emacs: I'm basically getting
> > popup completion in the minibuffer now where previously it would show
> > different options in a new buffer (e.g. C-x b <prefix-TAB>)
> 
> Since I still don't know what you mean by "popup completion", I can't
> help you much further.

Popup completion =>

  http://i752.photobucket.com/albums/xx162/fommil/2014-11-07-190723_1918x1078_scrot_zpscf010543.png

Normally my minibuffer is one character tall. Here it is about 11 or 12 because the popup resizes the minibuffer.

AND I just confirmed that this happens even when I move my .emacs to the side, so this has been introduced by either emacs 24.4.1 or debian's site plugins.

In fact it looks like debian have done something because

  /usr/bin/emacs --no-init-file --no-site-file

and this goes away.

Sorry all, I should have checked this before posting to the group.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
  2014-11-07 19:15       ` Sam Halliday
@ 2014-11-07 20:04         ` Sam Halliday
  2014-11-07 22:34           ` John Mastro
                             ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Sam Halliday @ 2014-11-07 20:04 UTC (permalink / raw
  To: help-gnu-emacs

On Friday, 7 November 2014 19:15:48 UTC, Sam Halliday  wrote:
> On Friday, 7 November 2014 15:11:19 UTC, Stefan Monnier  wrote:
> > > Hmm, I wonder if perhaps one of my melpa packages has updated at the same
> > > time and caused confusion. I'll bisect my .emacs: I'm basically getting
> > > popup completion in the minibuffer now where previously it would show
> > > different options in a new buffer (e.g. C-x b <prefix-TAB>)
> > 
> > Since I still don't know what you mean by "popup completion", I can't
> > help you much further.
> 
> Popup completion =>
> 
>   http://i752.photobucket.com/albums/xx162/fommil/2014-11-07-190723_1918x1078_scrot_zpscf010543.png
> 
> Normally my minibuffer is one character tall. Here it is about 11 or 12 because the popup resizes the minibuffer.
> 
> AND I just confirmed that this happens even when I move my .emacs to the side, so this has been introduced by either emacs 24.4.1 or debian's site plugins.
> 
> In fact it looks like debian have done something because
> 
>   /usr/bin/emacs --no-init-file --no-site-file
> 
> and this goes away.
> 
> Sorry all, I should have checked this before posting to the group.

Further to this, I narrowed the problem to this package:

https://github.com/syohex/emacs-popup-complete/blob/master/popup-complete.el

and it's behaviour seems to have changed in emacs 24.4.1 (without it changing).

I'd be greatly obliged if you could have a look and see if there is anything obvious that could be done to disable the popup in the minibuffer.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
  2014-11-07 20:04         ` Sam Halliday
@ 2014-11-07 22:34           ` John Mastro
  2014-11-08 14:38           ` Stefan Monnier
       [not found]           ` <mailman.13192.1415399713.1147.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 11+ messages in thread
From: John Mastro @ 2014-11-07 22:34 UTC (permalink / raw
  To: help-gnu-emacs@gnu.org; +Cc: Sam Halliday

Sam Halliday <sam.halliday@gmail.com> wrote:
> I'd be greatly obliged if you could have a look and see if there is
> anything obvious that could be done to disable the popup in the
> minibuffer.

You could try one of the two options below (untested, sorry).

But there's a good chance Stefan will have a better idea so it may be
worth waiting :)

    ;; Option 1
    (defun popup-disable-in-minibuffer ()
      (set (make-local-variable 'popup-complete-enable) nil))

    (add-hook 'minibuffer-setup-hook 'popup-disable-in-minibuffer)

    ;; Option 2
    (defun no-popup-in-minibuffer (function &rest args)
      (let ((popup-complete-enable (and (not (minibufferp))
                                        popup-complete-enable)))
        (apply function args)))

    (advice-add 'popup-complete--in-region
                :around #'no-popup-in-minibuffer)

-- 
john



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
  2014-11-07 20:04         ` Sam Halliday
  2014-11-07 22:34           ` John Mastro
@ 2014-11-08 14:38           ` Stefan Monnier
  2014-11-08 21:45             ` John Mastro
       [not found]           ` <mailman.13192.1415399713.1147.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2014-11-08 14:38 UTC (permalink / raw
  To: help-gnu-emacs

> and it's behaviour seems to have changed in emacs 24.4.1 (without it changing).

Could someone debug the popup-complete code to try and figure out why
it's behaving differently?


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
  2014-11-08 14:38           ` Stefan Monnier
@ 2014-11-08 21:45             ` John Mastro
  2014-11-08 22:08               ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: John Mastro @ 2014-11-08 21:45 UTC (permalink / raw
  To: help-gnu-emacs@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> and it's behaviour seems to have changed in emacs 24.4.1 (without it
>> changing).
>
> Could someone debug the popup-complete code to try and figure out why
> it's behaving differently?

The package effectively a single function, which is added to
`completion-in-region-functions'.

I see that hook was obsoleted in 24.4, with
`completion-in-region-function' recommended instead, but I'm not sure if
that's related.

The function checks a variable, `popup-complete-enable', to determine
whether it should attempt to offer completions. The workarounds I
suggested to Sam simply ensure that `popup-complete-enable' is nil in
the minibuffer.

However, I'm not familiar enough with either the package or
`completion-in-region-functions' to know whether this a bug somewhere
(and, if so, where), or if this is intended behavior that happens not to
be what Sam wants.

If someone call tell me what "the right thing" is here, a fix should be
trivial.

-- 
john



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
  2014-11-08 21:45             ` John Mastro
@ 2014-11-08 22:08               ` Stefan Monnier
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2014-11-08 22:08 UTC (permalink / raw
  To: help-gnu-emacs

> If someone call tell me what "the right thing" is here, a fix should be
> trivial.

Of course.  The problem is to figure out what is "the right thing" and
for that we need to figure out why the behavior changed.


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs 24.4 disable popup in minibuffer
       [not found]           ` <mailman.13192.1415399713.1147.help-gnu-emacs@gnu.org>
@ 2014-11-11  9:13             ` Sam Halliday
  0 siblings, 0 replies; 11+ messages in thread
From: Sam Halliday @ 2014-11-11  9:13 UTC (permalink / raw
  To: help-gnu-emacs

On Friday, 7 November 2014 22:35:15 UTC, John Mastro  wrote:
> Sam Halliday <sam.halliday@gmail.com> wrote:
> > I'd be greatly obliged if you could have a look and see if there is
> > anything obvious that could be done to disable the popup in the
> > minibuffer.
> 
> You could try one of the two options below (untested, sorry).
> 
> But there's a good chance Stefan will have a better idea so it may be
> worth waiting :)
> 
>     ;; Option 1
>     (defun popup-disable-in-minibuffer ()
>       (set (make-local-variable 'popup-complete-enable) nil))
> 
>     (add-hook 'minibuffer-setup-hook 'popup-disable-in-minibuffer)
> 
>     ;; Option 2
>     (defun no-popup-in-minibuffer (function &rest args)
>       (let ((popup-complete-enable (and (not (minibufferp))
>                                         popup-complete-enable)))
>         (apply function args)))
> 
>     (advice-add 'popup-complete--in-region
>                 :around #'no-popup-in-minibuffer)


Thanks John,

The author of the package issued an update which allows for the mode to be enabled for user specified modes https://github.com/syohex/emacs-popup-complete/commit/0c5b7a4efc89fe12b30ea2996f157437d78b613e That serves my purposes. (advice-add ...) is a pretty sweet thing, I'd probably have gone for that if the package remained unchanged.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-11-11  9:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 20:39 emacs 24.4 disable popup in minibuffer Sam Halliday
2014-11-06 22:40 ` Stefan Monnier
2014-11-07 14:45   ` Sam Halliday
2014-11-07 15:10     ` Stefan Monnier
     [not found]     ` <mailman.13131.1415373077.1147.help-gnu-emacs@gnu.org>
2014-11-07 19:15       ` Sam Halliday
2014-11-07 20:04         ` Sam Halliday
2014-11-07 22:34           ` John Mastro
2014-11-08 14:38           ` Stefan Monnier
2014-11-08 21:45             ` John Mastro
2014-11-08 22:08               ` Stefan Monnier
     [not found]           ` <mailman.13192.1415399713.1147.help-gnu-emacs@gnu.org>
2014-11-11  9:13             ` Sam Halliday

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.