Navi2ch for Emacs (Part 11)
>>の後に数十ケタの数字がある時、そこにカーソルをあわせると
ハングしてしまうようです。
>>409 ハングって emacsen が落ちるの?
無反応になって C-g 以外うけつけないの?
C-g もうけつけなくなるの?
具体的にどこのスレで発生したのよ?
あと Emacsen のバージョンも教えてくれよな
あらてのブラクラだな navi2ch固め。
414 :
名無しさん@お腹いっぱい。:03/12/08 18:45
415 :
名無しさん@お腹いっぱい。:03/12/08 18:45
これでどうでしょう?
(defun navi2ch-article-str-to-num (str)
"レス参照の文字列を数字か数字の list に変換"
(let (result)
(dolist (x (split-string str ","))
(let* ((numbers (mapcar 'string-to-number (split-string x "-")))
(i (apply 'min numbers))
(max (apply 'max numbers)))
(while (<= i max)
(setq result (append result (list i)))
(setq i (1+ i)))))
(if (= 1 (length result))
(car result)
result)))
>>416 それだと C-g が効くようになるだけ。最後のレス以降を指す必要はないんだから
Index: navi2ch-article.el
===================================================================
RCS file: /cvsroot/navi2ch/navi2ch/navi2ch-article.el,v
retrieving revision 1.230
diff -u -d -u -r1.230 navi2ch-article.el
--- navi2ch-article.el 5 Dec 2003 14:09:46 -0000 1.230
+++ navi2ch-article.el 8 Dec 2003 10:13:50 -0000
@@ -1460,8 +1460,8 @@
(cond ((string-match "\\([0-9]+\\)-\\([0-9]+\\)" str)
(let* ((n1 (string-to-number (match-string 1 str)))
(n2 (string-to-number (match-string 2 str)))
- (min (min n1 n2))
- (i (max n1 n2))
+ (min (min n1 n2 1))
+ (i (max n1 n2 (1+ (length navi2ch-article-message-list))))
list)
(while (>= i min)
(push i list)
ごめん、バッファ保存してなかった。こうっす。
Index: navi2ch-article.el
===================================================================
RCS file: /cvsroot/navi2ch/navi2ch/navi2ch-article.el,v
retrieving revision 1.230
diff -u -d -2 -r1.230 navi2ch-article.el
--- navi2ch-article.el 5 Dec 2003 14:09:46 -0000 1.230
+++ navi2ch-article.el 8 Dec 2003 10:24:40 -0000
@@ -1461,6 +1461,7 @@
(let* ((n1 (string-to-number (match-string 1 str)))
(n2 (string-to-number (match-string 2 str)))
- (min (min n1 n2))
- (i (max n1 n2))
+ (min (max (min n1 n2) 1))
+ (i (min (max n1 n2)
+ (1+ (length navi2ch-article-message-list))))
list)
(while (>= i min)