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

Re: W3 And/or W3M Browsers



Bob--
You need to replace :pserver with :ext in the cvsroot (after savannah
got hacked last year)>>>>> "Robert" == Robert J Chassell <bob@rattlesnake.com> writes:

    Robert>     I don't have W3 or W3M on my own emacs.  Where can I
    Robert> obtain these
 and is it my understanding that W3M is the
    Robert> better of the two?
 
 W3M mode is quicker than W3 mode
    Robert> since W3M runs an external process
 but W3 does
    Robert> everything in Emacs Lisp.  I prefer W3M mode.
 
    Robert> However, as far as I know, Emacspeak provides better
    Robert> support for W3.
 (I don't know whether Emacspeak provides
    Robert> any support for W3M except
 the generic.)
 
 Note that
    Robert> W3 mode requires both url and w3.
 
 The text after the
    Robert> following instructions on checkout and building are
 from
    Robert> my .emacs file settings.
 
 Both the following CVS check
    Robert> outs are in a shell because that is how
 my notes were
    Robert> written.  But the build for W3 is by evaluating Emacs
    Robert> Lisp expressions.  The build and install for W3M is in a
    Robert> shell.  W3
 mode does not need a separate install, 
 
    Robert> I use the backslash-carriage-return method to restrict the
    Robert> length of
 lines to less than 80 characters.
 
 I do
    Robert> the check outs and builds as a regular user, but the
    Robert> install for
 W3M mode as the root user.
 
 Here is info
    Robert> on how to check out W3 mode using a shell and build it
    Robert> using Emacs:
 
 this works as of 2002 Jan 17:
 
 as
    Robert> user `bob' in a shell, CVS checkout
 
 cd
    Robert> /usr/local/src
 cvs -d
    Robert> :pserver:anoncvs@subversions.gnu.org:/cvsroot/w3 co w3
    Robert> cvs -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/url
    Robert> co url
 
 as user `bob' in Emacs, the build
 
    Robert> (progn
 (cd "/usr/local/src/url")
 (compile "./configure
    Robert> --with-gnus=/usr/local/src/gnus && make"))
 
 ;; wait
    Robert> for the previous compilation to end
 (progn
 (cd
    Robert> "/usr/local/src/w3")
 (compile "./configure --with-emacs
    Robert> \
 --with-url=/usr/local/src/url/lisp/ \
    Robert> --with-gnus=/usr/local/src/gnus \
    Robert> --prefix=/usr/local/src/w3 \
    Robert> --exec-prefix=/usr/local/src/w3 \
 && make"))
 
 Here
    Robert> is info on how to check out W3M mode from CVS and build
    Robert> it, in
 both situations using a shell:
 
 this works as
    Robert> of 2003 Sep 17
 
 as user `bob' in a shell, CVS
    Robert> checkout
 
 pushd /usr/local/src
 cvs -d
    Robert> :pserver:anonymous@cvs.namazu.org:/storage/cvsroot login
    Robert> # No password is set.  Just hit Enter/Return key.
 cvs -d
    Robert> :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co
    Robert> emacs-w3m
 
 
 as user `bob' in a shell, the build,
    Robert> which is in a shell
 
 pushd /usr/local/src/emacs-w3m
    Robert> autoconf && \
 ./configure \
    Robert> --with-addpath=/usr/local/share/emacs/site-lisp/gnus &&
    Robert> make
 popd
 
 
 as user `root' in a shell, the
    Robert> install, which is in a shell
 
 pushd
    Robert> /usr/local/src/emacs-w3m
 make install && make
    Robert> install-icons
 popd
 
 
 After the build, the
    Robert> installed CVS installation goes into
    Robert> /usr/local/share/emacs/site-lisp/w3m/
 but icon directory
    Robert> is /usr/local/share/emacs/21.3.50/etc/w3m/icons/
 or
    Robert> /usr/local/src/emacs-w3m/icons/
 
 On 2003 May 1, I had
    Robert> to remove references to Japanese docs in
 
    Robert> /usr/local/src/emacs-w3m/doc/
 
 I did not do this on
    Robert> 2003 Sep 17; I did do this again on 2003 Oct 3
 
 
    Robert> Here are two sections of my .emacs file, the first for W3
    Robert> Mode and the
 second for W3M mode.  You will need to edit
    Robert> this for your own setup.
 
 ;;;;;;;;;;;;;;;; W3 Mode
    Robert> ;;;;;;;;;;;;;;;;
 ;; 2002 Oct 3
 
 ;; ------------
    Robert> start section with local file names ------------
 
 ;;
    Robert> 2001 Nov 27 for w3-4.0pre.47
 (setq load-path (cons
    Robert> "/usr/local/src/w3/lisp" load-path))
 (setq load-path
    Robert> (cons "/usr/local/src/url" load-path))
 (setq load-path
    Robert> (cons "/usr/local/src/url/lisp" load-path))
 
 ;;; for
    Robert> Emacs 21, added the following autoload:
 (require
    Robert> 'w3-auto)
 
 ;;; Emacs/W3 Configuration
 
 ;; for
    Robert> Emacs version 21
 (setq max-lisp-eval-depth 10000)
    Robert> (setq max-specpdl-size 10000)
 
 ;; Remainder set by Bob
    Robert> by hand.  Should not change from version to version.
 
    Robert> ;; Use Rattlesnake Home Page for home page ...
 ;; Note
    Robert> html address format.  You need the *full* pathname.
    Robert> (setq w3-default-homepage
    Robert> "file:/usr/local/net/rattlesnake-home-page.html")
 
 ;;
    Robert> The directory where cache files should be stored;
 ;;
    Robert> defaults to "~/.w3/cache/"
 (setq url-cache-directory
    Robert> "/var/url/")
 
 ;; Name by which known to PGP and/or PEM
    Robert> entities, and what is sent to
 ;; HTTP/1.0 servers as the
    Robert> FROM field.
 ;; (setq url-pgp/pem-entity
    Robert> "bob@rattlesnake.com")
 
 ;; Specify my own stylesheet
    Robert> (setq w3-default-stylesheet "~/.w3/stylesheet")
 
 ;;
    Robert> ------------ end section with local file names
    Robert> ------------
 
 ;; This appears to turn off all
    Robert> cookies
 (setq url-cookie-untrusted-urls '(".*"))
 
 ;;
    Robert> This handles: type application/x-httpd-php3
 (setq
    Robert> url-mime-accept-string "*")
 
 ;; Use ps-print for
    Robert> printing.
 (setq w3-use-ps-print nil)
 
 ;; Show
    Robert> hyperlinks to frames but do not fetch them
 (setq
    Robert> w3-display-frames 'as-nil)
 
 ;; Set amount of space to
    Robert> leave on right margin of WWW buffers.
 ;; (default is
    Robert> 2)
 (setq w3-right-margin 6)
 
 ;; You have a choice of
    Robert> using regular Emacs `dired' rather than W3
 ;;
    Robert> formatting; this loses hypertext properties but gives you
    Robert> a nicer
 ;; format.  An advantage of the hypertext is you
    Robert> can easily view a gif
 ;; by clicking on it.
 ;; If nil,
    Robert> w3 uses dired
 ;; If t, w3 converts to hypertext.
    Robert> ;;(setq url-use-hypertext-dired nil)
 (setq
    Robert> url-use-hypertext-dired t)
 
 ;; newframe -- put the w3
    Robert> page in its own frame
 ;; bully -- make the w3 page the
    Robert> current buffer and only window
 ;; semibully -- make the
    Robert> w3 page the current buffer in the same window
 ;;
    Robert> aggressive -- make the w3 page the current buffer in the
    Robert> other window
 ;; friendly -- display w3page in other
    Robert> window but don't make current
 ;; polite -- don't display
    Robert> w3 page, but prints message when ready (beeps)
 ;; quiet
    Robert> -- like `polite', but don't beep
 ;; meek -- make no
    Robert> indication that page is ready
 ;; the default is already:
    Robert> (setq w3-notify 'semibully)
 
 ;; Automatically save
    Robert> everything...
 ;; But works only if in synchronous
    Robert> mode,
 ;; not when downloading in background!
 (setq
    Robert> url-automatic-caching t)
 
 ;; 24 May 1998, William
    Robert> Perry says `Do not use
 ;;
    Robert> url-cache-create-filename-human-readable for this.
 ;; It
    Robert> is a can of worms.'  (Makes reading RISKS impossible.)
    Robert> (setq url-cache-creation-function
    Robert> 'url-cache-create-filename-using-md5)
 
 (setq
    Robert> w3-latex-use-latex2e t)
 
 ;; Save a document to the
    Robert> local disk
 ;; as HTML Source, Formatted Text, LaTeX
    Robert> Source, or Binary.
 ;; Make an empty keymap if none
    Robert> exists
 (if (not (boundp 'w3-mode-map))
 (setq
    Robert> w3-mode-map (make-sparse-keymap)))
 (define-key
    Robert> w3-mode-map "\C-c\C-s" 'w3-save-as)
 
 (defun
    Robert> w3-toggle-standalone ()
 "Toggle the value of
    Robert> url-standalone-mode.
 When t, this means work without net
    Robert> access by using the cache."
 (interactive)
 (if
    Robert> url-standalone-mode
 (progn
 (setq url-standalone-mode
    Robert> nil)
 (message
 "W3 Standalone mode turned OFF \(value
    Robert> is nil\): requires working Web access."))
 (setq
    Robert> url-standalone-mode t)
 (message "W3 Standalone mode
    Robert> turned ON \(value is t\); W3 uses cache.")))
 
 ;; Make
    Robert> an empty keymap if none exists
 (if (not (boundp
    Robert> 'w3-mode-map))
 (setq w3-mode-map
    Robert> (make-sparse-keymap)))
 (define-key w3-mode-map
    Robert> "\C-c\C-c" 'w3-toggle-standalone)
 
 ;; Keep a history
    Robert> (setq url-keep-history t)
 
 ;; Do not load images
    Robert> unless you ask by
 ;; using the command
    Robert> `w3-load-delayed-images'
 (setq w3-delay-image-loads t)
    Robert> (setq w3-delay-mpeg-loads t)
 
 ;; Display pages
    Robert> incrementally.
 (setq w3-do-incremental-display t)
 
    Robert> ;; Show a running total of bytes transferred.
 ;; If t
    Robert> these can cause a large hit
 ;; if using a terminal with
    Robert> a slowmodem.
 ;; (Actually, not a problem, default is
    Robert> t)
 ; (setq url-show-status nil)
 
 ;; Set how much
    Robert> information you want sent to place you visit.
 ;; none --
    Robert> Send all information
 ;; low -- Don't send the last
    Robert> location
 ;; high -- Don't send the email address or last
    Robert> location
 ;; paranoid -- Don't send anything
 ;;
    Robert> evaluate following to update: (url-setup-privacy-info)
    Robert> (setq-default url-privacy-level (quote paranoid))
 
 ;;
    Robert> Tell about cookies
 (setq-default url-cookie-confirmation
    Robert> t)
 
 ;; If non-nil, provide a menu interface.
 ;; A
    Robert> value of 1 causes W3 to install a "W3" item in the Emacs
    Robert> menubar.
 ;; Otherwise, a W3-specific list
 ;; (setq
    Robert> w3-use-menus 1)
 
 ;; Amount to temporarily multiply
    Robert> gc-cons-threshold when parsing HTML.
 (setq
    Robert> w3-gc-cons-threshold-multiplier 2)
 
 ;; Settings
    Robert> Options
 
 ;; These were automatically saved using the
    Robert> `save-options' command for
 ;; version 2.3.28 on 29
    Robert> January 1996.
 
 (setq-default w3-color-use-reducing
    Robert> t)
 (setq-default w3-color-filter (quote ppmdither))
    Robert> (setq-default w3-dump-to-disk nil)
 (setq-default
    Robert> url-use-hypertext-gopher t)
 (setq-default
    Robert> url-proxy-services nil)
 (setq-default
    Robert> w3-honor-stylesheets t)
 
 ;; End of W3 Settings
 
 
    Robert> 
 ;;;;;;;;;;;;;;;; w3m ;;;;;;;;;;;;;;;;
 
 ;; The
    Robert> following shell-command must be done as user `root', hence
    Robert> the `sudo'.
 ;; I don't remember why I put this in my
    Robert> .emacs file; probably it is
 ;; so that W3M CVS works
    Robert> with my GNU Emacs CVS.
 ;; You may have to link to some
    Robert> other directory; I do not know.
 ;; Or maybe you will not
    Robert> need this.
 (shell-command
 "sudo ln -s
    Robert> /usr/local/src/emacs-w3m/
    Robert> /usr/local/share/emacs/21.3.50/etc/w3m")
 
 
 (setq
    Robert> load-path
 (append (list
    Robert> "/usr/local/share/emacs/site-lisp/w3m") load-path))
 
    Robert> ;; You will want to change your home page
 (setq
    Robert> w3m-home-page "file://u/net/rattlesnake-home-page.html")
    Robert> 
 ;; You may not care about an icon directory
 (setq
    Robert> w3m-icon-directory
    Robert> "/usr/local/share/emacs/21.3.50/etc/w3m/icons/")
 
    Robert> (load "w3m")
 
 (setq w3m-content-type-alist
 '(
    Robert> ("text/html" "\\.s?html?$" browse-url-mozilla)
 ;;
    Robert> ("text/html" "\\.s?html?$" browse-url-galeon)
    Robert> ("text/plain" "\\.\\(txt\\|tex\\|el\\)" nil)
    Robert> ("application/postscript" "\\.\\(ps\\|eps\\)$" ("gv"
    Robert> file))
 ("application/pdf" "\\.pdf$" ("xpdf" file))
 ;;
    Robert> You many not care about the following image setting
    Robert> ("image/jpeg" "\\.jpe?g$" ("/usr/bin/display" file))
    Robert> ("image/png" "\\.png$" ("/usr/bin/display" file))
    Robert> ("image/gif" "\\.gif$" ("/usr/bin/display" file))
    Robert> ("image/tiff" "\\.tif?f$" ("/usr/bin/display" file))
    Robert> ("image/x-xwd" "\\.xwd$" ("/usr/bin/display" file))
    Robert> ("image/x-xbm" "\\.xbm$" ("/usr/bin/display" file))
    Robert> ("image/x-xpm" "\\.xpm$" ("/usr/bin/display" file))
    Robert> ("image/x-bmp" "\\.bmp$" ("/usr/bin/display" file))
    Robert> ("video/mpeg" "\\.mpe?g$" ("mplayer" file))
    Robert> ("video/quicktime" "\\.mov$" ("xmovie" file))))
 
    Robert> (define-key w3m-mode-map [up] 'scroll-backward-one-line)
    Robert> (define-key w3m-mode-map [down]
    Robert> 'scroll-forward-one-line)
 
 (define-key w3m-mode-map
    Robert> [M-up] 'w3m-previous-anchor)
 (define-key w3m-mode-map
    Robert> [M-down] 'w3m-next-anchor)
 
 ;; Show the URL in the
    Robert> echo area
 (setq show-help-function 'message)
 
 ;;
    Robert> When using Emacspeak, stop `w3m-next-anchor' from
    Robert> announcing the
 ;; URI of each link whenever the tab key
    Robert> is pressed
 (remove-hook 'w3m-after-cursor-move-hook
    Robert> 'w3m-print-this-url)
 
 ;; End of W3M Settings
 
 
    Robert> -- 
 Robert J. Chassell Rattlesnake Enterprises
 As I
    Robert> slowly update it, bob@rattlesnake.com
 I rewrite a
    Robert> "What's New" segment for http://www.rattlesnake.com
 
    Robert> 
    Robert> -----------------------------------------------------------------------------
    Robert> To unsubscribe from the emacspeak list or change your
    Robert> address on the
 emacspeak list send mail to
    Robert> "emacspeak-request@cs.vassar.edu" with a
 subject of
    Robert> "unsubscribe" or "help"

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
subject of "unsubscribe" or "help"