-
-
Save gexplorer/2e69d19d2ee3aa893b3a277f5ed77823 to your computer and use it in GitHub Desktop.
counsel-M-x: this-command is incorrect in minibuffer-setup-hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'counsel) | |
(defun gx-setup-hook () | |
(message "\n- minibuffer-setup-hook\n") | |
(message "command | value | real value") | |
(message "------- | ----- | ----------") | |
(message " this | %s | %s" this-command real-this-command) | |
(message " last | %s | %s" last-command real-last-command)) | |
(add-hook 'minibuffer-setup-hook #'gx-setup-hook) | |
(defun gx-debug-commands () | |
"Print this and last comments." | |
(interactive) | |
(message "\n- gx-debug-commands\n") | |
(message "command | value | real value") | |
(message "------- | ----- | ----------") | |
(message " this | %s | %s" this-command real-this-command) | |
(message " last | %s | %s" last-command real-last-command)) | |
(defun gx-test-M-x () | |
"Test basic M-x." | |
(message "### When executing `execute-extended-command`") | |
(funcall-interactively #'execute-extended-command "")) | |
(defun gx-test-counsel-M-x () | |
"Test basic counsel-M-x." | |
(message "### When executing `counsel-M-x`") | |
(funcall-interactively #'counsel-M-x "")) | |
(gx-test-M-x) | |
(gx-test-counsel-M-x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment