Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Debugger entered--Lisp error: (wrong-type-argument characterp (switch-frame #<frame perf_log.1 0x2b7af490>))
- char-to-string((switch-frame #<frame perf_log.1 0x2b7af490>))
- eshell-self-insert-command()
- call-interactively(eshell-self-insert-command nil nil)
- command-execute(eshell-self-insert-command)
- (defun eshell-self-insert-command ()
- (interactive)
- (process-send-string
- (eshell-interactive-process)
- (char-to-string (if (symbolp last-command-event)
- (get last-command-event 'ascii-character)
- last-command-event))))
- (defun md-get-window-glyph (w)
- (let* ((fp (frame-parameters (window-frame w)))
- (frame-top (cdr (assoc 'top fp)))
- (frame-left (cdr (assoc 'left fp)))
- (window-top (window-top-line w))
- (window-left (window-left-column w))
- (hash (md5 (format "%S %S %S %S" frame-top frame-left window-top window-left)))
- (glyph (nth (% (string-to-number (substring hash 0 2) 16) (length md-glyphs)) md-glyphs)))
- (char-to-string glyph)))
- (setq-default mode-line-format
- (append
- (list '(:eval (propertize (format "[%s] " (md-get-window-glyph (get-buffer-window))) 'face 'font-lock-constant-face)))
- mode-line-format))
- (defun md-select-window-with-glyph (chosen-glyph)
- (interactive "cWindow glyph: ")
- (dolist (f (frame-list))
- (dolist (w (window-list f 0))
- (ignore-errors
- (when (equal (downcase (md-get-window-glyph w)) (downcase (char-to-string chosen-glyph)))
- (select-frame-set-input-focus f)
- (select-window w))))))
- (global-set-key (kbd "M-d") #'md-select-window-with-glyph)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement