[slime-devel] Re: Hyperspec lookups with w3m in Slime
Håkon Alstadheim
hakon at alstadheim.priv.no
Sat Jul 17 08:24:36 UTC 2004
In message <hcs1xjcgdm9.fsf at faun.nada.kth.se>, Björn Lindberg writes:
[...snip...]
>And now it works like this: If there is only one window, split into
>two, and pop up the hyperspec in the newly created one. Otherwise if
>there is more than one window, pop up the hyperspec in the other
>window.
>
>It sort of works the way I had in mind, so I'm going to try it for a
>while, although now I'm thinking that I'd like to have it check for
>other frames too, and if present open the hyperspec in another frame
>instead. I suspect the "right" behaviour for these things depend a lot
>on how you use Emacs, ie how many frames and windows you use, and
>wether you use the same emacs session for both Slime as well as other
>activities.
>
I also have a solution I use. Mine opens the hyperspec in a new window
if w3m has no buffers open, otherwise it uses the already existing w3m
buffer and window. I explicitly turn pop-up-frames OFF. Combine that
with the previous suggestions, and you should be closer to the
"ideal".
---
(require 'w3m)
(defun w3m-browse-url-other-window (url &optional newwin)
(interactive
(browse-url-interactive-arg "w3m URL: "))
(let ((pop-up-frames nil))
(switch-to-buffer-other-window
(w3m-get-buffer-create "*w3m*"))
(w3m-browse-url url)))
;; The ftp stuff is irrelevant for this discussion. I left it in anyhow.
(setq browse-url-browser-function
(list (cons "^ftp:/.*" (lambda (url &optional nf)
(call-interactively #'find-file-at-point url)))
(cons "." #'w3m-browse-url-other-window)))
--
Håkon Alstadheim / 7510 Skatval / tlf +47 74 82 60 27
More information about the slime-devel
mailing list