ergoemacs / ergoemacs-mode

ergoemacs-mode
ergoemacs.github.io/
GNU General Public License v3.0
293 stars 35 forks source link

Icicles minibuffer bindings no longer work... #406

Closed mattfidler closed 3 years ago

mattfidler commented 8 years ago

Also I've found another icicles-specific thing that does not work anymore. Those minibuffer bindings. I was able to fix it in my config like this:

(ergoemacs-theme-component icicles-minibuffer ()
  ""
  (add-hook
   'icicle-minibuffer-setup-hook
   '(lambda ()
      (define-key minibuffer-local-map (kbd "<f11>") 'previous-history-element)
      (define-key minibuffer-local-map (kbd "M-<f11>") 'icicle-insert-history-element)
      (define-key minibuffer-local-map (kbd "<f12>") 'next-history-element)
      (define-key minibuffer-local-map (kbd "S-<f11>") 'next-history-element)
      (define-key minibuffer-local-map (kbd "M-<f12>") 'icicle-insert-history-element)
      (define-key minibuffer-local-map (kbd "S-<f12>") 'previous-history-element))))
(ergoemacs-require 'icicles-minibuffer)

See Issue #372 @sg2002

mattfidler commented 8 years ago

This should be fixde @sg2002

sg2002 commented 8 years ago

There's still an issue here.

When you start emacs anew, doing M-a and then cycling history using f11 and f12 works. But only the first time. After the first time, it stops working.

Cycling C-x b stops working too. But it never breaks by itself, only when you do M-a.

Cycling C-o works all the time.

The keys get interpreted as previous-line and next-line.

mattfidler commented 8 years ago

I think fixing issue #407 broke this...

mattfidler commented 8 years ago

This should be fixed now (at least it works for me in a basic ergoemacs+icy setup).

sg2002 commented 8 years ago

Yeah, it works. I've also noticed another problem with icicles minibuffer bindings.

S-TAB in ergoemacs now always runs icicle-complete-keys. This should not happen during minibuffer completion. Instead icicle-apropos-complete should be ran.

sg2002 commented 8 years ago

Ok, I've solved that. There's a variable called icicle-key-complete-keys-for-minibuffer. In my custom it was set to nil. Probably leftover from some testing. Ergoemacs overrides this variable anyway. But basically, if you have it set to nil at the moment ergoemacs loads, icicle-complete-keys starts overriding icicle-apropos-complete.

This happens since ef27870f679db38b0297e108b39547818fa9075b .

Probably does not require any action, but good to keep in mind in case anyone starts having similar problems.

mattfidler commented 8 years ago

Thanks @sg2002

sg2002 commented 8 years ago

Another really minor thing. M-o is currently not overridden in icicles minibuffer. I was able to fix it by adding (define-key minibuffer-local-map (kbd "M-o") 'forward-word) to the same block.

mattfidler commented 8 years ago

Thanks. I will look into it.

sg2002 commented 8 years ago

Ok, another one, in minibuffer with icicles, M-s and M-r get treated as the vanilla next-matching-history-element and previous-matching-history-element.

mattfidler commented 8 years ago

This tests the f11 and f12 bindings: 6c5d5bc7a4e366dec328dfd3430f20b7b977f781

mattfidler commented 8 years ago

What do you expect the M-s and M-r` keys to do?

mattfidler commented 8 years ago

For f11 f12 M-o M-s M-r I get the following commands: (previous-history-element next-history-element icicle-insert-history-element ergoemacs-move-cursor-next-pane previous-matching-history-element)

sg2002 commented 8 years ago

I expect M-s to be ergoemacs-move-cursor-next-pane. And M-r to have it's normal ergoemacs kill-word binding.

Icy M-o is already rebound in ergoemacs to M-f11 and M-f12.

mattfidler commented 8 years ago

When I run the test M-s is ergoemacs-move-cursor-next-pane. M-r is previous-matching-history-element.

mattfidler commented 8 years ago

Should this be tested in command other than icicle-execute-extended-command?

sg2002 commented 8 years ago

No. I've found the conditions under which this happens. First the config:

(require 'icicles)
(icy-mode 1)
(require 'ergoemacs-mode)
(ergoemacs-mode 1)
(ergoemacs-theme-component reclaim-C-f ()
  "We need to give at least one sequence to reclaim C-f from isearch and get the new icicle-search-key-prefix picked up."
  (global-set-key (kbd "C-f .") 'isearch-forward-symbol-at-point))
(ergoemacs-require 'reclaim-C-f)
(setq icicle-search-key-prefix (kbd "C-f"))

Now the triggers:

  1. (require 'smart-mode-line)(sml/setup)
  2. (require 'srefactor)
  3. (require 'virtualenvwrapper)

If you have any of these in your config after (setq icicle-search-key-prefix (kbd "C-f")) then this M-s issue happens.

This thing is also infectious. That is, if you do desktop-save from infected version and then read it in in a clean one, it becomes infected too. When you save desktop in the secondary infected version, the infection does not transfer. This behavior had me totally baffled. ;-)

mattfidler commented 8 years ago

Is this only in the minibuffer?

On Sun, Apr 24, 2016, 6:16 PM sg2002 notifications@github.com wrote:

No. I've found the conditions under which this happens. First the config:

(require 'icicles) (icy-mode 1) (require 'ergoemacs-mode) (ergoemacs-mode 1) (ergoemacs-theme-component reclaim-C-f () "We need to give at least one sequence to reclaim C-f from isearch and get the new icicle-search-key-prefix picked up." (global-set-key (kbd "C-f .") 'isearch-forward-symbol-at-point)) (ergoemacs-require 'reclaim-C-f) (setq icicle-search-key-prefix (kbd "C-f"))

Now the triggers:

  1. (require 'smart-mode-line)(sml/setup)
  2. (require 'srefactor)
  3. (require 'virtualenvwrapper)

If you have any of these in your config after (setq icicle-search-key-prefix (kbd "C-f")) then this M-s issue happens.

This thing is also infectious. That is, if you do desktop-save from infected version and then read it in in a clean one, it becomes infected too. When you save desktop in the secondary infected version, the infection does not transfer. This behavior had me totally baffled. ;-)

— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/406#issuecomment-214064734

sg2002 commented 8 years ago

Yes.

mattfidler commented 8 years ago

I'm unsure how any of these packages would affect the ergoemacs-mode state. I'm a bit baffled as well.

mattfidler commented 8 years ago

Neither of these packages uses global-set-key either

mattfidler commented 8 years ago

Nor do they modify the minibuffer. Only virtualenvwrapper uses the minibuffer...

mattfidler commented 8 years ago

I updated test 407 to include what you described as something that changes M-s binding. However, when I run (ert "ergoemacs-test-407"), I cannot reproduce your issue.

sg2002 commented 8 years ago

Test 407 worked for me too, at first. But replacing ergoemacs-package's with require's, had the desired effect.

mattfidler commented 8 years ago

So replacing ergoemacs-package does not cause an issue for you, but using require does.

On Wed, Apr 27, 2016, 5:31 AM sg2002 notifications@github.com wrote:

Test 407 worked for me too, at first. But replacing ergoemacs-package's with require's, had the desired effect.

— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/406#issuecomment-215043424