Closed shuxiao9058 closed 4 years ago
先用 M-x toggle-debug-on-error 打开调试选项,再复现后,把 backtrace 的内容粘贴一下。
感谢反馈!
先用 M-x toggle-debug-on-error 打开调试选项,再复现后,把 backtrace 的内容粘贴一下。
感谢反馈!
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-to-number(nil)
awesome-tab-select-visible-tab()
funcall-interactively(awesome-tab-select-visible-tab)
call-interactively(awesome-tab-select-visible-tab nil nil)
command-execute(awesome-tab-select-visible-tab)
(defun awesome-tab-select-visible-tab ()
"Bind this function with number keystroke, such as s-1, s-2, s-3 ... etc.
This function automatically recognizes the number at the end of the keystroke
and switches to the tab of the corresponding index.
Note that this function switches to the visible range,
not the actual logical index position of the current group."
(interactive)
(let* ((event last-command-event)
(key (make-vector 1 event))
(key-desc (key-description key)))
(message "%s" key-desc)
(awesome-tab-select-visible-nth-tab
(string-to-number (nth 1 (split-string key-desc "-"))))))
你把上面的代码执行一下,然后再按键,看看 minibuffer 显示 key-desc 是啥?
按M-1
的时候key-desc
是1,但是还是报错。
如下所示是正常的
(defun awesome-tab-select-visible-tab ()
"Bind this function with number keystroke, such as s-1, s-2, s-3 ... etc.
This function automatically recognizes the number at the end of the keystroke
and switches to the tab of the corresponding index.
Note that this function switches to the visible range,
not the actual logical index position of the current group."
(interactive)
(let* ((event last-command-event)
(key (make-vector 1 event))
(key-desc (key-description key)))
(awesome-tab-select-visible-nth-tab
(string-to-number (or (nth 1 (split-string key-desc "-")) key-desc)))))
最新版应该已经修复了。
现在没问题了,多谢 ~
但是切换的时候会报错,已经将“option”按键设置为“+ESC”了
如下所示为describle-key的描述信息。