|
Namazu for hns による簡易全文検索 詳しくは 詳細指定/ヘルプを参照して下さい |
||||||||||||||||||||||||||||||||||||||||||||||
2005年08月03日(水) 旧暦 [n年日記] [更新:"2005/08/04 09:37:15"]#1 [Emacs][Wanderlust][Namazu] 検索結果が 500 以上だった時に最新を表示しない
で、最古の方から 500 表示する。のが気になっていて、
少なくとも Too many messages .. と言っているのは
wl/elmo.el
の次の辺り
1439 (defun elmo-folder-confirm-appends (appends)
1440 (let ((len (length appends))
1441 in)
1442 (if (and elmo-folder-update-threshold
1443 (> len elmo-folder-update-threshold)
1444 elmo-folder-update-confirm)
1445 (if (y-or-n-p (format "Too many messages(%d). Update all? " len))
1446 appends
1447 (setq in elmo-folder-update-threshold)
1448 (catch 'end
1449 (while t
1450 (setq in (read-from-minibuffer "Update number: "
1451 (int-to-string in))
1452 in (string-to-int in))
1453 (if (< len in)
1454 (throw 'end len)) ; in より len が短ければ、len を採用
1455 (if (y-or-n-p (format
1456 "%d messages are killed (not appeared). OK? "
1457 (max (- len in) 0)))
1458 (throw 'end in)))) ; 入力された数字があれば、それを採用
1459 (nthcdr (max (- len in) 0) appends)) ; len - in か 0 の大きい方だけ捨てる
; 次の三条件が満足されれば、つまり
1460 (if (and elmo-folder-update-threshold ;
1461 (> len elmo-folder-update-threshold)
1462 (not elmo-folder-update-confirm))
; の時には、
1463 (nthcdr (max (- len elmo-folder-update-threshold) 0) appends)
1464 appends))))
普通は、最後の方から 500 を表示すればいいが、Namazu の結果の場合は最初の 500 を表示する。
500 と言っているのは、上の変数で言えば、elmo-folder-update-threshold。
nthcdr は リストに cdr を指定された回数だけ評価する。この場合 appends から指定数だけ取除く、 という動作になる。その反対は ? @ butlast を使えばいい:
らしい。最後から指定された数だけ除く
(butlast (list 1 2 3 4) 3 ) (1) (butlast (list 1 2 3 4) 1 ) (1 2 3) ( つっこみ )
|
最近の日記 2026年01月29日 ・Die Fledermaus at New National theatre 2026/01/29 2025年12月25日 ・pbulk 11.99.3 (emacs30) 2025年11月22日 ・crash dump 2025年10月25日 ・recover from disk error 2025年10月23日 ・dd does not duplicate Windows 11 boot disk ? | ||