help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: w3m gives 'Wrong type argument: stringp, nil" error


From: Christopher M. Balz
Subject: Re: w3m gives 'Wrong type argument: stringp, nil" error
Date: 5 Jun 2003 12:28:10 -0700

It's working now with http:// urls!  The problem was as we suspected,
that Emacs-w3m was not finding w3m.exe.  I had a symbolic link in
C:\cygwin\usr\local\bin\ to the location of w3m.exe, and that wouldn't
execute from Emacs, although my Emacs is set to interoperate with
Cygwin, and although my Cygwin will run w3m just fine from the
symbolic link.

So I just did the following (a modification of your similar command):

  (setq w3m-command (concat "c:/Program
Files/emacs/site/w3m-0.4.1/w3m.exe" ""))

I also had to put the above line before the "load-library" statements.

I don't know Lisp really but there must be a more elegant way to set
w3m-command than concatenating a string to an empty string (!) as I do
above.

Finally, does anyone know how to point w3m to its cgi, or, more
generally, how to just get it to work with local files?  My main
motivation for using w3m is to access Javadoc and other types of HTML
doc very fast -- it works g-r-r-reat for that as an Emacs HTML
browser.  But when I try to browse a local file directory, I get
"Cannot load c:/usr/local/lib/w3m/dirlist.cgi" or "Cannot retrieve
URL".

I am using the same Emacs ( GNU Emacs 21.3.1 (i386-msvc-nt5.0.2195) )
and w3m as you are:

~/w3m -version
w3m version w3m/0.4.1, options
lang=en,image,color,mouse,menu,cookie,external-uri-loader,w3mmailer,nntp,gopher,alarm,mark
 TLSWE-LAPTOP-A0  Thu Jun 05 11:33:23
~/

Thanks so much!  It is really exciting to be able to browse HTML doc
from inside Emacs.

   - CB

Chris McMahan <cmcmahan+n@one.net> wrote in message 
news:<u65nk1sn6.fsf@one.net>...
> Hmmm....
> 
> I'm using emacs-21.3.1 on Windows XP (no image support version). 
> 
> In response to your message, I downloaded the latest version of
> w3m (0.4.1) and compiled it with the cygwin libraries on my system.
> 
> On starting emacs w3m, everything still seems to be working, so
> it's not the version of w3m you're using.
> 
> Here are my w3m settings... maybe these might help. CYGWIN_DIR is a
> constant I've set in my .emacs to point to the root level of the
> cygwin distribution (c:/Utils/cygwin in my case)
> 
> ;;;======================================================================
> ;;; w3m browser mode:
> ;;;======================================================================
> ;;; integrates the external program w3m with emacs. A fast replacement
> ;;; for w3, at least until w3 is updated
> (load-library "w3m")
> 
> ;;; need to load the search to change the search-engine-alist without
> ;;; using customize, since there appears to be no hook into the
> ;;; w3m-search function to activate
> (load-library "w3m-search")
> 
> (setq w3m-command (concat CYGWIN_DIR "/usr/local/bin/w3m"))
> 
> ;;; use programs contributed with the w3m distribution
> (autoload 'w3m-find-file "w3m" "w3m interface function for local file." t)
> ;(autoload 'w3m-search "w3m-search" "Search QUERY using SEARCH-ENGINE." t)
> (autoload 'w3m-weather "w3m-weather" "Display weather report." t)
> (autoload 'w3m-antenna "w3m-antenna" "Report change of WEB sites." t)
> (autoload 'w3m-namazu "w3m-namazu" "Search files with Namazu." t)
> 
> ;;; causes the return key to submit a form
> (setq w3m-use-form t)
> 
> ;;; for a list of available engines, or to add a search engine, see
> ;;; the variable 'w3m-search-engine-alist' defined in w3m-search.el.
> ;;; It's set in the customization section at the end of this file
> (add-to-list 'w3m-search-engine-alist
>   '("google" "http://www.google.com/search?num=30&q=%s"; nil))
> (add-to-list 'w3m-search-engine-alist
>   '("google-groups" "http://groups.google.com/groups?num=30&q=%s"; nil))
> (add-to-list 'w3m-search-engine-alist
>   '("teo" "http://www.teoma.com/search.asp?t=%s"; nil))
> 
> ;;; set the default search engine
> (setq w3m-search-default-engine "google")
> 
> ;;; external browser in which to view pages/graphics
> (if (eq window-system 'w32)
> (setq w3m-content-type-alist
>       '(("text/plain" "\\.\\(txt\\|tex\\|el\\)" nil)
>               ("text/html" "\\.s?html?$" w32-shellex-on-object file)
>               ("image/jpeg" "\\.jpe?g$"  w32-shellex-on-object file)
>               ("image/png" "\\.png$"     w32-shellex-on-object file)
>               ("image/gif" "\\.gif$"     w32-shellex-on-object file)
>               ("image/tiff" "\\.tif?f$"  w32-shellex-on-object file)
>               ("image/x-xwd" "\\.xwd$"   w32-shellex-on-object file)
>               ("image/x-xbm" "\\.xbm$"   w32-shellex-on-object file)
>               ("image/x-xpm" "\\.xpm$"   w32-shellex-on-object file)
>               ("image/x-bmp" "\\.bmp$"   w32-shellex-on-object file)
>               ("video/mpeg" "\\.mpe?g$"  w32-shellex-on-object file)
>               ("video/quicktime" "\\.mov$" w32-shellex-on-object file file)
>               ("application/postscript" "\\.\\(ps\\|eps\\)$" 
> w32-shellex-on-object file)
>               ("application/pdf" "\\.pdf$" w32-shellex-on-object file))
>         ))
> 
> 
> - Chris McMahan
> 
> 
> ChristopherMBalz@StanfordAlumni.org (Christopher M. Balz) writes:
> 
> > Well I did find those build instructions and now w3m v0.4.1 runs great
> > from a plain Cygwin shell. But, I noticed that while w3m_el-1.2.8
> > claims to run with the latest w3m, it actually needs w3m v0.3 (see
> > below).
> > 
> > I am still getting the same error as before, although I can see
> > relevant packages loading when on a fresh run of Emacs I enter
> > w3m-browse-url.  I doubt that a basic command line parameter would
> > change from 0.3 to 0.4.1, but it seems that some kind of argument to a
> > function is amiss.
> > 
> > It would be great to be able to browse Javadoc and other HTML doc with
> > a web browser inside Emacs!  Do you think that the problem is the
> > mismatch between w3m_el and w3m?
> > 
> > From README at c:/Program Files/emacs/site/w3m_el-1.2.8/  ->
> > 
> > 4. Version of w3m
> > 
> >    Because this program is sensitive to version of w3m, the latest
> >    version of w3m should be used.  Its latest official version is 0.3,
> >    which is released at March 6th, 2002.  Its source can be downloaded
> >    from:
> > 
> >       http://prdownloads.sourceforge.net/w3m/w3m-0.3.tar.gz
> > 
> > 
> > 
> > Kevin Rodgers <ihs_4664@yahoo.com> wrote in message 
> > news:<3EDE270D.7080302@yahoo.com>...
> > > [Please don't top-post: ]
> > > 
> > > Christopher M. Balz wrote:
> > > 
> > > > Do you know where to find English instructions for compiling w3m?
> > > 
> > > Well, the README file in the source distribution says:
> > > 
> > >   If you can read English, see doc/*.
> > > 
> > > And sure enough, the doc/README file has a section on Installation that 
> > > refers
> > > Windows users to the doc/README.cygwin file (attached).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]