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

Re: <up>, <down> don't work in w3m-session-select on tty



>>>>> In [emacs-w3m : No.09548] trentbuck@xxxxxxxxx wrote:

> When invoked thusly:

>     $ xterm -e emacs -nw -Q -eval '(add-to-list (quote load-path) "~/.emacs.d/lisp/w3m-el")' -eval "(require 'w3m-session)" -f w3m-session-select

> The <up> and <down> arrows do not work to select a session.  C-p and
> C-n still work.  Both <up> and C-p work when running Emacs in X.

> emacs-w3m-version
>  => "1.4.204"
> emacs-version
>  => "GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)\n of 2007-07-07 on nautilus, modified by Debian"

SHIRAI-san, how about this one?

--- w3m-session.el~	2007-06-26 11:19:39 +0000
+++ w3m-session.el	2007-07-23 07:01:47 +0000
@@ -302,14 +302,10 @@
 	    (while (null c)
 	      (set-buffer-modified-p nil)
 	      (setq c (w3m-static-cond
-		       ((and (fboundp 'next-command-event)
-			     (fboundp 'event-key))
-			(event-key (next-command-event nil minimsg)))
-		       ((fboundp 'read-event)
-			(read-event minimsg))
+		       ((fboundp 'event-key)
+			(event-key (aref (read-key-sequence minimsg) 0)))
 		       (t
-			(message minimsg)
-			(read-char-exclusive))))
+			(aref (read-key-sequence minimsg) 0))))
 	      (cond
 	       ((memq c '(?q ?Q ?  space))
 		(setq num-or-sym 'exit))

Though it might be better to make a mode and a keymap as TSUCHIYA-
san said ([emacs-w3m:09230]), it can be a makeshift for the moment.