victorhge / iedit

Modify multiple occurrences simultaneously
https://www.emacswiki.org/emacs/Iedit
402 stars 43 forks source link

Don't print a configured iedit key on init #155

Open meedstrom opened 3 months ago

meedstrom commented 3 months ago

I think the function iedit-update-key-bindings ought not to print a message. The warning about conflict is one thing, but otherwise it's all as expected, right?

victorhge commented 2 months ago

So,what's the problem you met?

meedstrom commented 2 months ago

Mainly that I notice the message at every init. I don't need to notice it.

Imagine if every package printed out their default keybindings on init? I don't see why iedit should be privileged in this way. Though it's true that most packages confine their bindings to a major or minor mode, while iedit sets a global binding on load, which perhaps should be messaged about because it's a surprise. Seems cleaner to me if it would bind nothing and leave it to the user, but I suppose that ship has sailed.

Anyway, found a workaround by installing the package in the following way:

(use-package iedit
  :init
  (setq iedit-toggle-key-default nil)
  :config
  (global-set-key (kbd "C-;") 'iedit-mode))

... Ohhh okay! It seems the message won't be printed if I just bind it before package load! So I can even defer the package load:

(use-package iedit
  :defer
  :init
  (global-set-key (kbd "C-;") 'iedit-mode))

Maybe you'd consider having a tip in the default message, that the message can be silenced by explicitly binding the command? Either way, you can close this issue; my problem is solved.

victorhge commented 2 months ago

I got your point. It is an unecessary message. I am going to remove it.