From: piscesboy on
On Mar 21, 4:20 pm, "vanekl" <va...(a)acd.net> wrote:
> "piscesboy" <oraclmas...(a)gmail.com> wrote in message
>
> news:82e45de4-f618-4328-91fc-4c30eddbc9af(a)l25g2000yqd.googlegroups.com...
>
>
>
> >I have slime installed on Mac OS X 10.6.2 and have downloaded the
> > hyperspec and placed it in directory:
>
> > /Library/Application Support/Lisp/Hyperspec-7-0/
>
> > I tried configuring slime to open up the hyperspec inside the emacs
> > session whenever I am in lisp mode and type m-x hyperspec-lookup. This
> > is supposed to open up a w3m browser to view the hyperspec page.
>
> > Here is what my .emacs file looks like:
>
> > ;file start
>
> > (add-to-list 'load-path "/opt/local/share/emacs/site-lisp/slime")
> > (require 'slime-autoloads)
>
> > (setq slime-lisp-implementations
> >     `((clisp ("/opt/local/bin/clisp" "-q"))
> >        (ccl ("/opt/local/bin/ccl"))))
>
> > (add-hook 'lisp-mode-hook
> >           (lambda ()
> >             (cond ((not (featurep 'slime))
> >                    (require 'slime)
> >                    (normal-mode)))))
>
> > (eval-after-load "slime"
> >   '(slime-setup '(slime-fancy slime-banner)))
>
> > (setq common-lisp-hyperspec-root "file:/Library/Application Support/
> > Lisp/HyperSpec-7-0")
> > (require 'w3m-load)
> > (require 'w3m)
>
> > ;file end
>
> > As you can see, clisp and ccl are my two default lisps, and the
> > hyperspec is installed in its directory. I use emacs-w3m web browser
> > to try and open the hyperspec.
>
> > But when I am in lisp mode editing a file and I type:
>
> > m-x hyperspec-lookup
>
> > then the symbol name, nothing happens.
>
> Hyperspec lookup is not performed by either of your CL programs (ccl or
> clisp), but by Emacs Lisp, so you don't need to spend time trying to make CL
> work.
>
> I don't use w3m so I can't help there. I assume you have tested w3m and know
> it works, and have tried setting your default browser to something other
> than w3m. I'm also assuming you have a recent version of slime.
>
> Do you have a slime/hyperspec.el file?

Yes I do. /opt/local/share/emacs/site-lisp/slime/hyperspec.el

>
> Try doing a,
>     M-: common-lisp-hyperspec-symbols
>
>  You should see a list of lisp symbols below the mode line/status bar.
>  If not, your hyperspec.el file is probably not loading.

This is what I get when I type

M-: common-lisp-hyperspec-symbols

[type-error-datum time warn restart-name vector values vector-pop
trace stream-error-stream unless \
the y-or-n-p ...]



>
> Try doing a,
>      M-x browse-url<rtn>http://www.google.com/
>
>  It should open your browser if it is an external program.
>   (not sure what affect it would have with w3m.)
>   [http://www.emacswiki.org/emacs/BrowseUrl]

Doing M-x browse-url<return>http://www.google.com/
opens the URL in Firefox (my default browser).

>
> Is your browswer in your path (if you are using an external program such as
> safari)?
> Will it start from the command line and from within emacs shell?
> What happens when you do a M-x
> shell<return>firefox-or-safari-or-another-external-browser

When I type M-x shell<return>firefox-or-safari-or-another-external-
browser

I get:

bash: firefox-or-safari-or-another-external-browser: command not found



>
> Evaluate:
> M-: common-lisp-hyperspec-root
>
>  Is this variable pointing to the right http location?
>   I have mine set to,
>    "http://www.lispworks.com/documentation/HyperSpec/"
>    [careful about the capitalization; some web sites, such as lispworks.com,
> are case sensitive]
>
>  The typical web browser does not know how to handle the following
> single-slash protocol (it's missing two slashes):
>   "file:/Libr...
>  Instead, it should be:
>   "file:///Libr...
>  [http://en.wikipedia.org/wiki/File_URI_scheme#Meaning_of_slash_character]
>  Not sure about w3m, though.

Yes, I corrected the common-lisp-hyperspec-root to:
"file:///Library/Application Support/Lisp/HyperSpec-7-0/Hyperspec/"

>
> What happens when you try,
>
> M-:
> (browse-url "file:///Library/Application
> Support/Lisp/HyperSpec-7-0/Body/f_car_c.htm")

When I try:

M-: (browse-url "file:///Library/Application Support/Lisp/
HyperSpec-7-0/HyperSpec/Body/f_car_c.htm")


It opens up the page in Firefox (my default browser). But I want it to
open within the terminal window in the w3m browser plugin for emacs.

>
> Can you do a,
>
>   M-: (common-lisp-hyperspec "car")
>
>  your browser should open on the CL 'car' page.

Yes I can. Yes it does.


>
> You can try explicitly setting your browser to something other than w3m.
> If you have firefox installed, in the *scratch* buffer, try evaluating this:
>   (setq browse-url-browser-function 'browse-url-firefox
>           browse-url-new-window-flag t
>           browse-url-firefox-new-window-is-tab t)
> and then see if hyperspec-lookup works.
>
> I hope at least one of the suggestions helped, but since I'm more of a
> Linux/Windows guy I probably don't have anything more to add if you remain
> stuck.
From: vanekl on
piscesboy wrote:
> On Mar 21, 4:20 pm, "vanekl" <va...(a)acd.net> wrote:
>> "piscesboy" <oraclmas...(a)gmail.com> wrote in message
>> Can you do a,
>>
>> M-: (common-lisp-hyperspec "car")
>>
>> your browser should open on the CL 'car' page.
>
> Yes I can. Yes it does.
>
>> I hope at least one of the suggestions helped, but since I'm more of
>> a Linux/Windows guy I probably don't have anything more to add if
>> you remain stuck.

Everything seems like it's working except for the integration of w3m. Since
I'm not a w3m user I'm not going to be much help there. But at least the
lisp backend is working properly. Maybe somebody else in this group knows
w3m, or the emacs group can help with setting up w3m to work with
browse-url.


From: vanekl on
vanekl wrote:
> piscesboy wrote:
>> On Mar 21, 4:20 pm, "vanekl" <va...(a)acd.net> wrote:
>>> "piscesboy" <oraclmas...(a)gmail.com> wrote in message
>>> Can you do a,
>>>
>>> M-: (common-lisp-hyperspec "car")
>>>
>>> your browser should open on the CL 'car' page.
>>
>> Yes I can. Yes it does.
>>
>>> I hope at least one of the suggestions helped, but since I'm more of
>>> a Linux/Windows guy I probably don't have anything more to add if
>>> you remain stuck.
>
> Everything seems like it's working except for the integration of w3m.
> Since I'm not a w3m user I'm not going to be much help there. But at
> least the lisp backend is working properly. Maybe somebody else in
> this group knows w3m, or the emacs group can help with setting up w3m
> to work with browse-url.


This page describes how to set up w3m with browse-url:
http://www.emacswiki.org/emacs/emacs-w3m

see Basic Setup:
(setq browse-url-browser-function 'w3m-browse-url)


From: piscesboy on
On Mar 21, 6:24 pm, "vanekl" <va...(a)acd.net> wrote:
> vanekl wrote:
> > piscesboy wrote:
> >> On Mar 21, 4:20 pm, "vanekl" <va...(a)acd.net> wrote:
> >>> "piscesboy" <oraclmas...(a)gmail.com> wrote in message
> >>> Can you do a,
>
> >>> M-: (common-lisp-hyperspec "car")
>
> >>> your browser should open on the CL 'car' page.
>
> >> Yes I can. Yes it does.
>
> >>> I hope at least one of the suggestions helped, but since I'm more of
> >>> a Linux/Windows guy I probably don't have anything more to add if
> >>> you remain stuck.
>
> > Everything seems like it's working except for the integration of w3m.
> > Since I'm not a w3m user I'm not going to be much help there. But at
> > least the lisp backend is working properly. Maybe somebody else in
> > this group knows w3m, or the emacs group can help with setting up w3m
> > to work with browse-url.
>
> This page describes how to set up w3m with browse-url:http://www.emacswiki.org/emacs/emacs-w3m
>
> see Basic Setup:
> (setq browse-url-browser-function 'w3m-browse-url)

Thanks! That did the trick.
From: Otto Diesenbacher on
"vanekl" <vanek(a)acd.net> writes:

> vanekl wrote:
>> piscesboy wrote:
[...]
>> Everything seems like it's working except for the integration of w3m.
>> Since I'm not a w3m user I'm not going to be much help there. But at
>> least the lisp backend is working properly. Maybe somebody else in
>> this group knows w3m, or the emacs group can help with setting up w3m
>> to work with browse-url.
>
>
> This page describes how to set up w3m with browse-url:
> http://www.emacswiki.org/emacs/emacs-w3m
>
> see Basic Setup:
> (setq browse-url-browser-function 'w3m-browse-url)

Additional hints are shown by Bill Clementson on his blog:
http://bc.tech.coop/blog/070208.html

Especially only opening specific stuff in w3m and still default to your
standard-browser:

(setq browse-url-browser-function
'(("hyperspec" . w3m-browse-url)
("weitz" . w3m-browse-url)
("." . browse-url-default-macosx-browser)))

br
okflo