jidanni | 2 May 20:03 2008

[emacs-w3m:10113] saving cookies without remembering to type Q

How can one save cookies automatically if one never remembers to use

   `Q'
        Save the "arrived URLs" list to disk (*note Tracing History::),
        save cookies (*note Cookie Variables::) and really quit emacs-w3m
        (`w3m-quit').

before exiting emacs?

Must one put w3m-quit in some hook called when exiting emacs? What if
w3m was never started that day? emacs-w3m-version "1.4.263"
P.S., these are not the exact same action that they say they are:
$ grep -n Save\ cookies w3m-cookie.el
417:  "Save cookies."
442:  "Save cookies."
So one of the doctrings should be changed.

Lazycat Manatee | 4 May 04:10 2008
Picon

[emacs-w3m:10114] Emacs-W3m bug

Hi.
I'm use Emacs-W3m (1.5) in Emacs (23.0.60.2).
Blow is my function about search in Google Blog.

(defun w3m-search-google-blog (what)
  "Use Google blog search for WHAT."
  (interactive "sGoogle Blog: ")
  (w3m-goto-url-new-session (concat
"http://blogsearch.google.cn/blogsearch?hl=zh-CN&ie=UTF-8&q="
				    (w3m-url-encode-string what 'utf-8))))

If I use "w3m-search-google-blog" search "奥运会",
so the coding of first page of Google search result is right(ie=UTF-8),
but the coding of second page of Google search result is wrong
(automatic change to ie=GB2312).

So can you give me a patch about this?
Thank you very much! ^_^
David Hansen | 6 May 03:15 2008
Picon
Picon

[emacs-w3m:10115] Re: saving cookies without remembering to type Q

On Sat, 03 May 2008 02:03:14 +0800 jidanni <at> jidanni.org wrote:

> How can one save cookies automatically if one never remembers to use
>
>    `Q'
>         Save the "arrived URLs" list to disk (*note Tracing History::),
>         save cookies (*note Cookie Variables::) and really quit emacs-w3m
>         (`w3m-quit').
>
> before exiting emacs?
> Must one put w3m-quit in some hook called when exiting emacs? 

(add-hook 'kill-emacs-hook #'(lambda () (w3m-quit t)))

> What if w3m was never started that day? 

Put above line in ~/.emacs-w3m, then it's only evaled when emacs-w3m starts.

David

David Hansen | 6 May 03:24 2008
Picon
Picon

[emacs-w3m:10116] Re: Emacs-W3m bug

On Sun, 4 May 2008 10:10:09 +0800 Lazycat Manatee wrote:

> Hi.
> I'm use Emacs-W3m (1.5) in Emacs (23.0.60.2).
> Blow is my function about search in Google Blog.
>
> (defun w3m-search-google-blog (what)
>   "Use Google blog search for WHAT."
>   (interactive "sGoogle Blog: ")
>   (w3m-goto-url-new-session (concat
> "http://blogsearch.google.cn/blogsearch?hl=zh-CN&ie=UTF-8&q="
> 				    (w3m-url-encode-string what 'utf-8))))

Not your that it solves your problem, but there is a more elegant way to
add new search engines to w3m:

(add-to-list 'w3m-search-engine-alist
             '("google-blog"
               "http://blogsearch.google.cn/blogsearch?hl=zh-CN&ie=UTF-8&q=%s"
               utf-8))

This way you can use your favorite search engine with C-u s / C-u S.

> If I use "w3m-search-google-blog" search "奥运会",
> so the coding of first page of Google search result is right(ie=UTF-8),
> but the coding of second page of Google search result is wrong
> (automatic change to ie=GB2312).

Isn't it googles fault? It's their server which chooses the encoding of
the reply.
(Continue reading)

jidanni | 7 May 00:15 2008

[emacs-w3m:10117] Re: saving cookies without remembering to type Q

DH> (add-hook 'kill-emacs-hook #'(lambda () (w3m-quit t)))

Why can't cookie saving be done optionally in w3m-session.el?

(I discovered this file in the message in the last second of emacs'
life upon exit. Info doesn't mention it.)

P.S., glad this mailing list is hopefully working again.

jidanni | 7 May 01:40 2008

[emacs-w3m:10118] how about <I>Italic</I> text?

Any chance that <I>TEXT</I> can be rendered differently than plain
text? It really is one of the basic HTML types, like <B>.

jidanni | 7 May 02:06 2008

[emacs-w3m:10119] Re: saving cookies without remembering to type Q

There also should be a key bound to a w3m-cookie-save-all-now
function, so one needn't have to quit emacs-w3m just to save ones
cookies.

Also that way a person who usually doesn't want to save his cookies
could save them occasionally.

Also there should be a function to save the cookies for the current
site we are viewing, so one needn't drag along all the extra cookies
that happen to be in use.

As far as M-x w3m-cookie goes, it is not clear from its interface if
it saves to file or not, etc.

P.S., could somebody please eliminate the greylisting or whatever
delay is imposed on this mailing list for trusted users?
One notices it varies from 30 minutes to 3 days, so one has no idea if
their post reached the list.

David Hansen | 7 May 05:39 2008
Picon
Picon

[emacs-w3m:10120] Re: saving cookies without remembering to type Q

On Wed, 07 May 2008 06:15:13 +0800 jidanni <at> jidanni.org wrote:

> DH> (add-hook 'kill-emacs-hook #'(lambda () (w3m-quit t)))
>
> Why can't cookie saving be done optionally in w3m-session.el?
>
> (I discovered this file in the message in the last second of emacs'
> life upon exit. Info doesn't mention it.)

I think the whole cookie stuff is considered "experimental".  I'm sure
contributions are welcome :)

David

David Hansen | 7 May 05:42 2008
Picon
Picon

[emacs-w3m:10121] Re: how about <I>Italic</I> text?

On Wed, 07 May 2008 07:40:57 +0800 jidanni <at> jidanni.org wrote:

> Any chance that <I>TEXT</I> can be rendered differently than plain
> text? It really is one of the basic HTML types, like <B>.

Compile w3m (the stand alone browser, not emacs-w3m) from CVS.

David

Naohiro Aota | 7 May 07:50 2008
Picon

[emacs-w3m:10122] Re: Emacs-W3m bug

"Lazycat Manatee" <lazycat.manatee <at> gmail.com> writes:

> Hi.
> I'm use Emacs-W3m (1.5) in Emacs (23.0.60.2).
> Blow is my function about search in Google Blog.
>
> (defun w3m-search-google-blog (what)
>   "Use Google blog search for WHAT."
>   (interactive "sGoogle Blog: ")
>   (w3m-goto-url-new-session (concat
> "http://blogsearch.google.cn/blogsearch?hl=zh-CN&ie=UTF-8&q="
> 				    (w3m-url-encode-string what 'utf-8))))
>
> If I use "w3m-search-google-blog" search "奥运会",
> so the coding of first page of Google search result is right(ie=UTF-8),
> but the coding of second page of Google search result is wrong
> (automatic change to ie=GB2312).

Maybe it is google's fault. I found a way to solve this: search with
"oe=UTF-8" option. Below is the fixed function.

(defun w3m-search-google-blog (what)
  "Use Google blog search for WHAT."
  (interactive "sGoogle Blog: ")
  (w3m-goto-url-new-session (concat
"http://blogsearch.google.com/blogsearch?hl=zh-CN&ie=UTF-8&oe=UTF-8&q="
				    (w3m-url-encode-string what 'utf-8))))

--
Naohiro Aota
(Continue reading)