From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ChristopherMBalz@StanfordAlumni.org (Christopher M. Balz) Newsgroups: gmane.emacs.help Subject: Re: w3m gives 'Wrong type argument: stringp, nil" error Date: 5 Jun 2003 12:28:10 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <343aeada.0306051128.2a691cc6@posting.google.com> References: <343aeada.0306031339.15e390bb@posting.google.com> <343aeada.0306040835.ad5b36f@posting.google.com> <343aeada.0306042019.3ede2c7e@posting.google.com> NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1054841833 11993 80.91.224.249 (5 Jun 2003 19:37:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2003 19:37:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 05 21:37:03 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19O0Xm-00036I-00 for ; Thu, 05 Jun 2003 21:37:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19O0RK-00076x-05 for gnu-help-gnu-emacs@m.gmane.org; Thu, 05 Jun 2003 15:30:22 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 158 Original-NNTP-Posting-Host: 158.252.241.20 Original-X-Trace: posting.google.com 1054841291 4670 127.0.0.1 (5 Jun 2003 19:28:11 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 5 Jun 2003 19:28:11 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:114185 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10679 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10679 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 wrote in message news:... > 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 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).