[slime-devel] Propose to new method for `slime-selector' to find "*slime-inspector*"

Propose to new method for `slime-selector' to find "*slime-inspector*". Below and and as attached: (def-slime-selector-method ?i "*slime-inspector* buffer." (or (and (slime-connected-p) (or (and (slime-inspector-visible-p) (switch-to-buffer (slime-inspector-buffer) t) (or (and (= (point-min) (point-max)) (progn (slime-inspector-pop) (and (null slime-inspector-mark-stack) (slime-inspector-next) t) (current-buffer))) (current-buffer))) (and (get-buffer (slime-buffer-name :inspector)) (switch-to-buffer-other-window (slime-buffer-name :inspector) t) (or (and (= (point-min) (point-max)) (progn (slime-inspector-pop) (and (null slime-inspector-mark-stack) (slime-inspector-next) t) (current-buffer))) (current-buffer))) (slime-inspector-buffer)))) (error "`slime-selector' wants *slime-inspector* buffer but not `slime-connected-p'")) ;;; (URL `http://paste.lisp.org/+2K1B')

Propose to new method for `slime-selector' to find "*slime-inspector*". Below and and as attached:
my take on this is available here: http://dwim.hu/gitweb/gitweb.cgi?p=slime;a=commitdiff;h=fe1b2bc173c3e740651a... it simply adds a new key parameter to slime-selector, so that you can specify it from custom key bindings. usage example: http://dwim.hu/darcs/hu.dwim.environment/emacs/dwim-util.el -- attila Notice your eroding (digital) freedom, and do something about it! PGP: 2FA1 A9DC 9C1E BA25 A59C 963F 5D5F 45C7 DFCD 0A39 OTR XMPP: 8647EEAC EA30FEEF E1B55146 573E52EE 21B1FF06

* MON KEY [2011-02-02 00:23] writes:
Propose to new method for `slime-selector' to find "*slime-inspector*". Below and and as attached:
(def-slime-selector-method ?i
i is already reserved for the inferior lisp buffer. Maybe p for insPector?
"*slime-inspector* buffer." (or (and (slime-connected-p) (or (and (slime-inspector-visible-p) (switch-to-buffer (slime-inspector-buffer) t) (or (and (= (point-min) (point-max)) (progn (slime-inspector-pop) (and (null slime-inspector-mark-stack) (slime-inspector-next) t) (current-buffer))) (current-buffer))) (and (get-buffer (slime-buffer-name :inspector)) (switch-to-buffer-other-window (slime-buffer-name :inspector) t) (or (and (= (point-min) (point-max)) (progn (slime-inspector-pop) (and (null slime-inspector-mark-stack) (slime-inspector-next) t) (current-buffer))) (current-buffer))) (slime-inspector-buffer)))) (error "`slime-selector' wants *slime-inspector* buffer but not `slime-connected-p'"))
Why is (def-slime-selector-method ?p "Select the inspector buffer." (slime-buffer-name :inspector)) not enough? Helmut

On Wed, Feb 2, 2011 at 5:01 AM, Helmut Eller <heller@common-lisp.net> wrote:
Sorry for the delay in responding.
i is already reserved for the inferior lisp buffer. Yes, my reasoning was that the inspector is actually used more often.
Maybe p for insPector? Sure. One might just as well ask, "Why not f for inFerior?" :P "I" for Inspector seems like a more reasonable mnemonic.
Why is
(def-slime-selector-method ?p "Select the inspector buffer." (slime-buffer-name :inspector))
not enough?
Well, first off it is worth noting that the above verbosity is as equally broken as the more terse solution you suggest. The problem is that switching to the inspector may cause weird behaviour depending on what is/isn't already in the inspector. What I was trying to accomplish was to move forward/backward in the slime inspector stack if we land in an empty inspector buffer... I don't find a good solution for this given Emacs' current inability to manage window state/positioning/history reasonably :( It would seem that Attila's addition of PRESERVE-WINDOW-CONFIG for `slime-selector' is an attempt at addressing similiar such concerns.
Helmut
-- /s_P\
participants (3)
-
Attila Lendvai
-
Helmut Eller
-
MON KEY