Gnus development mailing list
 help / color / mirror / Atom feed
From: Joseph Barillari <jbarilla@princeton.edu>
Cc: ding@gnus.org
Subject: Re: Problem using Emacs/W3 4.0.47
Date: Sat, 04 May 2002 10:13:47 -0400	[thread overview]
Message-ID: <m3pu0crof8.fsf@washer.barillari.org> (raw)
In-Reply-To: <vuog01c2g2o.fsf@csa.bu.edu> (Emerick Rogul's message of "Wed, 01 May 2002 08:44:15 -0400")

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

>>>>> "ER" == Emerick Rogul <emerick@cs.bu.edu> writes:

    > Hi, I know this is a bit off-topic, but I figured someone on
    > here might know what's wrong with this.  I downloaded and
    > installed the latest version of W3 (w3-4.0pre.47).  I'm running
    > Emacs 21.1.1.  When I run M-x w3 I get the following error in
    > *Messages*:

    > Loading w3-hot...done
    > /home/alumni/emerick/.mosaic-hotlist-default does not exist!
    > Contacting www.cs.indiana.edu:80 Loading url-gw...done Retrieval
    > complete.  Extracting from cache...  Parsed 80% of
    > 2951...  Parsed 100% of 2951...done Drawing... done
    > set-face-attribute: Wrong type argument: stringp, nil

    > I then set debug-on-error to t and got the following trace:

    > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
    > internal-set-lisp-face-attribute(w3-style-face-00001 :family nil
    > 0) set-face-attribute(w3-style-face-00001 nil :underline nil
    > :weight normal :fam$ font-set-face-font(w3-style-face-00001
    > [:family nil :weight nil :style 0 :siz$
    > w3-display-node((*document nil ((html nil ...))))
    > w3-draw-tree(((*document nil (...))))  w3-prepare-buffer()
    > w3-pass-to-viewer() w3-sentinel(#<buffer *scratch*>)
    > w3-fetch("http://www.cs.indiana.edu/elisp/w3/docs.html") w3() *
    > call-interactively(w3) execute-extended-command(nil)
    > call-interactively(execute-extended-command)

    > Does anyone have any idea what's going on here?

I can connect this to an on-topic matter, because people who send me
mail have a disturbing habit of using HTML that breaks Emacs/W3, and,
by consequence, makes the mail unreadable in Gnus. I think the problem
above relates to w3's handling of fonts that are specified in the FONT
tag but not installed on my machine.

I solved the problems by installing emacs-w3m (search Google for
w3m_el) instead. The following code (citation below; the original URL
escapes me) in .gnus handles HTML mail with w3m:

;; From: greg@visiontech-dml.com
;; Newsgroups: gnu.emacs.help
;; Subject: Re: w3m-mode and images
;; Date: 19 Jul 2001 10:59:19 +0300
;; Message-ID: <2fasnftcpt4.fsf@broadcom.com>

;; Modified to make it work even if w3 has not installed in the system
;; based on the diary of SHIMADA Mitsunobu, 09 Jan 2002.

 (defvar gnus-w3m-minor-mode nil)

 (make-variable-buffer-local 'gnus-w3m-minor-mode)
 (add-to-list 'minor-mode-alist '(gnus-w3m-minor-mode " w3m"))

 (eval-after-load "w3m"
   '(add-to-list 'minor-mode-map-alist
 		(cons 'gnus-w3m-minor-mode w3m-mode-map)))

 (eval-after-load "mm-decode"
   '(let ((test (nthcdr 2 (assoc "text/html" mm-inline-media-tests))))
      (if test
 	 (setcar test (lambda (handle) (locate-library "w3m"))))))

 (defadvice mm-inline-text (around use-w3m-instead (handle) activate)
   (require 'w3m)
   (let ((type (mm-handle-media-subtype handle)))
     (if (not (equal type "html"))
 	ad-do-it
       (let ((text (mm-get-part handle))
 	    (b (point)))
 	(save-excursion
 	  (insert text)
 	  (save-restriction
 	    (narrow-to-region b (point))
 	    (goto-char (point-min))
 	    (w3m-region (point-min) (point-max))
 	    (setq gnus-w3m-minor-mode t))
 	  (mm-handle-set-undisplayer
 	   handle
 	   `(lambda ()
 	      (let (buffer-read-only)
 		(setq gnus-w3m-minor-mode nil)
 		(if (functionp 'remove-specifier)
 		    (mapcar (lambda (prop)
 			      (remove-specifier
 			       (face-property 'default prop)
 			       (current-buffer)))
 			    '(background background-pixmap foreground)))
 		(delete-region ,(point-min-marker)
 			       ,(point-max-marker))))))))))


--Joe

[-- Attachment #2: Type: application/pgp-signature, Size: 268 bytes --]

      reply	other threads:[~2002-05-04 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-01 12:44 Emerick Rogul
2002-05-04 14:13 ` Joseph Barillari [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3pu0crof8.fsf@washer.barillari.org \
    --to=jbarilla@princeton.edu \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).