Article View: gnu.emacs.vm.bug
Article #737Re: Can't get W3 working for VM
From: David Ronis
Date: Mon, 07 Apr 2003 21:30
Date: Mon, 07 Apr 2003 21:30
72 lines
3630 bytes
3630 bytes
I've passed this patch to Kyle before, and it seems to still work on
the 7.14 sources. Basically it does 2 things:
1. It adds a menu option to use an internal emacs w3m browser.
2. Replace the w3 rendering calls by w3m ones. (I find them more robust).
You of course have to have w3m installed as well as the emacs support
modules (already mentioned in this thread).
Caveat emptor: I'm not a lisp or emacs programmer at all.
David
Here's the patch:
diff -Naur vm-7.08/vm-menu.el vm-7.08.new/vm-menu.el
--- vm-7.08/vm-menu.el Fri Apr 5 19:10:28 2002
+++ vm-7.08.new/vm-menu.el Mon Feb 17 16:27:06 2003
@@ -430,6 +430,10 @@
`(,@title
["Emacs W3" (vm-mouse-send-url-at-position (point) (quote ,w3))
(fboundp (quote ,w3))]
+ ["W3M"
+ (vm-mouse-send-url-at-position (point)
+ 'w3m)
+ t]
["Mosaic"
(vm-mouse-send-url-at-position (point)
'vm-mouse-send-url-to-mosaic)
diff -Naur vm-7.08/vm-mime.el vm-7.08.new/vm-mime.el
--- vm-7.08/vm-mime.el Thu Feb 13 23:55:06 2003
+++ vm-7.08.new/vm-mime.el Mon Feb 17 17:14:37 2003
@@ -1341,7 +1341,7 @@
(car (vm-mm-layout-parts layout)) t)))
((vm-mime-types-match "message" type) t)
((vm-mime-types-match "text/html" type)
- (and (fboundp 'w3-region)
+ (and (fboundp 'w3m-region)
vm-mime-use-w3-for-text/html
;; this because GNUS bogusly sets up autoloads
;; for w3-region even if W3 isn't installed.
@@ -1775,7 +1775,7 @@
(vm-mime-display-internal-text/plain layout))
(defun vm-mime-display-internal-text/html (layout)
- (if (and (fboundp 'w3-region)
+ (if (and (fboundp 'w3m-region)
vm-mime-use-w3-for-text/html)
(condition-case error-data
(let ((buffer-read-only nil)
@@ -1798,7 +1798,7 @@
;; delete the placeholder afterward.
(goto-char end)
(insert-before-markers "z")
- (w3-region start (1- end))
+ (w3m-region start (1- end))
(goto-char end)
(delete-char -1)
;; remove read-only text properties
diff -Naur vm-7.08/vm-page.el vm-7.08.new/vm-page.el
--- vm-7.08/vm-page.el Mon Mar 4 23:09:15 2002
+++ vm-7.08.new/vm-page.el Mon Feb 17 16:27:06 2003
@@ -593,6 +593,8 @@
"Emacs W3")
((eq vm-url-browser 'w3-fetch-other-frame)
"Emacs W3")
+ ((eq vm-url-browser 'w3m)
+ "Emacs W3M")
((eq vm-url-browser 'vm-mouse-send-url-to-mosaic)
"Mosaic")
((eq vm-url-browser 'vm-mouse-send-url-to-netscape)
Technical Details
Message-ID:
<26mka.13425$Ao.1327898@charlie.risq.qc.ca>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mailReferences:
<m21y0k6wha.fsf@consult.pretender> <b6gk19$18ac$1@ice.wonderworks.com> <n9mistvl52o.fsf@boffi95.stru.polimi.it> <m2znn75ldq.fsf@consult.pretender> <84istu9tbk.fsf@lucy.is.informatik.uni-duisburg.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102b9a,d322724e38001922
X-Google-Attributes: gid102b9a,public
X-Google-Thread: f6829,d322724e38001922
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 2003-04-07 14:30:37 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail
From: David Ronis <ronis@ronispc.chem.mcgill.ca>
Subject: Re: Can't get W3 working for VM
Newsgroups: gnu.emacs.vm.bug,comp.emacs
References: <m21y0k6wha.fsf@consult.pretender> <b6gk19$18ac$1@ice.wonderworks.com> <n9mistvl52o.fsf@boffi95.stru.polimi.it> <m2znn75ldq.fsf@consult.pretender> <84istu9tbk.fsf@lucy.is.informatik.uni-duisburg.de>
User-Agent: tin/1.5.16-20030125 ("Bubbles") (UNIX) (Linux/2.4.19 (i686))
Lines: 74
Message-ID: <26mka.13425$Ao.1327898@charlie.risq.qc.ca>
Date: Mon, 07 Apr 2003 21:30:38 GMT
NNTP-Posting-Host: 132.206.205.91
X-Complaints-To: abuse@mcgill.ca
X-Trace: charlie.risq.qc.ca 1049751038 132.206.205.91 (Mon, 07 Apr 2003 17:30:38 EDT)
NNTP-Posting-Date: Mon, 07 Apr 2003 17:30:38 EDT