kiennq / emacs-mini-modeline

Display emacs mode line in minibuffer
GNU General Public License v3.0
202 stars 14 forks source link

The height of the minibuffer cannot be adjusted using the latest dash.el #12

Closed shanyouli closed 5 years ago

shanyouli commented 5 years ago

Today I updated my emacs package, restart emacs and found that I can't use the M-x run command because it can't display the list in the minibuffer, the picture looks like this: 2019-10-04-120300_872x151_scrot And what I need is the following picture, because I use the ivy package。 2019-10-04-120630_691x163_scrot M-x works fine when I change the version of dash.el to 2.12 2019-10-04-121119_841x261_scrot Do you have time to make mini-modeline have the same effect as the latest version of dash.el and version 2.12 of dash.el?

kiennq commented 5 years ago

Can you provide a mini emacs config that I can try to repro? I'm using dash-20190920.1035 and it seems working fine.

Can you see if there's any error spilled in Message buffer?

shanyouli commented 5 years ago

When I downgraded emacs from 27.0.50 to 26.3, I found that this problem did not occur with the following configuration. But when I restarted the computer, there was another problem running.

the mini emacs config is this,

(push "~/Work/emacs-test/dash.el" load-path)
(push "~/Work/emacs-test/swiper" load-path)
(push "~/Work/emacs-test/emacs-mini-modeline" load-path)

(require 'mini-modeline)
(mini-modeline-mode +1)
(require 'ivy)
(require 'swiper)
(require 'counsel)
(toggle-debug-on-error)
(ivy-mode +1)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-s") 'swiper)

Perform the operation as follows: f Among them mini-modeline, dash.el, swiper are the latest version。

kiennq commented 5 years ago

Seem like a regression of #11, we've advised minibuffer setup and exit hook with resize-mini-windows. That seems break ivy.

kiennq commented 5 years ago

@QiangF Do you have objection if I'm removing those hooks? It interferes with Counsel-M-x and also I'm not sure if it's working efficiently in mini-modeline too.

@shanyouli: can you try this branch and see if the problem persists?

shanyouli commented 5 years ago

This bug was fixed in bug/12. If there is no other place in my problem that needs my help, I will close the issue after one day. By the way, this package is very good and thank you for taking the time to solve my problem.

kiennq commented 5 years ago

You're welcome. 😸

QiangF commented 5 years ago

@QiangF Do you have objection if I'm removing those hooks? It interferes with Counsel-M-x and also I'm not sure if it's working efficiently in mini-modeline too.

@kiennq No problem. My issue only happens with pyim, I will advice the pyim function instead.

kiennq commented 5 years ago

@QiangF: Thanks. Also can you try if pyim works with latest version first? From what I see, #10 happens when resize-mini-windows set to grow-only. Once it's set to t of nil, with your new duration code, the mini buffer will not be quickly resized. From its document, it makes sense since only grow-only looks at echo area (which is normally blank with mini-modeline).

QiangF commented 5 years ago

No, the latest version still doesn't prevent the resizing during consecutive messaging.

(eval (progn
        (setq resize-mini-windows t)
        (setq mini-modeline-truncate-p nil)
        (run-at-time 0.3 nil (lambda () (message  "a\nb\nc")))
        (run-at-time 0.6 nil (lambda () (message  "a\nb\nc")))
        (run-at-time 0.9 nil (lambda () (message  "a\nb\nc")))))

As you see in the above test code, when the minibuffer resizes, only the first of the three line is left. The minibuffer must have been resized somewhere other than in mini-modeline-display.

kiennq commented 5 years ago

Doesn't seems happen to me. 4195b894-92a4-4041-9d05-709fe53324e1

It must has been resized somewhere else.

QiangF commented 5 years ago

I will report back once I found the real cause. Thank you!