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

w3m-redisplay-with-charset in about://source/ buffer



青田です。

about://source/〜 なページで、C c(w3m-redisplay-with-charset)を行っても
バッファに反映されません。

about://source/〜 は arrived-db に登録されないため、
(w3m-arrived-content-charset w3m-current-url) が nil を返すのが原因のよ
うですので、 w3m-current-url の先頭の about://source/ を取り除き元ペー
ジの arrived-db を変更するようにしてみました。

w3m-redisplay-and-resetにも同様の変更をしてあります。

Index: ChangeLog
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/ChangeLog,v
retrieving revision 1.3073
diff -u -r1.3073 ChangeLog
--- ChangeLog	5 Nov 2007 00:40:03 -0000	1.3073
+++ ChangeLog	6 Nov 2007 08:04:07 -0000
@@ -1,3 +1,9 @@
+2007-11-06  Naohiro Aota  <nao.aota@xxxxxxxxx>
+
+	* w3m.el (w3m-redisplay-with-charset): Strip first 'about://source/'
+	before setf w3m-arrived-content-charset.
+	(w3m-redisplay-and-reset): Ditto.
+
 2007-11-05  Naohiro Aota  <nao.aota@xxxxxxxxx>
 
 	* w3m-filter.el (w3m-filter-rules): Add rule for the site of imepita.
Index: w3m.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v
retrieving revision 1.1323
diff -u -r1.1323 w3m.el
--- w3m.el	3 Nov 2007 04:01:22 -0000	1.1323
+++ w3m.el	6 Nov 2007 08:04:32 -0000
@@ -8466,7 +8466,11 @@
   (if (null w3m-current-url)
       (w3m-message "Can't execute this page")
     (setf (w3m-arrived-content-type w3m-current-url) nil)
-    (setf (w3m-arrived-content-charset w3m-current-url) nil)
+    (setf (w3m-arrived-content-charset 
+	   (if (string-match "\\`about://source/" w3m-current-url)
+	       (substring w3m-current-url (match-end 0))
+	     w3m-current-url))
+	  nil)
     (w3m-redisplay-this-page arg)))
 
 (defun w3m-redisplay-with-charset (&optional arg)
@@ -8477,7 +8481,10 @@
   (interactive "P")
   (if (null w3m-current-url)
       (w3m-message "Can't execute the command")
-    (setf (w3m-arrived-content-charset w3m-current-url)
+    (setf (w3m-arrived-content-charset
+	   (if (string-match "\\`about://source/" w3m-current-url)
+	       (substring w3m-current-url (match-end 0))
+	     w3m-current-url))
 	  (w3m-read-content-charset
 	   (format "Content-charset (current %s, default reset): "
 		   w3m-current-coding-system)))