all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* w3m gives 'Wrong type argument: stringp, nil" error
@ 2003-06-03 21:39 Christopher M. Balz
  2003-06-03 21:45 ` Chris McMahan
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher M. Balz @ 2003-06-03 21:39 UTC (permalink / raw)


Running GNU Emacs 23.3.1 on Windows 2000.  I'm trying to use w3m via
emacs_w3m.  Every time I enter an M-x w3m- command, or just M-x w3m, I
get the

    'Wrong type argument: stringp, nil" error 

I think the problem is because w3m is not installed as an executable
on my system.  In the w3m doc, under installation, all there is is "No
problem. :)".  Oddly, I can't seem to find anything that resembles the
bona fide w3m executable.  Anyone know where the executable is and
what it is named?

Installation of emacs_w3m (v1.3.3) went just fine (I had to create a
couple directories, but that worked just fine).  Here is the
installation from a DOS prompt:

C:\Program Files\emacs\emacs-21.3\bin>emacs -batch -q -no-site-file -l
 c:/Progra~1/emacs/site/emacs-w3m-1.3.3/w3mhack.el NONE -f
w3mhack-nonunix-install
emacs -batch -q -no-site-file -l 
c:/Progra~1/emacs/site/emacs-w3m-1.3.3/w3mhack.el NONE -f
w3mhack-nonunix-install
 `fns-21.3.1.elc' is up to date
cp fns-21.3.1.el c:/Program Files/emacs/site-lisp/w3m/fns-21.3.1.el
cp fns-21.3.1.elc c:/Program Files/emacs/site-lisp/w3m/fns-21.3.1.elc

C:\Program Files\emacs\emacs-21.3\bin>

All my packages are up to date, and my .emacs file is below (to find
all related to 'w3m', just search on 'w3').

;; This is a web programmer's .emacs file for GNU Emacs.
;; It has been tested on GNU Emacs version 21.3.1 on Windows 2000, 
;; Service Pack 3.	 
;;
;; The GNU Emacs Homepage is located at: 
;;             http://www.gnu.org/directory/GNU/emacs.html
;;
;; This Document Last Modified: 06/03/2003.
;;
;; Portability: It would take minimal or no changes to port it to run
on Unix;
;; the one major change definitely needed would be to remove the
"cygwin"-related
;; code, since that is only for putting the BASH shell on Windows.
;;
;; @author: Christopher M. Balz.
;;          Feel free to e-mail me regarding this file at any of the
addresses below:
;;          ChristopherBalz@yahoo.com
;;          ChristopherMBalz@StanfordAlumni.org

;; General Notes:  It is often said that a new Emacs user should stay
away from old, crusty
;;                 '.emacs' files from others.  However, the only way
that I ever was able
;;                 to get a reasonable return on the investment of my
time put into setting
;;                 up my Emacs configurations was by borrowing code
snippets from others.
;;                 It is true that no '.emacs' file should be used
uncritically, by newbie or
;;                 by others.  
;;               
;;                 However, for the best user base, new users should
be able to
;;                 fairly easily clip out sections of '.emacs' files
that interest them and put
;;                 them to use right away in their own '.emacs' files.
 To this end, I have
;;                 attempted to effectively segment the various
independent components of this
;;                 '.emacs' file and have documented what I have done
as clearly as possible.
;;                 It's very exciting how Emacs modes related to
software engineering for the
;;                 web are maturing.  
;;     

;; ------------   Invocation of Gnu Emacs on Win2K: 
;;
;;    From Windows shortcut icon with these properties on shortcut's
'Properties' menu:
;;        'Target': 
;;           "C:\Program Files\emacs\emacs-21.3\bin\runemacs.exe" -l
~/.emacs
;;         'Start in' (Note: I use Cygwin, see below):
;;           C:/cygwin/home/Administrator/
;;
;;    Set user-specific 'HOME' environment variable to
'C:/cygwin/home/Administrator', which is
;;    the directory in which my '.emacs' file is located.  Do this by
going to the Control Panel,
;;    then to 'System', then to 'Advanced', then to 'Environment
Variables', the to 'Variables
;;    for <user>'. 

;; ------------  Commense lisping:

;; Add the site directory (the site directory is used to contain
non-core Emacs Lisp packages)
;; to the Emacs load-path.  The Emacs load-path is 
;; the list of directories where Emacs searches for packages that you
require.
;; This must be at the head of your .emacs file.  This code prepends
the site directory to the load path:
;; Standard emacs lisp access (for non-byte-compiled access):
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/emacs-21.3/site-lisp/"))
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/emacs-21.3/site/lisp/progmodes/"))
;; System-wide emacs customizations:
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site/"))
;; Personal emacs/site:
(add-to-list 'load-path (expand-file-name "~/emacs/site/")) 
;; So that Emacs can find the home directory files (desktop, etc.):
(add-to-list 'load-path (expand-file-name "~/")) 
;; Specific Packages:
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site/eieio-0.17/"))
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site/semantic-1.4.4/"))
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site/speedbar-0.14beta4/"))
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site/elib-1.0/"))
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site/psgml-1.2.5/"))
;;        For Emacs JDE (from http://sunsite.dk/jde/):
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site/jde-2.3.2/lisp/"))
;; For the Emacs Web Browser:
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site/emacs-w3m-1.3.3/"))
(add-to-list 'load-path (expand-file-name "C:/Program
Files/emacs/site-lisp/w3m/"))

;; On Windows 2000, it is sufficient to set the user-specific 'HOME'
environment
;; variable (see above) to the path to your .emacs file.  For example,
mine goes to:
;; 'C:/cygwin/home/Administrator'.  Most other systems should have a 
;; reasonably sane approach to doing this.  These approaches are best.
;; However, if on some other system you have
;; trouble saving your customizations (meaning, the customizations
possible
;; through the command ESC-x customize-group, and meaning, the error
message
;; 'saving settings from 'emacs -q' would overwrite customizations'),
;; explicitly assigning the 'user-init-file' variable is a sure-fire
way
;; to avoid the problem:
;; (setq user-init-file (expand-file-name "~/.emacs")
;;        custom-file (expand-file-name "~/.emacs"))


;; For use of Bash shell via Cygwin on Windows 2000 (or NT), available
from:
;;	     http://www.cygwin.com/
;; (if you do not have Cygwin installed, comment all of this section
out).
	;; This assumes that Cygwin is installed in C:\cygwin (the
	;; default) and that C:\cygwin\bin is not already in your
	;; Windows Path (it generally should not be).
        ;;
	(setq exec-path (cons "C:/cygwin/bin" exec-path))
	(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
	;;
	;; NT-emacs assumes a Windows command shell, which you change
	;; here.
	;;
	(setq process-coding-system-alist '(("bash" . undecided-unix)))
	(setq w32-quote-process-args ?\")
	(setq shell-file-name "bash")
	(setenv "SHELL" shell-file-name) 
	(setq explicit-shell-file-name shell-file-name) 
;; End of bash shell use via Cygwin section.

;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
;;
(add-hook 'comint-output-filter-functions
	  'comint-strip-ctrl-m)

;; Set start-up directory with cygwin nomenclature 
;; (your configuration files _must_ be in this directory):
(setq startup-directory "C:/cygwin/home/Administrator/")

;; generic-x.el is a standard package with Emacs 21.  It contains some
;; very neat little modes, such as a JavaScript mode (but said mode
;; is not yet as good as c-mode for JavaScript, for it does not 
;; recognize /*-style comments.
;; All modes supported by generic-x.el are automatically applied
;; unless overridden below (for example, JavaScript mode is overridden
;; below).
(require 'generic-x)


;; -------- JDE is the Java IDE for Emacs.
(require 'jde)
;; Use no tabs when editing Java for cross-editor indentation
compatibility.
(defun my-jde-indent-setup ()
  (setq indent-tabs-mode nil)
  (setq jde-basic-offset 4))
;;
;; Add the above hook to the jde-mode.
(add-hook 'jde-mode-hook 'my-jde-indent-setup)


;; -------- Begin w3m Section (HTML browser) 
(autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
(autoload 'w3m-find-file "w3m" "w3m interface function for local
file." t)
(autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." 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)
(setq w3m-icon-directory "c:/Program
Files/emacs/site/emacs-w3m-1.3.3/icons"
      w3m-search-default-engine "google"
      w3m-display-inline-image nil
      w3m-use-form t
      w3m-coding-system 'iso-8859-1
      w3m-input-coding-system 'iso-8859-1
      w3m-terminal-coding-system 'iso-8859-1
      w3m-output-coding-system 'iso-8859-1
      w3m-arrived-file-coding-system 'iso-8859-1
      w3m-mailto-url-function 'gnus-summary-mail-other-window
      w3m-default-save-directory "~/w3m/")

;; -------- End w3m Section (HTML browser) 

;; -------- Begin JavaScript editing section. -------- 

;; This is my way of loading c-mode and hooking .js files to it, 
;; not superseded by the JavaScript mode in generic-x.el (see above).
(autoload 'c-mode "cc-mode.el")
(setq auto-mode-alist (cons '("\\.js$" . c-mode) auto-mode-alist))
;; This is the container for my custom js editing mode  
;; It uses no tabs for cross-editor compatibility.
(defun my-js-indent-setup ()
  (setq indent-tabs-mode nil)
  (setq c-basic-offset 4))
;;
;; Add the above hook to the c-mode.
(add-hook 'c-mode-hook 'my-js-indent-setup)

;; -------- End JavaScript editing section. -------- 


;; -------- Begin XML and SGML Editing Section --------  
;;
;; -> Note: this handles HTML also but 
;; a formal DTD declaration is needed for that.  Instead, I use
;; html-helper-mode, which handles embedded scripts as well.
;; -> From: http://www.lysator.liu.se/~lenst/about_psgml/
;; -> Environment Variable Must be set for dtd feature to work:
;; PSGML needs to know where to find the SGML catalog files. There are
a couple
;;  of ways to accomplish this, as described in the PSGML
documentation. I use the method
;;  that makes use of the environment variable SGML_CATALOG_FILES
because it is
;;  also used by the SGML parser (patience, I come to it in the next
section of this article).
;;  So, now that you have a set of DTDs and a catalog file, create the
afore-mentioned
;; environment variable and set it to include the path to your
xhtml1.soc file, for
;; example d:\DTDs\xhtml1\xhtml1.soc. If you have more that one
catalog file,
;; you can include them all, separating them with a path delimiter
(";" on Windows,
;; ":" on UNIX-based systems).
;; Here is my value: c:\Program
Files\dtds\xhtml1\xhtml1.soc;c:\Program
Files\dtds\hodmacro\hodmacro.soc

(require 'sgml-mode "psgml.el" "Major mode to edit SGML files.")
(autoload 'xml-mode "psgml.el" "Major mode to edit XML." t)
(setq auto-mode-alist 
      (append '(
		("\\.sgml$" . sgml-mode)
		("\\.idd$" . sgml-mode)
		("\\.ide$" . sgml-mode)
		("\\.xml$" . xml-mode)
		("\\.xsl$" . xml-mode)
		("\\.fo$" . xml-mode)
		)
	      auto-mode-alist
	      )
      )

; Auto-activate parsing the DTD when a document is loaded.
; If this isn't enabled, syntax coloring won't take affect until
; you manually invoke "DTD->Parse DTD"
(setq sgml-auto-activate-dtd t)

;;; Set up my "DTD->Insert DTD" menu.

(setq sgml-custom-dtd '
      (
       ( "DITA concept"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE concept SYSTEM \"concept.dtd\">"
)
       ( "DITA task"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE task SYSTEM \"task.dtd\">" )
       ( "DITA reftopic"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE reftopic SYSTEM
\"reftopic.dtd\">" )
       ( "DITA APIdesc"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE APIdesc SYSTEM \"apidesc.dtd\">"
)
       ( "DITA topic"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE topic SYSTEM \"ditabase.dtd\">"
)
       ( "HOD Script"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE HASCRIPT SYSTEM
\"HAScript.dtd\">" )
       ( "XHTML 1.0 Strict"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
1.0 Strict//EN\" \"xhtml1-strict.dtd\">" )
       ( "XHTML 1.0 Transitional"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
1.0 Transitional//EN\" \"xhtml1-transitional.dtd\">" )
       ( "XHTML 1.0 Frameset"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
1.0 Frameset//EN\" \"xhtml1-frameset.dtd\">" )
       ( "HTML 4.01 Transitional"
	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
)
       ( "HTML 4.01 Strict"
	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">" )
       ( "HTML 4.01 Frameset"
	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">" )
       ( "IBMIDDoc"
	 "<!DOCTYPE ibmiddoc PUBLIC \"+//ISBN 0-933186::IBM//DTD
IBMIDDoc//EN\" [\n]>")
       ( "DOCBOOK XML 4.1.2"
	 "<?xml version=\"1.0\"?>\n<!DOCTYPE book PUBLIC \"-//OASIS//DTD
DocBook XML V4.1.2//EN\"
\"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd\" [\n]>")
       )
)

(define-key sgml-mode-map "\C-i" 'sgml-insert-element)
; override default validate command to utilize OpenSP's onsgmls
executable
(setq sgml-validate-command "onsgmls -s %s %s")
; override default xml-mode validate command to utilize OpenSP's
onsgmls
; executable by using a mode-hook, since there appears to be no other
means
; to accomplish it.  
(defun my-psgml-xml-hook ()
  (setq sgml-validate-command "onsgmls -s %s %s")
  (setq sgml-declaration "C:\Program
Files\openjade-1.3.1\pubtext\xml.dcl")
)
(add-hook 'xml-mode-hook 'my-psgml-xml-hook)
            

;; -- End psgml / xml section -------- 


;; --- Begin HTML editing section: 
;; I require html helper mode because the hhm-config.el code seems to 
;; cause an error if I have both autoloaded.
(require 'html-helper-mode "html-helper-mode.el")
(autoload 'html-helper-mode "hhm-config.el")
(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode)      
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.asp$" . html-helper-mode)       
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.phtml$" . html-helper-mode)     
auto-mode-alist))
;; --- End HTML editing section.


;; ----- CSS mode. 
;; This is for the css-mode (will not be necessary in later versions;
it should
;; be in the css-mode code itself):
(require 'apropos)  

;; For css-mode: (from http://synthcode.com/emacs/lang/css-mode.el )
;; Note: I've had crashing in this mode when I use an M-x
indent-region
;;       command.
(autoload 'css-mode "css-mode.el")
 (setq auto-mode-alist	     
      (cons '("\\.css$" . css-mode) auto-mode-alist))
;; ----- End CSS mode.


;; Make sure that .emacs file is edited in lisp mode:
(setq auto-mode-alist (cons '("\.emacs" . lisp-mode)       
auto-mode-alist))


;; ----- Diary and Appointment Notification Section.
;; There are also some variables set via the Emacs Customization
Utility.
;; See the end of the file for those.
;; Read the diary:
(diary) 

;; Fancy display for Calendar
;; Here is some code to make your calendar and diary display fancier:
 (setq view-diary-entries-initially t
       mark-diary-entries-in-calendar t
       number-of-diary-entries 7)
 (add-hook 'diary-display-hook 'fancy-diary-display)
 (add-hook 'today-visible-calendar-hook 'calendar-mark-today)

;; Show column number on mode line.
(column-number-mode t)
;; Show time on mode line, and set appointment notification.
;; (day-and-date)
(display-time)
(add-hook 'diary-hook 'appt-make-list)
(diary 0)

;; Special function to make appointments work:
(defun update-my-calendar ()
  (let ((diary-buffer (get-file-buffer diary-file))
        (number-of-diary-entries 30))
    (if diary-buffer
        (progn
          (set-buffer diary-buffer)
          (revert-buffer t t)))
    (calendar)))

;; Enable syntax coloring.
(global-font-lock-mode t)

(setq-default transient-mark-mode t)

;; Global key maps:
(global-set-key "\C-b" 'browse-url-of-file)
(global-set-key "\e/" 'replace-regexp)
(global-set-key "\C-xtl" 'goto-line)
(global-set-key "\e[" 'enlarge-window)
(global-set-key "\e]" 'shrink-window)
(global-set-key "\e=" 'eval-current-buffer)

;; These two key bindings are for up and down scrolling by a either
single line at a time
;; or by N lines at a time (default is scroll by one single line at a
time).  This is
;; very useful when working with narrow horizontal windows.  ;~)
;; To enter the desired N, hold down \C and type the number and then
hit z or q, all the
;; while holding down \C.
;; From the "Writing GNU Emacs Extensions" book, by Bob Glickstein.
(defun scroll-n-lines-up (&optional n) 
  "Scroll up N lines (1 line by default)."
  (interactive "P")
  (scroll-up (prefix-numeric-value n)))

(defun scroll-n-lines-down (&optional n) 
  "Scroll down N lines (1 line by default)."
  (interactive "P")
  (scroll-down (prefix-numeric-value n)))

(global-set-key "\C-q" 'scroll-n-lines-up)
(global-set-key "\C-z" 'scroll-n-lines-down)


;; These two bindings make it easier to find a mismatched parenthesis:
(global-set-key "\e'" 'forward-sexp)
(global-set-key "\e;" 'backward-sexp)

;;; Bracket/brace/parentheses highlighting:
   ;; The following is the command for Emacs 20.1 and later:
(show-paren-mode 1)
   ;; * Here is some Emacs Lisp that will make the % key show the
matching
   ;; parenthesis, like in vi.	In addition, if the cursor isn't over a
   ;; parenthesis, it simply inserts a % like normal.  (`Parenthesis'
actually
   ;;  includes and character with `open' or `close' syntax, which
usually means
   ;;  "()[]{}".)

      ;; By an unknown contributor

      (global-set-key "%" 'match-paren)

      (defun match-paren (arg)
	"Go to the matching parenthesis if on parenthesis otherwise insert
%."
	(interactive "p")
	(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
	      ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
	      (t (self-insert-command (or arg 1)))))



;; The following functions enable on-the-fly switching between the
bash shell and DOS:
(defun set-shell-bash()
  (interactive)
  ;; (setq binary-process-input t)
  (setq shell-file-name "bash")
  (setq shell-command-switch "-c")
  (setq explicit-shell-file-name "bash")
  (setenv "SHELL" explicit-shell-file-name)
  (setq explicit-sh-args '("-login" "-i"))
  (setq w32-quote-process-args ?\")
  (setq mswindows-quote-process-args t)
  )

(defun set-shell-cmdproxy()
  (interactive)
  (setq shell-file-name "cmdproxy")
  (setq explicit-shell-file-name "cmdproxy")
  (setenv "SHELL" explicit-shell-file-name)
  (setq explicit-sh-args nil)
  (setq w32-quote-process-args nil)
  )

(global-set-key "\C-xg" 'set-shell-bash) ;; g for Gnu (\C-xb is used
for buffer switch command).
(global-set-key "\C-xd" 'set-shell-cmdproxy)
;; End shell-switch on-the-fly.


;; Begin move-to-window block:
;; This code is from the O'Reilly "GNU Emacs Extensions" book.
;; The purpose of it is to make a reasonable way to move to the next
OR previous window.
;; Change from C-x o to C-x n, so that we have Next and Previous.  
(global-set-key "\C-xn" 'other-window) 

;; We must make our own function to go to the previous window (but
it's simple):
(defun other-window-backward ()
  "Select the previous window."
  (interactive)
  (other-window -1))
;; Now we can bind to this function:
(global-set-key "\C-xp" 'other-window-backward)
;; End move to window block.

;; This turns on the buffer select list in the minibuffer to make it
easy to
;; edit any buffer in a given window or frame (C-r and C-s move
backwards and forwards, respectively,
;; through the buffer select list).
(require 'iswitchb)
(iswitchb-default-keybindings)

;; old: (setq show-paren-mode t)
;; old: (setq show-paren-style 'parenthesis)

;; Set a high recursion limit for parsing the long java files:
(setq max-specpdl-size 1000)

(put 'upcase-region 'disabled nil)

(put 'downcase-region 'disabled nil)

;; Adjust the colors and fonts to preference:
(set-default-font "Fixedsys")
(set-cursor-color "Deep Pink")
(set-face-foreground 'highlight "blue")
(set-face-background 'highlight "red")
(set-foreground-color "Green")
(set-background-color "Gray10")
(set-face-foreground 'custom-group-tag-face "Yellow")
(set-face-foreground 'custom-variable-tag-face "Magenta")
(set-face-foreground 'custom-state-face "Yellow")
(set-face-foreground 'font-lock-type-face "Goldenrod")
(set-face-foreground 'font-lock-comment-face "OrangeRed")
(set-face-foreground 'font-lock-function-name-face "Turquoise")
(set-face-foreground 'font-lock-keyword-face "Yellow")
(set-face-foreground 'font-lock-string-face "Magenta")
(set-face-foreground 'font-lock-variable-name-face "Coral")
(set-face-foreground 'modeline "yellow")
(set-face-background 'modeline "purple4") 
(set-face-background 'region "MidnightBlue")
(set-face-background 'secondary-selection "dodger blue")
(set-face-foreground 'diary-face "Yellow")
(set-face-background 'holiday-face "Pink")
(set-face-foreground 'holiday-face "Red")
(set-face-foreground 'widget-field-face "Sienna")
(set-face-foreground 'widget-single-line-field-face "Firebrick")
(set-face-foreground 'widget-inactive-face "White")
(set-face-foreground 'widget-documentation-face "Coral")
(set-mouse-color "yellow")

;; The following settings pertain to features that you may not have
installed on your GNU Emacs:
  ;; Begin speedbar section (Values set via Emac's 'Customize'
interface are found at the
  ;; bottom of the file, and hence if there is a 'conflict' they
override these values).
(set-face-foreground 'speedbar-directory-face "Green")
(set-face-background 'speedbar-directory-face "Black")
(set-face-foreground 'speedbar-highlight-face "DarkSlateGray")
(set-face-background 'speedbar-highlight-face "Gold")
(set-face-background 'speedbar-file-face "MidnightBlue")
(set-face-foreground 'speedbar-file-face "Gold")
(set-face-foreground 'speedbar-tag-face "Orange")
;; Set the speedbar pop-up window properties: Note that if the
speedbar height is too
;; great, the windowing-system's title bar for the 
;; speedbar window (at least on Windows2000) will not show completely.
(setq speedbar-frame-parameters '((width . 30)
								  (height . 45)
								  (foreground-color . "green")
								  (background-color . "black")))
  ;; End speedbar section. 

  ;; You may not want the following line if you do not have
paren-matching running:
(set-face-foreground 'show-paren-match-face "Red")
  ;; The following line is only if you have semantic installed:
;; doesn't work for semantic-1.4beta5 (set-face-foreground
'semantic-intangible-face "Gold")
  ;; The following line is only if you have the JDE installed:
(set-face-foreground 'jde-java-font-lock-link-face "Gold")

;;  ---------  This is SGML colorizing with the psgml package, loaded
above.

;;; Set up and enable syntax coloring. 
; Create faces  to assign markup categories.
(make-face 'sgml-doctype-face)
(make-face 'sgml-pi-face)
(make-face 'sgml-comment-face)
(make-face 'sgml-sgml-face)
(make-face 'sgml-start-tag-face)
(make-face 'sgml-end-tag-face)
(make-face 'sgml-entity-face)
(make-face 'sgml-attribute-face)

; Assign attributes to faces. 
(set-face-foreground 'sgml-doctype-face "yellow")
(set-face-foreground 'sgml-sgml-face "cyan1")
(set-face-foreground 'sgml-pi-face "magenta")
(set-face-foreground 'sgml-comment-face "purple")
(set-face-foreground 'sgml-start-tag-face "deep sky blue")
(set-face-foreground 'sgml-end-tag-face "white")
(set-face-foreground 'sgml-entity-face "orange")

; Assign faces to markup categories.
(setq sgml-markup-faces
      '((doctype	. sgml-doctype-face)
	(pi		. sgml-pi-face)
	(comment	. sgml-comment-face)
	(sgml	. sgml-sgml-face)
	(comment	. sgml-comment-face)
	(start-tag	. sgml-start-tag-face)
	(end-tag	. sgml-end-tag-face)
	(entity	. sgml-entity-face)))


; PSGML - enable face settings
(setq sgml-set-face t)

;; ---- End psgml highlighting section.

;; Gnus: using only for mail.
(setq gnus-select-method '(nntp "news.statesoftware.com"))
(add-hook 'nntp-server-opened-hook 'nntp-send-authinfo)



;; This checks to see if you've set the variable startup-directory and
checks to
;; see if you've set it to a real directory.  If so, it will switch
there.
(let ((working-directory (or startup-directory nil)))
  (if (and (and working-directory)
    (file-directory-p working-directory))
      (cd working-directory)))

;; Make sure that tabs are being used (default behavior, but doesn't
hurt in case something got changed):
;; (setq indent-tabs-mode t)

;; Make sure that no tab characters are used:
(setq indent-tabs-mode nil)

;; Set the variable default-tab-width.
(setq default-tab-width 4)

;; Define an easy way to move up in a dired directory, 
;; To instantly view a file in the web browser (IE or whatever) (this
needs a current directory argument to work better):
;; **NOTE: These bindings must be in a mode-hook, since dired isn't
automatically
;; loaded on startup and so it's keymap is void until you go into
dired.
(add-hook `dired-mode-hook
  `(lambda ()
		 (define-key dired-mode-map "\C-w" 'dired-up-directory)
     (define-key dired-mode-map "\C-b" 'browse-url)))

;; ---------- BEGIN BUG WORKAROUNDS SECTION:
;; This prevents dired from displaying itself in warning-face when the
;; default-tab-width is set to 2. 
  (defadvice dired-readin (around ecm-dired-indent activate)
    "Prevent indentation in dired from using tabs."
    (let ((indent-tabs-mode nil))
      ad-do-it))

;; ---------- END BUG WORKAROUNDS SECTION:

;; This enables saving the current desktop on shutdown.  The ESC-x
desktop-save
;; command must be given once for this to work in perpetuity. 
(desktop-load-default)
(desktop-read)

;; --------- ** My custom hand-entered additions end here. **

;; --------- ** Begin Auto-written Emacs Customization Section **

;; The following has been automatically written by the Emacs
customization utility:
(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or
cut/paste it!
  ;; Your init file should contain only one such instance.
 '(appt-message-warning-time 60)
 '(browse-url-browser-function (quote
browse-url-default-windows-browser))
 '(browse-url-generic-program "mozilla")
 '(calculator-number-digits 10)
 '(frame-background-mode nil)
 '(jde-auto-parse-max-buffer-size 0)
 '(jde-bug-jdk-directory "c:/j2sdk1.4.0/")
 '(jde-bug-vm-includes-jpda-p t)
 '(jde-compile-option-verbose t)
 '(jde-db-debugger (quote ("JDEbug" "" . "Executable")) t)
 '(jde-db-source-directories (quote ("c:/Program
Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynaquery"
"c:/Program Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynaform"
"c:/Program Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynafrontend")))
 '(jde-debugger (quote ("JDEbug")))
 '(jde-run-option-classpath (quote
("runner.jar;servlet.jar;org.apache.tomcat.shell.Startup")))
 '(jde-run-option-verbose (quote (t nil nil)))
 '(jde-run-option-vm-args (quote ("-Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,address=6001,server=y,suspend=n")))
 '(jde-setnu-mode-threshold 200000)
 '(jde-sourcepath (quote ("'c:/Program
Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynaquery/'"
"'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynaform/'"
"'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynafrontend/build/'"
"'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynafrontend/dynafastsurv/'")))
 '(mail-host-address "ChristopherBalz@yahoo.com")
 '(midnight-delay 34200)
 '(midnight-hook (quote (update-my-calendar)))
 '(midnight-mode t nil (midnight))
 '(printer-name "USB001")
 '(speedbar-show-unknown-files t)
 '(speedbar-use-images t)
 '(user-full-name "Christopher M. Balz")
 '(user-mail-address "ChristopherBalz@yahoo.com"))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste
it!
  ;; Your init file should contain only one such instance.
 '(speedbar-button-face ((t (:background "black" :foreground "deep sky
blue"))))
 '(speedbar-file-face ((t (:background "black" :foreground
"yellow1"))))
 '(speedbar-selected-face ((((class color) (background dark))
(:background "black" :foreground "red" :underline t))))
 '(speedbar-tag-face ((t (:background "black" :foreground
"Orange")))))

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-03 21:39 w3m gives 'Wrong type argument: stringp, nil" error Christopher M. Balz
@ 2003-06-03 21:45 ` Chris McMahan
  2003-06-04 16:35   ` Christopher M. Balz
  0 siblings, 1 reply; 11+ messages in thread
From: Chris McMahan @ 2003-06-03 21:45 UTC (permalink / raw)


The lack of a w3m executable is exactly what's causing your problem.
I've got a version compiled under cygwin for this program. If you're
interested, I'll send you a copy. You'll need the cygwin libraries to
run them, but they're free for the download.

 - Chris McMahan

ChristopherMBalz@StanfordAlumni.org (Christopher M. Balz) writes:

> Running GNU Emacs 23.3.1 on Windows 2000.  I'm trying to use w3m via
> emacs_w3m.  Every time I enter an M-x w3m- command, or just M-x w3m, I
> get the
> 
>     'Wrong type argument: stringp, nil" error 
> 
> I think the problem is because w3m is not installed as an executable
> on my system.  In the w3m doc, under installation, all there is is "No
> problem. :)".  Oddly, I can't seem to find anything that resembles the
> bona fide w3m executable.  Anyone know where the executable is and
> what it is named?
> 
> Installation of emacs_w3m (v1.3.3) went just fine (I had to create a
> couple directories, but that worked just fine).  Here is the
> installation from a DOS prompt:
> 
> C:\Program Files\emacs\emacs-21.3\bin>emacs -batch -q -no-site-file -l
>  c:/Progra~1/emacs/site/emacs-w3m-1.3.3/w3mhack.el NONE -f
> w3mhack-nonunix-install
> emacs -batch -q -no-site-file -l 
> c:/Progra~1/emacs/site/emacs-w3m-1.3.3/w3mhack.el NONE -f
> w3mhack-nonunix-install
>  `fns-21.3.1.elc' is up to date
> cp fns-21.3.1.el c:/Program Files/emacs/site-lisp/w3m/fns-21.3.1.el
> cp fns-21.3.1.elc c:/Program Files/emacs/site-lisp/w3m/fns-21.3.1.elc
> 
> C:\Program Files\emacs\emacs-21.3\bin>
> 
> All my packages are up to date, and my .emacs file is below (to find
> all related to 'w3m', just search on 'w3').
> 
> ;; This is a web programmer's .emacs file for GNU Emacs.
> ;; It has been tested on GNU Emacs version 21.3.1 on Windows 2000, 
> ;; Service Pack 3.	 
> ;;
> ;; The GNU Emacs Homepage is located at: 
> ;;             http://www.gnu.org/directory/GNU/emacs.html
> ;;
> ;; This Document Last Modified: 06/03/2003.
> ;;
> ;; Portability: It would take minimal or no changes to port it to run
> on Unix;
> ;; the one major change definitely needed would be to remove the
> "cygwin"-related
> ;; code, since that is only for putting the BASH shell on Windows.
> ;;
> ;; @author: Christopher M. Balz.
> ;;          Feel free to e-mail me regarding this file at any of the
> addresses below:
> ;;          ChristopherBalz@yahoo.com
> ;;          ChristopherMBalz@StanfordAlumni.org
> 
> ;; General Notes:  It is often said that a new Emacs user should stay
> away from old, crusty
> ;;                 '.emacs' files from others.  However, the only way
> that I ever was able
> ;;                 to get a reasonable return on the investment of my
> time put into setting
> ;;                 up my Emacs configurations was by borrowing code
> snippets from others.
> ;;                 It is true that no '.emacs' file should be used
> uncritically, by newbie or
> ;;                 by others.  
> ;;               
> ;;                 However, for the best user base, new users should
> be able to
> ;;                 fairly easily clip out sections of '.emacs' files
> that interest them and put
> ;;                 them to use right away in their own '.emacs' files.
>  To this end, I have
> ;;                 attempted to effectively segment the various
> independent components of this
> ;;                 '.emacs' file and have documented what I have done
> as clearly as possible.
> ;;                 It's very exciting how Emacs modes related to
> software engineering for the
> ;;                 web are maturing.  
> ;;     
> 
> ;; ------------   Invocation of Gnu Emacs on Win2K: 
> ;;
> ;;    From Windows shortcut icon with these properties on shortcut's
> 'Properties' menu:
> ;;        'Target': 
> ;;           "C:\Program Files\emacs\emacs-21.3\bin\runemacs.exe" -l
> ~/.emacs
> ;;         'Start in' (Note: I use Cygwin, see below):
> ;;           C:/cygwin/home/Administrator/
> ;;
> ;;    Set user-specific 'HOME' environment variable to
> 'C:/cygwin/home/Administrator', which is
> ;;    the directory in which my '.emacs' file is located.  Do this by
> going to the Control Panel,
> ;;    then to 'System', then to 'Advanced', then to 'Environment
> Variables', the to 'Variables
> ;;    for <user>'. 
> 
> ;; ------------  Commense lisping:
> 
> ;; Add the site directory (the site directory is used to contain
> non-core Emacs Lisp packages)
> ;; to the Emacs load-path.  The Emacs load-path is 
> ;; the list of directories where Emacs searches for packages that you
> require.
> ;; This must be at the head of your .emacs file.  This code prepends
> the site directory to the load path:
> ;; Standard emacs lisp access (for non-byte-compiled access):
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/emacs-21.3/site-lisp/"))
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/emacs-21.3/site/lisp/progmodes/"))
> ;; System-wide emacs customizations:
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site/"))
> ;; Personal emacs/site:
> (add-to-list 'load-path (expand-file-name "~/emacs/site/")) 
> ;; So that Emacs can find the home directory files (desktop, etc.):
> (add-to-list 'load-path (expand-file-name "~/")) 
> ;; Specific Packages:
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site/eieio-0.17/"))
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site/semantic-1.4.4/"))
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site/speedbar-0.14beta4/"))
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site/elib-1.0/"))
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site/psgml-1.2.5/"))
> ;;        For Emacs JDE (from http://sunsite.dk/jde/):
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site/jde-2.3.2/lisp/"))
> ;; For the Emacs Web Browser:
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site/emacs-w3m-1.3.3/"))
> (add-to-list 'load-path (expand-file-name "C:/Program
> Files/emacs/site-lisp/w3m/"))
> 
> ;; On Windows 2000, it is sufficient to set the user-specific 'HOME'
> environment
> ;; variable (see above) to the path to your .emacs file.  For example,
> mine goes to:
> ;; 'C:/cygwin/home/Administrator'.  Most other systems should have a 
> ;; reasonably sane approach to doing this.  These approaches are best.
> ;; However, if on some other system you have
> ;; trouble saving your customizations (meaning, the customizations
> possible
> ;; through the command ESC-x customize-group, and meaning, the error
> message
> ;; 'saving settings from 'emacs -q' would overwrite customizations'),
> ;; explicitly assigning the 'user-init-file' variable is a sure-fire
> way
> ;; to avoid the problem:
> ;; (setq user-init-file (expand-file-name "~/.emacs")
> ;;        custom-file (expand-file-name "~/.emacs"))
> 
> 
> ;; For use of Bash shell via Cygwin on Windows 2000 (or NT), available
> from:
> ;;	     http://www.cygwin.com/
> ;; (if you do not have Cygwin installed, comment all of this section
> out).
> 	;; This assumes that Cygwin is installed in C:\cygwin (the
> 	;; default) and that C:\cygwin\bin is not already in your
> 	;; Windows Path (it generally should not be).
>         ;;
> 	(setq exec-path (cons "C:/cygwin/bin" exec-path))
> 	(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
> 	;;
> 	;; NT-emacs assumes a Windows command shell, which you change
> 	;; here.
> 	;;
> 	(setq process-coding-system-alist '(("bash" . undecided-unix)))
> 	(setq w32-quote-process-args ?\")
> 	(setq shell-file-name "bash")
> 	(setenv "SHELL" shell-file-name) 
> 	(setq explicit-shell-file-name shell-file-name) 
> ;; End of bash shell use via Cygwin section.
> 
> ;; This removes unsightly ^M characters that would otherwise
> ;; appear in the output of java applications.
> ;;
> (add-hook 'comint-output-filter-functions
> 	  'comint-strip-ctrl-m)
> 
> ;; Set start-up directory with cygwin nomenclature 
> ;; (your configuration files _must_ be in this directory):
> (setq startup-directory "C:/cygwin/home/Administrator/")
> 
> ;; generic-x.el is a standard package with Emacs 21.  It contains some
> ;; very neat little modes, such as a JavaScript mode (but said mode
> ;; is not yet as good as c-mode for JavaScript, for it does not 
> ;; recognize /*-style comments.
> ;; All modes supported by generic-x.el are automatically applied
> ;; unless overridden below (for example, JavaScript mode is overridden
> ;; below).
> (require 'generic-x)
> 
> 
> ;; -------- JDE is the Java IDE for Emacs.
> (require 'jde)
> ;; Use no tabs when editing Java for cross-editor indentation
> compatibility.
> (defun my-jde-indent-setup ()
>   (setq indent-tabs-mode nil)
>   (setq jde-basic-offset 4))
> ;;
> ;; Add the above hook to the jde-mode.
> (add-hook 'jde-mode-hook 'my-jde-indent-setup)
> 
> 
> ;; -------- Begin w3m Section (HTML browser) 
> (autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
> (autoload 'w3m-find-file "w3m" "w3m interface function for local
> file." t)
> (autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." 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)
> (setq w3m-icon-directory "c:/Program
> Files/emacs/site/emacs-w3m-1.3.3/icons"
>       w3m-search-default-engine "google"
>       w3m-display-inline-image nil
>       w3m-use-form t
>       w3m-coding-system 'iso-8859-1
>       w3m-input-coding-system 'iso-8859-1
>       w3m-terminal-coding-system 'iso-8859-1
>       w3m-output-coding-system 'iso-8859-1
>       w3m-arrived-file-coding-system 'iso-8859-1
>       w3m-mailto-url-function 'gnus-summary-mail-other-window
>       w3m-default-save-directory "~/w3m/")
> 
> ;; -------- End w3m Section (HTML browser) 
> 
> ;; -------- Begin JavaScript editing section. -------- 
> 
> ;; This is my way of loading c-mode and hooking .js files to it, 
> ;; not superseded by the JavaScript mode in generic-x.el (see above).
> (autoload 'c-mode "cc-mode.el")
> (setq auto-mode-alist (cons '("\\.js$" . c-mode) auto-mode-alist))
> ;; This is the container for my custom js editing mode  
> ;; It uses no tabs for cross-editor compatibility.
> (defun my-js-indent-setup ()
>   (setq indent-tabs-mode nil)
>   (setq c-basic-offset 4))
> ;;
> ;; Add the above hook to the c-mode.
> (add-hook 'c-mode-hook 'my-js-indent-setup)
> 
> ;; -------- End JavaScript editing section. -------- 
> 
> 
> ;; -------- Begin XML and SGML Editing Section --------  
> ;;
> ;; -> Note: this handles HTML also but 
> ;; a formal DTD declaration is needed for that.  Instead, I use
> ;; html-helper-mode, which handles embedded scripts as well.
> ;; -> From: http://www.lysator.liu.se/~lenst/about_psgml/
> ;; -> Environment Variable Must be set for dtd feature to work:
> ;; PSGML needs to know where to find the SGML catalog files. There are
> a couple
> ;;  of ways to accomplish this, as described in the PSGML
> documentation. I use the method
> ;;  that makes use of the environment variable SGML_CATALOG_FILES
> because it is
> ;;  also used by the SGML parser (patience, I come to it in the next
> section of this article).
> ;;  So, now that you have a set of DTDs and a catalog file, create the
> afore-mentioned
> ;; environment variable and set it to include the path to your
> xhtml1.soc file, for
> ;; example d:\DTDs\xhtml1\xhtml1.soc. If you have more that one
> catalog file,
> ;; you can include them all, separating them with a path delimiter
> (";" on Windows,
> ;; ":" on UNIX-based systems).
> ;; Here is my value: c:\Program
> Files\dtds\xhtml1\xhtml1.soc;c:\Program
> Files\dtds\hodmacro\hodmacro.soc
> 
> (require 'sgml-mode "psgml.el" "Major mode to edit SGML files.")
> (autoload 'xml-mode "psgml.el" "Major mode to edit XML." t)
> (setq auto-mode-alist 
>       (append '(
> 		("\\.sgml$" . sgml-mode)
> 		("\\.idd$" . sgml-mode)
> 		("\\.ide$" . sgml-mode)
> 		("\\.xml$" . xml-mode)
> 		("\\.xsl$" . xml-mode)
> 		("\\.fo$" . xml-mode)
> 		)
> 	      auto-mode-alist
> 	      )
>       )
> 
> ; Auto-activate parsing the DTD when a document is loaded.
> ; If this isn't enabled, syntax coloring won't take affect until
> ; you manually invoke "DTD->Parse DTD"
> (setq sgml-auto-activate-dtd t)
> 
> ;;; Set up my "DTD->Insert DTD" menu.
> 
> (setq sgml-custom-dtd '
>       (
>        ( "DITA concept"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE concept SYSTEM \"concept.dtd\">"
> )
>        ( "DITA task"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE task SYSTEM \"task.dtd\">" )
>        ( "DITA reftopic"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE reftopic SYSTEM
> \"reftopic.dtd\">" )
>        ( "DITA APIdesc"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE APIdesc SYSTEM \"apidesc.dtd\">"
> )
>        ( "DITA topic"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE topic SYSTEM \"ditabase.dtd\">"
> )
>        ( "HOD Script"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE HASCRIPT SYSTEM
> \"HAScript.dtd\">" )
>        ( "XHTML 1.0 Strict"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
> 1.0 Strict//EN\" \"xhtml1-strict.dtd\">" )
>        ( "XHTML 1.0 Transitional"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
> 1.0 Transitional//EN\" \"xhtml1-transitional.dtd\">" )
>        ( "XHTML 1.0 Frameset"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
> 1.0 Frameset//EN\" \"xhtml1-frameset.dtd\">" )
>        ( "HTML 4.01 Transitional"
> 	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
> )
>        ( "HTML 4.01 Strict"
> 	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">" )
>        ( "HTML 4.01 Frameset"
> 	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">" )
>        ( "IBMIDDoc"
> 	 "<!DOCTYPE ibmiddoc PUBLIC \"+//ISBN 0-933186::IBM//DTD
> IBMIDDoc//EN\" [\n]>")
>        ( "DOCBOOK XML 4.1.2"
> 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE book PUBLIC \"-//OASIS//DTD
> DocBook XML V4.1.2//EN\"
> \"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd\" [\n]>")
>        )
> )
> 
> (define-key sgml-mode-map "\C-i" 'sgml-insert-element)
> ; override default validate command to utilize OpenSP's onsgmls
> executable
> (setq sgml-validate-command "onsgmls -s %s %s")
> ; override default xml-mode validate command to utilize OpenSP's
> onsgmls
> ; executable by using a mode-hook, since there appears to be no other
> means
> ; to accomplish it.  
> (defun my-psgml-xml-hook ()
>   (setq sgml-validate-command "onsgmls -s %s %s")
>   (setq sgml-declaration "C:\Program
> Files\openjade-1.3.1\pubtext\xml.dcl")
> )
> (add-hook 'xml-mode-hook 'my-psgml-xml-hook)
>             
> 
> ;; -- End psgml / xml section -------- 
> 
> 
> ;; --- Begin HTML editing section: 
> ;; I require html helper mode because the hhm-config.el code seems to 
> ;; cause an error if I have both autoloaded.
> (require 'html-helper-mode "html-helper-mode.el")
> (autoload 'html-helper-mode "hhm-config.el")
> (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode)      
> auto-mode-alist))
> (setq auto-mode-alist (cons '("\\.asp$" . html-helper-mode)       
> auto-mode-alist))
> (setq auto-mode-alist (cons '("\\.phtml$" . html-helper-mode)     
> auto-mode-alist))
> ;; --- End HTML editing section.
> 
> 
> ;; ----- CSS mode. 
> ;; This is for the css-mode (will not be necessary in later versions;
> it should
> ;; be in the css-mode code itself):
> (require 'apropos)  
> 
> ;; For css-mode: (from http://synthcode.com/emacs/lang/css-mode.el )
> ;; Note: I've had crashing in this mode when I use an M-x
> indent-region
> ;;       command.
> (autoload 'css-mode "css-mode.el")
>  (setq auto-mode-alist	     
>       (cons '("\\.css$" . css-mode) auto-mode-alist))
> ;; ----- End CSS mode.
> 
> 
> ;; Make sure that .emacs file is edited in lisp mode:
> (setq auto-mode-alist (cons '("\.emacs" . lisp-mode)       
> auto-mode-alist))
> 
> 
> ;; ----- Diary and Appointment Notification Section.
> ;; There are also some variables set via the Emacs Customization
> Utility.
> ;; See the end of the file for those.
> ;; Read the diary:
> (diary) 
> 
> ;; Fancy display for Calendar
> ;; Here is some code to make your calendar and diary display fancier:
>  (setq view-diary-entries-initially t
>        mark-diary-entries-in-calendar t
>        number-of-diary-entries 7)
>  (add-hook 'diary-display-hook 'fancy-diary-display)
>  (add-hook 'today-visible-calendar-hook 'calendar-mark-today)
> 
> ;; Show column number on mode line.
> (column-number-mode t)
> ;; Show time on mode line, and set appointment notification.
> ;; (day-and-date)
> (display-time)
> (add-hook 'diary-hook 'appt-make-list)
> (diary 0)
> 
> ;; Special function to make appointments work:
> (defun update-my-calendar ()
>   (let ((diary-buffer (get-file-buffer diary-file))
>         (number-of-diary-entries 30))
>     (if diary-buffer
>         (progn
>           (set-buffer diary-buffer)
>           (revert-buffer t t)))
>     (calendar)))
> 
> ;; Enable syntax coloring.
> (global-font-lock-mode t)
> 
> (setq-default transient-mark-mode t)
> 
> ;; Global key maps:
> (global-set-key "\C-b" 'browse-url-of-file)
> (global-set-key "\e/" 'replace-regexp)
> (global-set-key "\C-xtl" 'goto-line)
> (global-set-key "\e[" 'enlarge-window)
> (global-set-key "\e]" 'shrink-window)
> (global-set-key "\e=" 'eval-current-buffer)
> 
> ;; These two key bindings are for up and down scrolling by a either
> single line at a time
> ;; or by N lines at a time (default is scroll by one single line at a
> time).  This is
> ;; very useful when working with narrow horizontal windows.  ;~)
> ;; To enter the desired N, hold down \C and type the number and then
> hit z or q, all the
> ;; while holding down \C.
> ;; From the "Writing GNU Emacs Extensions" book, by Bob Glickstein.
> (defun scroll-n-lines-up (&optional n) 
>   "Scroll up N lines (1 line by default)."
>   (interactive "P")
>   (scroll-up (prefix-numeric-value n)))
> 
> (defun scroll-n-lines-down (&optional n) 
>   "Scroll down N lines (1 line by default)."
>   (interactive "P")
>   (scroll-down (prefix-numeric-value n)))
> 
> (global-set-key "\C-q" 'scroll-n-lines-up)
> (global-set-key "\C-z" 'scroll-n-lines-down)
> 
> 
> ;; These two bindings make it easier to find a mismatched parenthesis:
> (global-set-key "\e'" 'forward-sexp)
> (global-set-key "\e;" 'backward-sexp)
> 
> ;;; Bracket/brace/parentheses highlighting:
>    ;; The following is the command for Emacs 20.1 and later:
> (show-paren-mode 1)
>    ;; * Here is some Emacs Lisp that will make the % key show the
> matching
>    ;; parenthesis, like in vi.	In addition, if the cursor isn't over a
>    ;; parenthesis, it simply inserts a % like normal.  (`Parenthesis'
> actually
>    ;;  includes and character with `open' or `close' syntax, which
> usually means
>    ;;  "()[]{}".)
> 
>       ;; By an unknown contributor
> 
>       (global-set-key "%" 'match-paren)
> 
>       (defun match-paren (arg)
> 	"Go to the matching parenthesis if on parenthesis otherwise insert
> %."
> 	(interactive "p")
> 	(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
> 	      ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
> 	      (t (self-insert-command (or arg 1)))))
> 
> 
> 
> ;; The following functions enable on-the-fly switching between the
> bash shell and DOS:
> (defun set-shell-bash()
>   (interactive)
>   ;; (setq binary-process-input t)
>   (setq shell-file-name "bash")
>   (setq shell-command-switch "-c")
>   (setq explicit-shell-file-name "bash")
>   (setenv "SHELL" explicit-shell-file-name)
>   (setq explicit-sh-args '("-login" "-i"))
>   (setq w32-quote-process-args ?\")
>   (setq mswindows-quote-process-args t)
>   )
> 
> (defun set-shell-cmdproxy()
>   (interactive)
>   (setq shell-file-name "cmdproxy")
>   (setq explicit-shell-file-name "cmdproxy")
>   (setenv "SHELL" explicit-shell-file-name)
>   (setq explicit-sh-args nil)
>   (setq w32-quote-process-args nil)
>   )
> 
> (global-set-key "\C-xg" 'set-shell-bash) ;; g for Gnu (\C-xb is used
> for buffer switch command).
> (global-set-key "\C-xd" 'set-shell-cmdproxy)
> ;; End shell-switch on-the-fly.
> 
> 
> ;; Begin move-to-window block:
> ;; This code is from the O'Reilly "GNU Emacs Extensions" book.
> ;; The purpose of it is to make a reasonable way to move to the next
> OR previous window.
> ;; Change from C-x o to C-x n, so that we have Next and Previous.  
> (global-set-key "\C-xn" 'other-window) 
> 
> ;; We must make our own function to go to the previous window (but
> it's simple):
> (defun other-window-backward ()
>   "Select the previous window."
>   (interactive)
>   (other-window -1))
> ;; Now we can bind to this function:
> (global-set-key "\C-xp" 'other-window-backward)
> ;; End move to window block.
> 
> ;; This turns on the buffer select list in the minibuffer to make it
> easy to
> ;; edit any buffer in a given window or frame (C-r and C-s move
> backwards and forwards, respectively,
> ;; through the buffer select list).
> (require 'iswitchb)
> (iswitchb-default-keybindings)
> 
> ;; old: (setq show-paren-mode t)
> ;; old: (setq show-paren-style 'parenthesis)
> 
> ;; Set a high recursion limit for parsing the long java files:
> (setq max-specpdl-size 1000)
> 
> (put 'upcase-region 'disabled nil)
> 
> (put 'downcase-region 'disabled nil)
> 
> ;; Adjust the colors and fonts to preference:
> (set-default-font "Fixedsys")
> (set-cursor-color "Deep Pink")
> (set-face-foreground 'highlight "blue")
> (set-face-background 'highlight "red")
> (set-foreground-color "Green")
> (set-background-color "Gray10")
> (set-face-foreground 'custom-group-tag-face "Yellow")
> (set-face-foreground 'custom-variable-tag-face "Magenta")
> (set-face-foreground 'custom-state-face "Yellow")
> (set-face-foreground 'font-lock-type-face "Goldenrod")
> (set-face-foreground 'font-lock-comment-face "OrangeRed")
> (set-face-foreground 'font-lock-function-name-face "Turquoise")
> (set-face-foreground 'font-lock-keyword-face "Yellow")
> (set-face-foreground 'font-lock-string-face "Magenta")
> (set-face-foreground 'font-lock-variable-name-face "Coral")
> (set-face-foreground 'modeline "yellow")
> (set-face-background 'modeline "purple4") 
> (set-face-background 'region "MidnightBlue")
> (set-face-background 'secondary-selection "dodger blue")
> (set-face-foreground 'diary-face "Yellow")
> (set-face-background 'holiday-face "Pink")
> (set-face-foreground 'holiday-face "Red")
> (set-face-foreground 'widget-field-face "Sienna")
> (set-face-foreground 'widget-single-line-field-face "Firebrick")
> (set-face-foreground 'widget-inactive-face "White")
> (set-face-foreground 'widget-documentation-face "Coral")
> (set-mouse-color "yellow")
> 
> ;; The following settings pertain to features that you may not have
> installed on your GNU Emacs:
>   ;; Begin speedbar section (Values set via Emac's 'Customize'
> interface are found at the
>   ;; bottom of the file, and hence if there is a 'conflict' they
> override these values).
> (set-face-foreground 'speedbar-directory-face "Green")
> (set-face-background 'speedbar-directory-face "Black")
> (set-face-foreground 'speedbar-highlight-face "DarkSlateGray")
> (set-face-background 'speedbar-highlight-face "Gold")
> (set-face-background 'speedbar-file-face "MidnightBlue")
> (set-face-foreground 'speedbar-file-face "Gold")
> (set-face-foreground 'speedbar-tag-face "Orange")
> ;; Set the speedbar pop-up window properties: Note that if the
> speedbar height is too
> ;; great, the windowing-system's title bar for the 
> ;; speedbar window (at least on Windows2000) will not show completely.
> (setq speedbar-frame-parameters '((width . 30)
> 								  (height . 45)
> 								  (foreground-color . "green")
> 								  (background-color . "black")))
>   ;; End speedbar section. 
> 
>   ;; You may not want the following line if you do not have
> paren-matching running:
> (set-face-foreground 'show-paren-match-face "Red")
>   ;; The following line is only if you have semantic installed:
> ;; doesn't work for semantic-1.4beta5 (set-face-foreground
> 'semantic-intangible-face "Gold")
>   ;; The following line is only if you have the JDE installed:
> (set-face-foreground 'jde-java-font-lock-link-face "Gold")
> 
> ;;  ---------  This is SGML colorizing with the psgml package, loaded
> above.
> 
> ;;; Set up and enable syntax coloring. 
> ; Create faces  to assign markup categories.
> (make-face 'sgml-doctype-face)
> (make-face 'sgml-pi-face)
> (make-face 'sgml-comment-face)
> (make-face 'sgml-sgml-face)
> (make-face 'sgml-start-tag-face)
> (make-face 'sgml-end-tag-face)
> (make-face 'sgml-entity-face)
> (make-face 'sgml-attribute-face)
> 
> ; Assign attributes to faces. 
> (set-face-foreground 'sgml-doctype-face "yellow")
> (set-face-foreground 'sgml-sgml-face "cyan1")
> (set-face-foreground 'sgml-pi-face "magenta")
> (set-face-foreground 'sgml-comment-face "purple")
> (set-face-foreground 'sgml-start-tag-face "deep sky blue")
> (set-face-foreground 'sgml-end-tag-face "white")
> (set-face-foreground 'sgml-entity-face "orange")
> 
> ; Assign faces to markup categories.
> (setq sgml-markup-faces
>       '((doctype	. sgml-doctype-face)
> 	(pi		. sgml-pi-face)
> 	(comment	. sgml-comment-face)
> 	(sgml	. sgml-sgml-face)
> 	(comment	. sgml-comment-face)
> 	(start-tag	. sgml-start-tag-face)
> 	(end-tag	. sgml-end-tag-face)
> 	(entity	. sgml-entity-face)))
> 
> 
> ; PSGML - enable face settings
> (setq sgml-set-face t)
> 
> ;; ---- End psgml highlighting section.
> 
> ;; Gnus: using only for mail.
> (setq gnus-select-method '(nntp "news.statesoftware.com"))
> (add-hook 'nntp-server-opened-hook 'nntp-send-authinfo)
> 
> 
> 
> ;; This checks to see if you've set the variable startup-directory and
> checks to
> ;; see if you've set it to a real directory.  If so, it will switch
> there.
> (let ((working-directory (or startup-directory nil)))
>   (if (and (and working-directory)
>     (file-directory-p working-directory))
>       (cd working-directory)))
> 
> ;; Make sure that tabs are being used (default behavior, but doesn't
> hurt in case something got changed):
> ;; (setq indent-tabs-mode t)
> 
> ;; Make sure that no tab characters are used:
> (setq indent-tabs-mode nil)
> 
> ;; Set the variable default-tab-width.
> (setq default-tab-width 4)
> 
> ;; Define an easy way to move up in a dired directory, 
> ;; To instantly view a file in the web browser (IE or whatever) (this
> needs a current directory argument to work better):
> ;; **NOTE: These bindings must be in a mode-hook, since dired isn't
> automatically
> ;; loaded on startup and so it's keymap is void until you go into
> dired.
> (add-hook `dired-mode-hook
>   `(lambda ()
> 		 (define-key dired-mode-map "\C-w" 'dired-up-directory)
>      (define-key dired-mode-map "\C-b" 'browse-url)))
> 
> ;; ---------- BEGIN BUG WORKAROUNDS SECTION:
> ;; This prevents dired from displaying itself in warning-face when the
> ;; default-tab-width is set to 2. 
>   (defadvice dired-readin (around ecm-dired-indent activate)
>     "Prevent indentation in dired from using tabs."
>     (let ((indent-tabs-mode nil))
>       ad-do-it))
> 
> ;; ---------- END BUG WORKAROUNDS SECTION:
> 
> ;; This enables saving the current desktop on shutdown.  The ESC-x
> desktop-save
> ;; command must be given once for this to work in perpetuity. 
> (desktop-load-default)
> (desktop-read)
> 
> ;; --------- ** My custom hand-entered additions end here. **
> 
> ;; --------- ** Begin Auto-written Emacs Customization Section **
> 
> ;; The following has been automatically written by the Emacs
> customization utility:
> (custom-set-variables
>   ;; custom-set-variables was added by Custom -- don't edit or
> cut/paste it!
>   ;; Your init file should contain only one such instance.
>  '(appt-message-warning-time 60)
>  '(browse-url-browser-function (quote
> browse-url-default-windows-browser))
>  '(browse-url-generic-program "mozilla")
>  '(calculator-number-digits 10)
>  '(frame-background-mode nil)
>  '(jde-auto-parse-max-buffer-size 0)
>  '(jde-bug-jdk-directory "c:/j2sdk1.4.0/")
>  '(jde-bug-vm-includes-jpda-p t)
>  '(jde-compile-option-verbose t)
>  '(jde-db-debugger (quote ("JDEbug" "" . "Executable")) t)
>  '(jde-db-source-directories (quote ("c:/Program
> Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynaquery"
> "c:/Program Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynaform"
> "c:/Program Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynafrontend")))
>  '(jde-debugger (quote ("JDEbug")))
>  '(jde-run-option-classpath (quote
> ("runner.jar;servlet.jar;org.apache.tomcat.shell.Startup")))
>  '(jde-run-option-verbose (quote (t nil nil)))
>  '(jde-run-option-vm-args (quote ("-Xdebug -Xnoagent
> -Xrunjdwp:transport=dt_socket,address=6001,server=y,suspend=n")))
>  '(jde-setnu-mode-threshold 200000)
>  '(jde-sourcepath (quote ("'c:/Program
> Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynaquery/'"
> "'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynaform/'"
> "'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynafrontend/build/'"
> "'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynafrontend/dynafastsurv/'")))
>  '(mail-host-address "ChristopherBalz@yahoo.com")
>  '(midnight-delay 34200)
>  '(midnight-hook (quote (update-my-calendar)))
>  '(midnight-mode t nil (midnight))
>  '(printer-name "USB001")
>  '(speedbar-show-unknown-files t)
>  '(speedbar-use-images t)
>  '(user-full-name "Christopher M. Balz")
>  '(user-mail-address "ChristopherBalz@yahoo.com"))
> (custom-set-faces
>   ;; custom-set-faces was added by Custom -- don't edit or cut/paste
> it!
>   ;; Your init file should contain only one such instance.
>  '(speedbar-button-face ((t (:background "black" :foreground "deep sky
> blue"))))
>  '(speedbar-file-face ((t (:background "black" :foreground
> "yellow1"))))
>  '(speedbar-selected-face ((((class color) (background dark))
> (:background "black" :foreground "red" :underline t))))
>  '(speedbar-tag-face ((t (:background "black" :foreground
> "Orange")))))

-- 
     (.   .)
  =ooO=(_)=Ooo========================
  Chris McMahan | cmcmahan-AT-one.net
  ====================================

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-03 21:45 ` Chris McMahan
@ 2003-06-04 16:35   ` Christopher M. Balz
  2003-06-04 17:06     ` Kevin Rodgers
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher M. Balz @ 2003-06-04 16:35 UTC (permalink / raw)


Wow, that would be just great!!  I use Cygwin quite a bit.  You could
send it to me or if you have a link where I could download it from,
you could just send me the link.
  
Do you know where to find English instructions for compiling w3m?
 - CB

Chris McMahan <cmcmahan+n@one.net> wrote in message news:<ullwibzsb.fsf@one.net>...
> The lack of a w3m executable is exactly what's causing your problem.
> I've got a version compiled under cygwin for this program. If you're
> interested, I'll send you a copy. You'll need the cygwin libraries to
> run them, but they're free for the download.
> 
>  - Chris McMahan
> 
> ChristopherMBalz@StanfordAlumni.org (Christopher M. Balz) writes:
> 
> > Running GNU Emacs 23.3.1 on Windows 2000.  I'm trying to use w3m via
> > emacs_w3m.  Every time I enter an M-x w3m- command, or just M-x w3m, I
> > get the
> > 
> >     'Wrong type argument: stringp, nil" error 
> > 
> > I think the problem is because w3m is not installed as an executable
> > on my system.  In the w3m doc, under installation, all there is is "No
> > problem. :)".  Oddly, I can't seem to find anything that resembles the
> > bona fide w3m executable.  Anyone know where the executable is and
> > what it is named?
> > 
> > Installation of emacs_w3m (v1.3.3) went just fine (I had to create a
> > couple directories, but that worked just fine).  Here is the
> > installation from a DOS prompt:
> > 
> > C:\Program Files\emacs\emacs-21.3\bin>emacs -batch -q -no-site-file -l
> >  c:/Progra~1/emacs/site/emacs-w3m-1.3.3/w3mhack.el NONE -f
> > w3mhack-nonunix-install
> > emacs -batch -q -no-site-file -l 
> > c:/Progra~1/emacs/site/emacs-w3m-1.3.3/w3mhack.el NONE -f
> > w3mhack-nonunix-install
> >  `fns-21.3.1.elc' is up to date
> > cp fns-21.3.1.el c:/Program Files/emacs/site-lisp/w3m/fns-21.3.1.el
> > cp fns-21.3.1.elc c:/Program Files/emacs/site-lisp/w3m/fns-21.3.1.elc
> > 
> > C:\Program Files\emacs\emacs-21.3\bin>
> > 
> > All my packages are up to date, and my .emacs file is below (to find
> > all related to 'w3m', just search on 'w3').
> > 
> > ;; This is a web programmer's .emacs file for GNU Emacs.
> > ;; It has been tested on GNU Emacs version 21.3.1 on Windows 2000, 
> > ;; Service Pack 3.	 
> > ;;
> > ;; The GNU Emacs Homepage is located at: 
> > ;;             http://www.gnu.org/directory/GNU/emacs.html
> > ;;
> > ;; This Document Last Modified: 06/03/2003.
> > ;;
> > ;; Portability: It would take minimal or no changes to port it to run
> > on Unix;
> > ;; the one major change definitely needed would be to remove the
> > "cygwin"-related
> > ;; code, since that is only for putting the BASH shell on Windows.
> > ;;
> > ;; @author: Christopher M. Balz.
> > ;;          Feel free to e-mail me regarding this file at any of the
> > addresses below:
> > ;;          ChristopherBalz@yahoo.com
> > ;;          ChristopherMBalz@StanfordAlumni.org
> > 
> > ;; General Notes:  It is often said that a new Emacs user should stay
> > away from old, crusty
> > ;;                 '.emacs' files from others.  However, the only way
> > that I ever was able
> > ;;                 to get a reasonable return on the investment of my
> > time put into setting
> > ;;                 up my Emacs configurations was by borrowing code
> > snippets from others.
> > ;;                 It is true that no '.emacs' file should be used
> > uncritically, by newbie or
> > ;;                 by others.  
> > ;;               
> > ;;                 However, for the best user base, new users should
> > be able to
> > ;;                 fairly easily clip out sections of '.emacs' files
> > that interest them and put
> > ;;                 them to use right away in their own '.emacs' files.
> >  To this end, I have
> > ;;                 attempted to effectively segment the various
> > independent components of this
> > ;;                 '.emacs' file and have documented what I have done
> > as clearly as possible.
> > ;;                 It's very exciting how Emacs modes related to
> > software engineering for the
> > ;;                 web are maturing.  
> > ;;     
> > 
> > ;; ------------   Invocation of Gnu Emacs on Win2K: 
> > ;;
> > ;;    From Windows shortcut icon with these properties on shortcut's
> > 'Properties' menu:
> > ;;        'Target': 
> > ;;           "C:\Program Files\emacs\emacs-21.3\bin\runemacs.exe" -l
> > ~/.emacs
> > ;;         'Start in' (Note: I use Cygwin, see below):
> > ;;           C:/cygwin/home/Administrator/
> > ;;
> > ;;    Set user-specific 'HOME' environment variable to
> > 'C:/cygwin/home/Administrator', which is
> > ;;    the directory in which my '.emacs' file is located.  Do this by
> > going to the Control Panel,
> > ;;    then to 'System', then to 'Advanced', then to 'Environment
> > Variables', the to 'Variables
> > ;;    for <user>'. 
> > 
> > ;; ------------  Commense lisping:
> > 
> > ;; Add the site directory (the site directory is used to contain
> > non-core Emacs Lisp packages)
> > ;; to the Emacs load-path.  The Emacs load-path is 
> > ;; the list of directories where Emacs searches for packages that you
> > require.
> > ;; This must be at the head of your .emacs file.  This code prepends
> > the site directory to the load path:
> > ;; Standard emacs lisp access (for non-byte-compiled access):
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/emacs-21.3/site-lisp/"))
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/emacs-21.3/site/lisp/progmodes/"))
> > ;; System-wide emacs customizations:
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site/"))
> > ;; Personal emacs/site:
> > (add-to-list 'load-path (expand-file-name "~/emacs/site/")) 
> > ;; So that Emacs can find the home directory files (desktop, etc.):
> > (add-to-list 'load-path (expand-file-name "~/")) 
> > ;; Specific Packages:
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site/eieio-0.17/"))
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site/semantic-1.4.4/"))
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site/speedbar-0.14beta4/"))
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site/elib-1.0/"))
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site/psgml-1.2.5/"))
> > ;;        For Emacs JDE (from http://sunsite.dk/jde/):
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site/jde-2.3.2/lisp/"))
> > ;; For the Emacs Web Browser:
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site/emacs-w3m-1.3.3/"))
> > (add-to-list 'load-path (expand-file-name "C:/Program
> > Files/emacs/site-lisp/w3m/"))
> > 
> > ;; On Windows 2000, it is sufficient to set the user-specific 'HOME'
> > environment
> > ;; variable (see above) to the path to your .emacs file.  For example,
> > mine goes to:
> > ;; 'C:/cygwin/home/Administrator'.  Most other systems should have a 
> > ;; reasonably sane approach to doing this.  These approaches are best.
> > ;; However, if on some other system you have
> > ;; trouble saving your customizations (meaning, the customizations
> > possible
> > ;; through the command ESC-x customize-group, and meaning, the error
> > message
> > ;; 'saving settings from 'emacs -q' would overwrite customizations'),
> > ;; explicitly assigning the 'user-init-file' variable is a sure-fire
> > way
> > ;; to avoid the problem:
> > ;; (setq user-init-file (expand-file-name "~/.emacs")
> > ;;        custom-file (expand-file-name "~/.emacs"))
> > 
> > 
> > ;; For use of Bash shell via Cygwin on Windows 2000 (or NT), available
> > from:
> > ;;	     http://www.cygwin.com/
> > ;; (if you do not have Cygwin installed, comment all of this section
> > out).
> > 	;; This assumes that Cygwin is installed in C:\cygwin (the
> > 	;; default) and that C:\cygwin\bin is not already in your
> > 	;; Windows Path (it generally should not be).
> >         ;;
> > 	(setq exec-path (cons "C:/cygwin/bin" exec-path))
> > 	(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
> > 	;;
> > 	;; NT-emacs assumes a Windows command shell, which you change
> > 	;; here.
> > 	;;
> > 	(setq process-coding-system-alist '(("bash" . undecided-unix)))
> > 	(setq w32-quote-process-args ?\")
> > 	(setq shell-file-name "bash")
> > 	(setenv "SHELL" shell-file-name) 
> > 	(setq explicit-shell-file-name shell-file-name) 
> > ;; End of bash shell use via Cygwin section.
> > 
> > ;; This removes unsightly ^M characters that would otherwise
> > ;; appear in the output of java applications.
> > ;;
> > (add-hook 'comint-output-filter-functions
> > 	  'comint-strip-ctrl-m)
> > 
> > ;; Set start-up directory with cygwin nomenclature 
> > ;; (your configuration files _must_ be in this directory):
> > (setq startup-directory "C:/cygwin/home/Administrator/")
> > 
> > ;; generic-x.el is a standard package with Emacs 21.  It contains some
> > ;; very neat little modes, such as a JavaScript mode (but said mode
> > ;; is not yet as good as c-mode for JavaScript, for it does not 
> > ;; recognize /*-style comments.
> > ;; All modes supported by generic-x.el are automatically applied
> > ;; unless overridden below (for example, JavaScript mode is overridden
> > ;; below).
> > (require 'generic-x)
> > 
> > 
> > ;; -------- JDE is the Java IDE for Emacs.
> > (require 'jde)
> > ;; Use no tabs when editing Java for cross-editor indentation
> > compatibility.
> > (defun my-jde-indent-setup ()
> >   (setq indent-tabs-mode nil)
> >   (setq jde-basic-offset 4))
> > ;;
> > ;; Add the above hook to the jde-mode.
> > (add-hook 'jde-mode-hook 'my-jde-indent-setup)
> > 
> > 
> > ;; -------- Begin w3m Section (HTML browser) 
> > (autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
> > (autoload 'w3m-find-file "w3m" "w3m interface function for local
> > file." t)
> > (autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." 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)
> > (setq w3m-icon-directory "c:/Program
> > Files/emacs/site/emacs-w3m-1.3.3/icons"
> >       w3m-search-default-engine "google"
> >       w3m-display-inline-image nil
> >       w3m-use-form t
> >       w3m-coding-system 'iso-8859-1
> >       w3m-input-coding-system 'iso-8859-1
> >       w3m-terminal-coding-system 'iso-8859-1
> >       w3m-output-coding-system 'iso-8859-1
> >       w3m-arrived-file-coding-system 'iso-8859-1
> >       w3m-mailto-url-function 'gnus-summary-mail-other-window
> >       w3m-default-save-directory "~/w3m/")
> > 
> > ;; -------- End w3m Section (HTML browser) 
> > 
> > ;; -------- Begin JavaScript editing section. -------- 
> > 
> > ;; This is my way of loading c-mode and hooking .js files to it, 
> > ;; not superseded by the JavaScript mode in generic-x.el (see above).
> > (autoload 'c-mode "cc-mode.el")
> > (setq auto-mode-alist (cons '("\\.js$" . c-mode) auto-mode-alist))
> > ;; This is the container for my custom js editing mode  
> > ;; It uses no tabs for cross-editor compatibility.
> > (defun my-js-indent-setup ()
> >   (setq indent-tabs-mode nil)
> >   (setq c-basic-offset 4))
> > ;;
> > ;; Add the above hook to the c-mode.
> > (add-hook 'c-mode-hook 'my-js-indent-setup)
> > 
> > ;; -------- End JavaScript editing section. -------- 
> > 
> > 
> > ;; -------- Begin XML and SGML Editing Section --------  
> > ;;
> > ;; -> Note: this handles HTML also but 
> > ;; a formal DTD declaration is needed for that.  Instead, I use
> > ;; html-helper-mode, which handles embedded scripts as well.
> > ;; -> From: http://www.lysator.liu.se/~lenst/about_psgml/
> > ;; -> Environment Variable Must be set for dtd feature to work:
> > ;; PSGML needs to know where to find the SGML catalog files. There are
> > a couple
> > ;;  of ways to accomplish this, as described in the PSGML
> > documentation. I use the method
> > ;;  that makes use of the environment variable SGML_CATALOG_FILES
> > because it is
> > ;;  also used by the SGML parser (patience, I come to it in the next
> > section of this article).
> > ;;  So, now that you have a set of DTDs and a catalog file, create the
> > afore-mentioned
> > ;; environment variable and set it to include the path to your
> > xhtml1.soc file, for
> > ;; example d:\DTDs\xhtml1\xhtml1.soc. If you have more that one
> > catalog file,
> > ;; you can include them all, separating them with a path delimiter
> > (";" on Windows,
> > ;; ":" on UNIX-based systems).
> > ;; Here is my value: c:\Program
> > Files\dtds\xhtml1\xhtml1.soc;c:\Program
> > Files\dtds\hodmacro\hodmacro.soc
> > 
> > (require 'sgml-mode "psgml.el" "Major mode to edit SGML files.")
> > (autoload 'xml-mode "psgml.el" "Major mode to edit XML." t)
> > (setq auto-mode-alist 
> >       (append '(
> > 		("\\.sgml$" . sgml-mode)
> > 		("\\.idd$" . sgml-mode)
> > 		("\\.ide$" . sgml-mode)
> > 		("\\.xml$" . xml-mode)
> > 		("\\.xsl$" . xml-mode)
> > 		("\\.fo$" . xml-mode)
> > 		)
> > 	      auto-mode-alist
> > 	      )
> >       )
> > 
> > ; Auto-activate parsing the DTD when a document is loaded.
> > ; If this isn't enabled, syntax coloring won't take affect until
> > ; you manually invoke "DTD->Parse DTD"
> > (setq sgml-auto-activate-dtd t)
> > 
> > ;;; Set up my "DTD->Insert DTD" menu.
> > 
> > (setq sgml-custom-dtd '
> >       (
> >        ( "DITA concept"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE concept SYSTEM \"concept.dtd\">"
> > )
> >        ( "DITA task"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE task SYSTEM \"task.dtd\">" )
> >        ( "DITA reftopic"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE reftopic SYSTEM
> > \"reftopic.dtd\">" )
> >        ( "DITA APIdesc"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE APIdesc SYSTEM \"apidesc.dtd\">"
> > )
> >        ( "DITA topic"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE topic SYSTEM \"ditabase.dtd\">"
> > )
> >        ( "HOD Script"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE HASCRIPT SYSTEM
> > \"HAScript.dtd\">" )
> >        ( "XHTML 1.0 Strict"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
> > 1.0 Strict//EN\" \"xhtml1-strict.dtd\">" )
> >        ( "XHTML 1.0 Transitional"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
> > 1.0 Transitional//EN\" \"xhtml1-transitional.dtd\">" )
> >        ( "XHTML 1.0 Frameset"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
> > 1.0 Frameset//EN\" \"xhtml1-frameset.dtd\">" )
> >        ( "HTML 4.01 Transitional"
> > 	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
> > )
> >        ( "HTML 4.01 Strict"
> > 	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">" )
> >        ( "HTML 4.01 Frameset"
> > 	 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">" )
> >        ( "IBMIDDoc"
> > 	 "<!DOCTYPE ibmiddoc PUBLIC \"+//ISBN 0-933186::IBM//DTD
> > IBMIDDoc//EN\" [\n]>")
> >        ( "DOCBOOK XML 4.1.2"
> > 	 "<?xml version=\"1.0\"?>\n<!DOCTYPE book PUBLIC \"-//OASIS//DTD
> > DocBook XML V4.1.2//EN\"
> > \"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd\" [\n]>")
> >        )
> > )
> > 
> > (define-key sgml-mode-map "\C-i" 'sgml-insert-element)
> > ; override default validate command to utilize OpenSP's onsgmls
> > executable
> > (setq sgml-validate-command "onsgmls -s %s %s")
> > ; override default xml-mode validate command to utilize OpenSP's
> > onsgmls
> > ; executable by using a mode-hook, since there appears to be no other
> > means
> > ; to accomplish it.  
> > (defun my-psgml-xml-hook ()
> >   (setq sgml-validate-command "onsgmls -s %s %s")
> >   (setq sgml-declaration "C:\Program
> > Files\openjade-1.3.1\pubtext\xml.dcl")
> > )
> > (add-hook 'xml-mode-hook 'my-psgml-xml-hook)
> >             
> > 
> > ;; -- End psgml / xml section -------- 
> > 
> > 
> > ;; --- Begin HTML editing section: 
> > ;; I require html helper mode because the hhm-config.el code seems to 
> > ;; cause an error if I have both autoloaded.
> > (require 'html-helper-mode "html-helper-mode.el")
> > (autoload 'html-helper-mode "hhm-config.el")
> > (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode)      
> > auto-mode-alist))
> > (setq auto-mode-alist (cons '("\\.asp$" . html-helper-mode)       
> > auto-mode-alist))
> > (setq auto-mode-alist (cons '("\\.phtml$" . html-helper-mode)     
> > auto-mode-alist))
> > ;; --- End HTML editing section.
> > 
> > 
> > ;; ----- CSS mode. 
> > ;; This is for the css-mode (will not be necessary in later versions;
> > it should
> > ;; be in the css-mode code itself):
> > (require 'apropos)  
> > 
> > ;; For css-mode: (from http://synthcode.com/emacs/lang/css-mode.el )
> > ;; Note: I've had crashing in this mode when I use an M-x
> > indent-region
> > ;;       command.
> > (autoload 'css-mode "css-mode.el")
> >  (setq auto-mode-alist	     
> >       (cons '("\\.css$" . css-mode) auto-mode-alist))
> > ;; ----- End CSS mode.
> > 
> > 
> > ;; Make sure that .emacs file is edited in lisp mode:
> > (setq auto-mode-alist (cons '("\.emacs" . lisp-mode)       
> > auto-mode-alist))
> > 
> > 
> > ;; ----- Diary and Appointment Notification Section.
> > ;; There are also some variables set via the Emacs Customization
> > Utility.
> > ;; See the end of the file for those.
> > ;; Read the diary:
> > (diary) 
> > 
> > ;; Fancy display for Calendar
> > ;; Here is some code to make your calendar and diary display fancier:
> >  (setq view-diary-entries-initially t
> >        mark-diary-entries-in-calendar t
> >        number-of-diary-entries 7)
> >  (add-hook 'diary-display-hook 'fancy-diary-display)
> >  (add-hook 'today-visible-calendar-hook 'calendar-mark-today)
> > 
> > ;; Show column number on mode line.
> > (column-number-mode t)
> > ;; Show time on mode line, and set appointment notification.
> > ;; (day-and-date)
> > (display-time)
> > (add-hook 'diary-hook 'appt-make-list)
> > (diary 0)
> > 
> > ;; Special function to make appointments work:
> > (defun update-my-calendar ()
> >   (let ((diary-buffer (get-file-buffer diary-file))
> >         (number-of-diary-entries 30))
> >     (if diary-buffer
> >         (progn
> >           (set-buffer diary-buffer)
> >           (revert-buffer t t)))
> >     (calendar)))
> > 
> > ;; Enable syntax coloring.
> > (global-font-lock-mode t)
> > 
> > (setq-default transient-mark-mode t)
> > 
> > ;; Global key maps:
> > (global-set-key "\C-b" 'browse-url-of-file)
> > (global-set-key "\e/" 'replace-regexp)
> > (global-set-key "\C-xtl" 'goto-line)
> > (global-set-key "\e[" 'enlarge-window)
> > (global-set-key "\e]" 'shrink-window)
> > (global-set-key "\e=" 'eval-current-buffer)
> > 
> > ;; These two key bindings are for up and down scrolling by a either
> > single line at a time
> > ;; or by N lines at a time (default is scroll by one single line at a
> > time).  This is
> > ;; very useful when working with narrow horizontal windows.  ;~)
> > ;; To enter the desired N, hold down \C and type the number and then
> > hit z or q, all the
> > ;; while holding down \C.
> > ;; From the "Writing GNU Emacs Extensions" book, by Bob Glickstein.
> > (defun scroll-n-lines-up (&optional n) 
> >   "Scroll up N lines (1 line by default)."
> >   (interactive "P")
> >   (scroll-up (prefix-numeric-value n)))
> > 
> > (defun scroll-n-lines-down (&optional n) 
> >   "Scroll down N lines (1 line by default)."
> >   (interactive "P")
> >   (scroll-down (prefix-numeric-value n)))
> > 
> > (global-set-key "\C-q" 'scroll-n-lines-up)
> > (global-set-key "\C-z" 'scroll-n-lines-down)
> > 
> > 
> > ;; These two bindings make it easier to find a mismatched parenthesis:
> > (global-set-key "\e'" 'forward-sexp)
> > (global-set-key "\e;" 'backward-sexp)
> > 
> > ;;; Bracket/brace/parentheses highlighting:
> >    ;; The following is the command for Emacs 20.1 and later:
> > (show-paren-mode 1)
> >    ;; * Here is some Emacs Lisp that will make the % key show the
> > matching
> >    ;; parenthesis, like in vi.	In addition, if the cursor isn't over a
> >    ;; parenthesis, it simply inserts a % like normal.  (`Parenthesis'
> > actually
> >    ;;  includes and character with `open' or `close' syntax, which
> > usually means
> >    ;;  "()[]{}".)
> > 
> >       ;; By an unknown contributor
> > 
> >       (global-set-key "%" 'match-paren)
> > 
> >       (defun match-paren (arg)
> > 	"Go to the matching parenthesis if on parenthesis otherwise insert
> > %."
> > 	(interactive "p")
> > 	(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
> > 	      ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
> > 	      (t (self-insert-command (or arg 1)))))
> > 
> > 
> > 
> > ;; The following functions enable on-the-fly switching between the
> > bash shell and DOS:
> > (defun set-shell-bash()
> >   (interactive)
> >   ;; (setq binary-process-input t)
> >   (setq shell-file-name "bash")
> >   (setq shell-command-switch "-c")
> >   (setq explicit-shell-file-name "bash")
> >   (setenv "SHELL" explicit-shell-file-name)
> >   (setq explicit-sh-args '("-login" "-i"))
> >   (setq w32-quote-process-args ?\")
> >   (setq mswindows-quote-process-args t)
> >   )
> > 
> > (defun set-shell-cmdproxy()
> >   (interactive)
> >   (setq shell-file-name "cmdproxy")
> >   (setq explicit-shell-file-name "cmdproxy")
> >   (setenv "SHELL" explicit-shell-file-name)
> >   (setq explicit-sh-args nil)
> >   (setq w32-quote-process-args nil)
> >   )
> > 
> > (global-set-key "\C-xg" 'set-shell-bash) ;; g for Gnu (\C-xb is used
> > for buffer switch command).
> > (global-set-key "\C-xd" 'set-shell-cmdproxy)
> > ;; End shell-switch on-the-fly.
> > 
> > 
> > ;; Begin move-to-window block:
> > ;; This code is from the O'Reilly "GNU Emacs Extensions" book.
> > ;; The purpose of it is to make a reasonable way to move to the next
> > OR previous window.
> > ;; Change from C-x o to C-x n, so that we have Next and Previous.  
> > (global-set-key "\C-xn" 'other-window) 
> > 
> > ;; We must make our own function to go to the previous window (but
> > it's simple):
> > (defun other-window-backward ()
> >   "Select the previous window."
> >   (interactive)
> >   (other-window -1))
> > ;; Now we can bind to this function:
> > (global-set-key "\C-xp" 'other-window-backward)
> > ;; End move to window block.
> > 
> > ;; This turns on the buffer select list in the minibuffer to make it
> > easy to
> > ;; edit any buffer in a given window or frame (C-r and C-s move
> > backwards and forwards, respectively,
> > ;; through the buffer select list).
> > (require 'iswitchb)
> > (iswitchb-default-keybindings)
> > 
> > ;; old: (setq show-paren-mode t)
> > ;; old: (setq show-paren-style 'parenthesis)
> > 
> > ;; Set a high recursion limit for parsing the long java files:
> > (setq max-specpdl-size 1000)
> > 
> > (put 'upcase-region 'disabled nil)
> > 
> > (put 'downcase-region 'disabled nil)
> > 
> > ;; Adjust the colors and fonts to preference:
> > (set-default-font "Fixedsys")
> > (set-cursor-color "Deep Pink")
> > (set-face-foreground 'highlight "blue")
> > (set-face-background 'highlight "red")
> > (set-foreground-color "Green")
> > (set-background-color "Gray10")
> > (set-face-foreground 'custom-group-tag-face "Yellow")
> > (set-face-foreground 'custom-variable-tag-face "Magenta")
> > (set-face-foreground 'custom-state-face "Yellow")
> > (set-face-foreground 'font-lock-type-face "Goldenrod")
> > (set-face-foreground 'font-lock-comment-face "OrangeRed")
> > (set-face-foreground 'font-lock-function-name-face "Turquoise")
> > (set-face-foreground 'font-lock-keyword-face "Yellow")
> > (set-face-foreground 'font-lock-string-face "Magenta")
> > (set-face-foreground 'font-lock-variable-name-face "Coral")
> > (set-face-foreground 'modeline "yellow")
> > (set-face-background 'modeline "purple4") 
> > (set-face-background 'region "MidnightBlue")
> > (set-face-background 'secondary-selection "dodger blue")
> > (set-face-foreground 'diary-face "Yellow")
> > (set-face-background 'holiday-face "Pink")
> > (set-face-foreground 'holiday-face "Red")
> > (set-face-foreground 'widget-field-face "Sienna")
> > (set-face-foreground 'widget-single-line-field-face "Firebrick")
> > (set-face-foreground 'widget-inactive-face "White")
> > (set-face-foreground 'widget-documentation-face "Coral")
> > (set-mouse-color "yellow")
> > 
> > ;; The following settings pertain to features that you may not have
> > installed on your GNU Emacs:
> >   ;; Begin speedbar section (Values set via Emac's 'Customize'
> > interface are found at the
> >   ;; bottom of the file, and hence if there is a 'conflict' they
> > override these values).
> > (set-face-foreground 'speedbar-directory-face "Green")
> > (set-face-background 'speedbar-directory-face "Black")
> > (set-face-foreground 'speedbar-highlight-face "DarkSlateGray")
> > (set-face-background 'speedbar-highlight-face "Gold")
> > (set-face-background 'speedbar-file-face "MidnightBlue")
> > (set-face-foreground 'speedbar-file-face "Gold")
> > (set-face-foreground 'speedbar-tag-face "Orange")
> > ;; Set the speedbar pop-up window properties: Note that if the
> > speedbar height is too
> > ;; great, the windowing-system's title bar for the 
> > ;; speedbar window (at least on Windows2000) will not show completely.
> > (setq speedbar-frame-parameters '((width . 30)
> > 								  (height . 45)
> > 								  (foreground-color . "green")
> > 								  (background-color . "black")))
> >   ;; End speedbar section. 
> > 
> >   ;; You may not want the following line if you do not have
> > paren-matching running:
> > (set-face-foreground 'show-paren-match-face "Red")
> >   ;; The following line is only if you have semantic installed:
> > ;; doesn't work for semantic-1.4beta5 (set-face-foreground
> > 'semantic-intangible-face "Gold")
> >   ;; The following line is only if you have the JDE installed:
> > (set-face-foreground 'jde-java-font-lock-link-face "Gold")
> > 
> > ;;  ---------  This is SGML colorizing with the psgml package, loaded
> > above.
> > 
> > ;;; Set up and enable syntax coloring. 
> > ; Create faces  to assign markup categories.
> > (make-face 'sgml-doctype-face)
> > (make-face 'sgml-pi-face)
> > (make-face 'sgml-comment-face)
> > (make-face 'sgml-sgml-face)
> > (make-face 'sgml-start-tag-face)
> > (make-face 'sgml-end-tag-face)
> > (make-face 'sgml-entity-face)
> > (make-face 'sgml-attribute-face)
> > 
> > ; Assign attributes to faces. 
> > (set-face-foreground 'sgml-doctype-face "yellow")
> > (set-face-foreground 'sgml-sgml-face "cyan1")
> > (set-face-foreground 'sgml-pi-face "magenta")
> > (set-face-foreground 'sgml-comment-face "purple")
> > (set-face-foreground 'sgml-start-tag-face "deep sky blue")
> > (set-face-foreground 'sgml-end-tag-face "white")
> > (set-face-foreground 'sgml-entity-face "orange")
> > 
> > ; Assign faces to markup categories.
> > (setq sgml-markup-faces
> >       '((doctype	. sgml-doctype-face)
> > 	(pi		. sgml-pi-face)
> > 	(comment	. sgml-comment-face)
> > 	(sgml	. sgml-sgml-face)
> > 	(comment	. sgml-comment-face)
> > 	(start-tag	. sgml-start-tag-face)
> > 	(end-tag	. sgml-end-tag-face)
> > 	(entity	. sgml-entity-face)))
> > 
> > 
> > ; PSGML - enable face settings
> > (setq sgml-set-face t)
> > 
> > ;; ---- End psgml highlighting section.
> > 
> > ;; Gnus: using only for mail.
> > (setq gnus-select-method '(nntp "news.statesoftware.com"))
> > (add-hook 'nntp-server-opened-hook 'nntp-send-authinfo)
> > 
> > 
> > 
> > ;; This checks to see if you've set the variable startup-directory and
> > checks to
> > ;; see if you've set it to a real directory.  If so, it will switch
> > there.
> > (let ((working-directory (or startup-directory nil)))
> >   (if (and (and working-directory)
> >     (file-directory-p working-directory))
> >       (cd working-directory)))
> > 
> > ;; Make sure that tabs are being used (default behavior, but doesn't
> > hurt in case something got changed):
> > ;; (setq indent-tabs-mode t)
> > 
> > ;; Make sure that no tab characters are used:
> > (setq indent-tabs-mode nil)
> > 
> > ;; Set the variable default-tab-width.
> > (setq default-tab-width 4)
> > 
> > ;; Define an easy way to move up in a dired directory, 
> > ;; To instantly view a file in the web browser (IE or whatever) (this
> > needs a current directory argument to work better):
> > ;; **NOTE: These bindings must be in a mode-hook, since dired isn't
> > automatically
> > ;; loaded on startup and so it's keymap is void until you go into
> > dired.
> > (add-hook `dired-mode-hook
> >   `(lambda ()
> > 		 (define-key dired-mode-map "\C-w" 'dired-up-directory)
> >      (define-key dired-mode-map "\C-b" 'browse-url)))
> > 
> > ;; ---------- BEGIN BUG WORKAROUNDS SECTION:
> > ;; This prevents dired from displaying itself in warning-face when the
> > ;; default-tab-width is set to 2. 
> >   (defadvice dired-readin (around ecm-dired-indent activate)
> >     "Prevent indentation in dired from using tabs."
> >     (let ((indent-tabs-mode nil))
> >       ad-do-it))
> > 
> > ;; ---------- END BUG WORKAROUNDS SECTION:
> > 
> > ;; This enables saving the current desktop on shutdown.  The ESC-x
> > desktop-save
> > ;; command must be given once for this to work in perpetuity. 
> > (desktop-load-default)
> > (desktop-read)
> > 
> > ;; --------- ** My custom hand-entered additions end here. **
> > 
> > ;; --------- ** Begin Auto-written Emacs Customization Section **
> > 
> > ;; The following has been automatically written by the Emacs
> > customization utility:
> > (custom-set-variables
> >   ;; custom-set-variables was added by Custom -- don't edit or
> > cut/paste it!
> >   ;; Your init file should contain only one such instance.
> >  '(appt-message-warning-time 60)
> >  '(browse-url-browser-function (quote
> > browse-url-default-windows-browser))
> >  '(browse-url-generic-program "mozilla")
> >  '(calculator-number-digits 10)
> >  '(frame-background-mode nil)
> >  '(jde-auto-parse-max-buffer-size 0)
> >  '(jde-bug-jdk-directory "c:/j2sdk1.4.0/")
> >  '(jde-bug-vm-includes-jpda-p t)
> >  '(jde-compile-option-verbose t)
> >  '(jde-db-debugger (quote ("JDEbug" "" . "Executable")) t)
> >  '(jde-db-source-directories (quote ("c:/Program
> > Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynaquery"
> > "c:/Program Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynaform"
> > "c:/Program Files/jakarta-tomcat-3.2.4/webapps/dynasurv/WEB-INF/classes/com/treelogic_swe/frameworks/dynafrontend")))
> >  '(jde-debugger (quote ("JDEbug")))
> >  '(jde-run-option-classpath (quote
> > ("runner.jar;servlet.jar;org.apache.tomcat.shell.Startup")))
> >  '(jde-run-option-verbose (quote (t nil nil)))
> >  '(jde-run-option-vm-args (quote ("-Xdebug -Xnoagent
> > -Xrunjdwp:transport=dt_socket,address=6001,server=y,suspend=n")))
> >  '(jde-setnu-mode-threshold 200000)
> >  '(jde-sourcepath (quote ("'c:/Program
> > Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynaquery/'"
> > "'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynaform/'"
> > "'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynafrontend/build/'"
> > "'c:/Program Files/jakarta-tomcat-3.3.1/lib/common/classes/com/treelogic_swe/frameworks/dynafrontend/dynafastsurv/'")))
> >  '(mail-host-address "ChristopherBalz@yahoo.com")
> >  '(midnight-delay 34200)
> >  '(midnight-hook (quote (update-my-calendar)))
> >  '(midnight-mode t nil (midnight))
> >  '(printer-name "USB001")
> >  '(speedbar-show-unknown-files t)
> >  '(speedbar-use-images t)
> >  '(user-full-name "Christopher M. Balz")
> >  '(user-mail-address "ChristopherBalz@yahoo.com"))
> > (custom-set-faces
> >   ;; custom-set-faces was added by Custom -- don't edit or cut/paste
> > it!
> >   ;; Your init file should contain only one such instance.
> >  '(speedbar-button-face ((t (:background "black" :foreground "deep sky
> > blue"))))
> >  '(speedbar-file-face ((t (:background "black" :foreground
> > "yellow1"))))
> >  '(speedbar-selected-face ((((class color) (background dark))
> > (:background "black" :foreground "red" :underline t))))
> >  '(speedbar-tag-face ((t (:background "black" :foreground
> > "Orange")))))

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-04 16:35   ` Christopher M. Balz
@ 2003-06-04 17:06     ` Kevin Rodgers
  2003-06-05  4:19       ` Christopher M. Balz
  2003-06-05  4:33       ` Christopher M. Balz
  0 siblings, 2 replies; 11+ messages in thread
From: Kevin Rodgers @ 2003-06-04 17:06 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

[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).

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

[-- Attachment #2: README.cygwin --]
[-- Type: text/plain, Size: 374 bytes --]

***How to compile w3m on Windows***

To compile w3m on MS-Windows, you have to use Cygwin32 with development
tools. You can get it from http://sourceware.cygnus.com/cygwin/ .

After installing Cygwin32, what you have to do first is

  TERM=ansi; export TERM
  sh configure

and

  make


Known Bugs:

Local file with drive letter (//C/zonk.html) can't be handled correctly.

[-- Attachment #3: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-04 17:06     ` Kevin Rodgers
@ 2003-06-05  4:19       ` Christopher M. Balz
  2003-06-05 14:54         ` Chris McMahan
  2003-06-05  4:33       ` Christopher M. Balz
  1 sibling, 1 reply; 11+ messages in thread
From: Christopher M. Balz @ 2003-06-05  4:19 UTC (permalink / raw)


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).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-04 17:06     ` Kevin Rodgers
  2003-06-05  4:19       ` Christopher M. Balz
@ 2003-06-05  4:33       ` Christopher M. Balz
  1 sibling, 0 replies; 11+ messages in thread
From: Christopher M. Balz @ 2003-06-05  4:33 UTC (permalink / raw)


The online manual for Emacs-w3m says,

    Emacs-w3m requires the latest version of w3m (version 0.3.1 and
later).

while the Readme that came with the distribution specifies 0.3.1 only.
    
The online manual for Emacs-w3m also says,

  In order to handle text/html part with emacs-w3m under SEMI MUAs
such as T-gnus and Wanderlust, you have to put the following line in
your ~/.emacs file:

     (require 'mime-w3m)

I don't run gnus or Wanderlust, and if I try putting in this line, I
get the stringp, nil error.  I suppose though that this is an
unrelated coincidence.

Well, it would be great to see w3m run inside Emacs.



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).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-05  4:19       ` Christopher M. Balz
@ 2003-06-05 14:54         ` Chris McMahan
  2003-06-05 17:05           ` Hugh Lawson
  2003-06-05 19:28           ` Christopher M. Balz
  0 siblings, 2 replies; 11+ messages in thread
From: Chris McMahan @ 2003-06-05 14:54 UTC (permalink / raw)


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).

-- 
     (.   .)
  =ooO=(_)=Ooo========================
  Chris McMahan | cmcmahan-AT-one.net
  ====================================

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-05 14:54         ` Chris McMahan
@ 2003-06-05 17:05           ` Hugh Lawson
  2003-06-05 19:28           ` Christopher M. Balz
  1 sibling, 0 replies; 11+ messages in thread
From: Hugh Lawson @ 2003-06-05 17:05 UTC (permalink / raw)


Chris McMahan <cmcmahan+n@one.net> writes:

> 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.

[ snip ]

This is a very wild suggestion.

C-h v
browse-url-new-window-flag

if this variable is set to 'nil', set it to 't', and try again.  

In emacs 21, I get that error with mozilla if the variable is set to
nil.


-- 
Hugh Lawson
hlawson@triad.rr.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-05 14:54         ` Chris McMahan
  2003-06-05 17:05           ` Hugh Lawson
@ 2003-06-05 19:28           ` Christopher M. Balz
  2003-06-05 21:13             ` Kevin Rodgers
  1 sibling, 1 reply; 11+ messages in thread
From: Christopher M. Balz @ 2003-06-05 19:28 UTC (permalink / raw)


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).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-05 19:28           ` Christopher M. Balz
@ 2003-06-05 21:13             ` Kevin Rodgers
  2003-06-06  7:49               ` Christopher M. Balz
  0 siblings, 1 reply; 11+ messages in thread
From: Kevin Rodgers @ 2003-06-05 21:13 UTC (permalink / raw)


Christopher M. Balz wrote:

> 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".

Does it work if you specify a valid URL

	file://localhost/c:usr/local/lib/w3m/dirlist.cgi

or whatever is correct for file names with drive letters.

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: w3m gives 'Wrong type argument: stringp, nil" error
  2003-06-05 21:13             ` Kevin Rodgers
@ 2003-06-06  7:49               ` Christopher M. Balz
  0 siblings, 0 replies; 11+ messages in thread
From: Christopher M. Balz @ 2003-06-06  7:49 UTC (permalink / raw)


Having set LIB (export) in .bashrc (/usr/local/lib/w3m/cgi-bin), and
for good measure set it as a Windows system environment variable, w3m
will browse local file directories with a normal file url as will any
other standard browser:

  file:///c:/

and so on just great. This is because it uses 'dirlist.cgi' to do so,
and can find said CGI program.  I saw someone using 'dirlist.bat' in
their .emacs file w3m section, and wonder if that would work.

But, CGI still doesn't work from within Emacs (user permissions are
correct).  So so far I can't get local directory listings via w3m in
Emacs (I haven't tried 'dirlist.bat').  See the following URL (all one
line):

http://216.239.33.100/search?q=cache:5RORbQf_lNIJ:emacs-w3m.namazu.org/ml/msg04213.html+w3m+cgi+LIB+emacs&hl=en&ie=UTF-8

Most people keep a lot of HTML files outside of their local web server
root, and thus, those files can't be served over http unless they are
moved to somewhere under the server root.

Unfortunately, merely putting in a Cygwin symbolic link doesn't work
for w3m on Windows.  So until Clemens Fischer or some such beneficent
soul gets CGI to work in emacs-w3m, I'll have to move the Javadoc.

  - CB

Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3EDFB296.2090702@yahoo.com>...
> Christopher M. Balz wrote:
> 
> > 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".
> 
> Does it work if you specify a valid URL
> 
> 	file://localhost/c:usr/local/lib/w3m/dirlist.cgi
> 
> or whatever is correct for file names with drive letters.

Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3EDFB296.2090702@yahoo.com>...
> Christopher M. Balz wrote:
> 
> > 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".
> 
> Does it work if you specify a valid URL
> 
> 	file://localhost/c:usr/local/lib/w3m/dirlist.cgi
> 
> or whatever is correct for file names with drive letters.

Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3EDFB296.2090702@yahoo.com>...
> Christopher M. Balz wrote:
> 
> > 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".
> 
> Does it work if you specify a valid URL
> 
> 	file://localhost/c:usr/local/lib/w3m/dirlist.cgi
> 
> or whatever is correct for file names with drive letters.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-06-06  7:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-03 21:39 w3m gives 'Wrong type argument: stringp, nil" error Christopher M. Balz
2003-06-03 21:45 ` Chris McMahan
2003-06-04 16:35   ` Christopher M. Balz
2003-06-04 17:06     ` Kevin Rodgers
2003-06-05  4:19       ` Christopher M. Balz
2003-06-05 14:54         ` Chris McMahan
2003-06-05 17:05           ` Hugh Lawson
2003-06-05 19:28           ` Christopher M. Balz
2003-06-05 21:13             ` Kevin Rodgers
2003-06-06  7:49               ` Christopher M. Balz
2003-06-05  4:33       ` Christopher M. Balz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.