Commit 0c475563 authored by David Byers's avatar David Byers
Browse files

Lots of forgotten changes.

parent fb8495c6
1999-01-16 David Byers <davby@ida.liu.se>
* lyskom-rest.el (j-or-n-p): Don't compare character to int. It's
not kosher in MULE.
1999-01-11 David Byers <davby@ida.liu.se>
* edit-text.el (lyskom-create-text-handler): Fixed bug that
prevented texts from being read automatically.
1999-01-10 David Byers <davby@ida.liu.se>
* services.el (initiate-query-read-texts): Parse membership
position too.
* parse.el (lyskom-parse-membership-and-position): New function.
* review.el (lyskom-get-texts-by-generic): Ta inte med user-arean
i resultatet.
* command.el (lyskom-start-of-command): Don't rely on lyskom-proc
being nil if a session is dead.
* commands1.el (lyskom-quit): Stt inte lyskom-proc till nil. D
fungerar inte lyskom-buffer-p. (Fast frgan r vad som gr snder
istllet...)
* parse.el (lyskom-parse-text-mapping): Ny funktion.
(lyskom-parse-list): Ny funktion.
(lyskom-parse-text-number-pair): Ny funktion.
(lyskom-parse-sparse-map): Ny funktion.
(lyskom-parse-text-mapping): Ny funktion.
* services.el (initiate-get-session-info-ident): Ny funktion.
(initiate-re-lookup-person): Ny funktion.
(initiate-lookup-person): Ny funktion.
(initiate-lookup-conf): Ny funktion.
(initiate-set-info): Ny funktion.
(initiate-local-to-global): Ny funktion.
(initiate-map-created-texts): Ny funktion.
* komtypes.el (session-info): Lade till flt frn who-info-ident
* parse.el (lyskom-parse-who-info-ident-list): Lade till parsning
av who-info-ident.
(lyskom-parse-session-info-ident): Ny funktion.
(lyskom-parse-session-info): Hantera nya flt i session-info.
* services.el (initiate-who-is-on-ident): Ny funktion.
* komtypes.el (who-info): Lade in flten frn who-info-ident.
* lyskom-rest.el (lyskom-format-object): Add ability to format
time.
(lyskom-format-objects): Anvnd mapconcat istllet fr concat,
apply och mapcar.
(lyskom-format-object): Stoppa inte in space fre objektet.
lyskom-format-objects tar hand om det.
Bytte namn p lyskom-format-X till lyskom-prot-a-format-X fr att
undvika namnkrockar i framtiden.
(lyskom-prot-a-format-string): Allt i en format-sats.
* services.el (initiate-get-last-text): New function.
1999-01-09 David Byers <davby@ida.liu.se>
* services.el (initiate-login): Swap initiate-login and
initiate-login-new.
(initiate-mark-text): Folded initiate-mark-text-old into
initiate-mark-text.
(initiate-unmark-text): Do (mark-text text-no 0) if call 73 is not
implemented.
1999-01-06 David Byers <davby@ida.liu.se>
* internal.el: Don't concat an integer.
1999-01-02 David Byers <davby@ida.liu.se>
* utilities.el: Stt lyskom-max-int efter lyskom-maxint har
definierats.
1999-05-05 Per Cederqvist <ceder@signum.se>
* commands1.el (kom-change-parenthesis): Nytt kommando.
......@@ -140,6 +222,45 @@ Fri Jul 3 13:52:46 1998 David Kagedal <davidk@lysator.liu.se>
* startup.el (lyskom-mode): Stavfel i dokumentationen.
1998-06-14 David Byers <davby@ida.liu.se>
* completing-read.el (lyskom-read-conf-expand-specials): Anvnd
uconf-stat istf conf-stat.
(lyskom-read-conf-no): Anvnd uconf-stat vid behov.
(lyskom-read-uconf-stat): Ny funktion.
(lyskom-read-conf-name): Anvnd uconf-stat vid behov.
(lyskom-read-session-resolve-ambiguity): Anvnd uconf-stat.
* cache.el (cache-get-uconf-stat): Bygg en uconf-stat bara om vi
kr protokollversion 10.
* commands1.el (kom-create-conf): Frga om man tillter hemliga
medlemmar.
* commands2.el (kom-status-conf): Skriv ut om hemliga medlemmar
och anonyma texter r tilltna.
(kom-status-conf): Anvnd uconf-stat fr mtestypen. Annars blir
det fel.
(kom-change-conf-type): Frga om man tillter hemliga medlemmar.
Anvnd genomgende uconf-stat.
* macros.el (lyskom-traverse-break): Nytt makro.
(lyskom-traverse): Definiera om med backquote och gr det mjligt
att returnera ett resultat.
* commands1.el (lyskom-who-is-on-check-membership-9): Anvnd
member-list-funktioner istllet fr conf-no-list.
(lyskom-who-is-on-check-membership-8): Dito.
* komtypes.el (lyskom-member-list-find-member): Ny funktion.
* commands2.el (kom-status-conf): Byt member->conf-no till
member->pers-no.
* parse.el (lyskom-parse-conf-no-list): Ny funktion.
* komtypes.el (lyskom-create-conf-no-list): Fixade buggen.
1998-06-10 David Byers <davby@ida.liu.se>
* utilities.el (lyskom-current-time): Ny funktion.
......
......@@ -90,6 +90,7 @@ SOURCES = $(LANGUAGE-EL) \
lyskom-rest.el
HEADER = defvar.el \
feature.el \
vars.el \
macros.el \
compatibility.el \
......
This diff is collapsed.
......@@ -40,6 +40,10 @@
"$Id$\n"))
(defun lyskom-is-ignoring-async (message &rest args)
(let ((tmp (assq message lyskom-ignoring-async-list)))
(and tmp (equal args (cdr tmp)))))
(defun lyskom-parse-async (tokens buffer)
"Parse an asynchronous message from the server.
The message consists of TOKENS tokens. Unknown messages are skipped.
......@@ -55,9 +59,12 @@ function is called with as the current-buffer, while all calls from
this function shall be with current-buffer the BUFFER."
(let ((msg-no (lyskom-parse-num)))
(cond
((eq msg-no 0) ; New text
((or (eq msg-no 0)
(eq msg-no 15)) ; New text
(let* ((text-no (lyskom-parse-num))
(text-stat (lyskom-parse-text-stat-old text-no)))
(text-stat (if (eq msg-no 0)
(lyskom-parse-text-stat-old text-no)
(lyskom-parse-text-stat text-no))))
(lyskom-save-excursion
(set-buffer buffer)
(lyskom-async-new-text text-stat)))) ;
......@@ -128,7 +135,14 @@ this function shall be with current-buffer the BUFFER."
(initiate-get-time 'async nil))))
((eq msg-no 8) ; Forced leave conference
(lyskom-skip-tokens tokens))
(let ((conf-no (lyskom-parse-num)))
(unless (lyskom-is-ignoring-async 8 conf-no)
(lyskom-save-excursion
(set-buffer buffer)
(initiate-get-conf-stat 'follow
'lyskom-async-forced-leave-conf
conf-no
conf-no)))))
((eq msg-no 9) ; A person has logged in
(let ((pers-no (lyskom-parse-num))
......@@ -197,10 +211,78 @@ this function shall be with current-buffer the BUFFER."
(if (and lyskom-pers-no (not (zerop lyskom-pers-no)))
(lyskom-run 'who-buffer 'cache-del-who-info session-no)))))
((eq msg-no 14) ; Deleted text
(let* ((text-no (lyskom-parse-text-no))
(text-stat (lyskom-parse-text-stat text-no)))
(lyskom-save-excursion
(set-buffer buffer)
(lyskom-async-deleted-text text-stat))))
((eq msg-no 16) ; New recipient
(let ((text-no (lyskom-parse-num))
(conf-no (lyskom-parse-num))
(misc-type (lyskom-parse-num)))
(lyskom-save-excursion
(set-buffer buffer)
(cache-del-conf-stat conf-no)
(cache-del-text-stat text-no)
;; FIXME: Code here.
)))
((eq msg-no 17) ; Deleted recipient
(let ((text-no (lyskom-parse-num))
(conf-no (lyskom-parse-num))
(misc-type (lyskom-parse-num)))
(lyskom-save-excursion
(set-buffer buffer)
(cache-del-conf-stat conf-no)
(cache-del-text-stat text-no)
;; FIXME: Code here.
)))
((eq msg-no 18) ; New membership
(let ((pers-no (lyskom-parse-num))
(conf-no (lyskom-parse-num)))
(unless (lyskom-is-ignoring-async 18 pers-no conf-no)
(lyskom-save-excursion
(set-buffer buffer)
(cache-del-pers-stat pers-no)
(cache-del-conf-stat conf-no)
(when (and (eq pers-no lyskom-pers-no)
(not (lyskom-try-get-membership conf-no)))
(lyskom-collect 'follow)
(initiate-get-conf-stat 'follow nil conf-no)
(initiate-query-read-texts 'follow nil pers-no conf-no)
(lyskom-use 'follow 'lyskom-async-new-membership pers-no conf-no))
))))
(t
(lyskom-skip-tokens tokens)))))
(defun lyskom-async-forced-leave-conf (conf-stat conf-no)
(if conf-stat
(lyskom-format-insert-before-prompt 'no-longer-member conf-stat)
(lyskom-format-insert-before-prompt 'no-longer-member-n conf-no))
(lyskom-remove-membership conf-no lyskom-membership)
(when (eq conf-no lyskom-current-conf)
(set-read-list-empty lyskom-reading-list)
(lyskom-run-hook-with-args 'lyskom-change-conf-hook
lyskom-current-conf 0)
(setq lyskom-current-conf 0))
(read-list-delete-read-info conf-no lyskom-to-do-list)
(lyskom-update-prompt))
(defun lyskom-async-new-membership (conf-conf-stat
membership
pers-no
conf-no)
(when (and membership conf-conf-stat)
(lyskom-format-insert-before-prompt 'have-become-member conf-conf-stat))
(lyskom-add-membership membership conf-no))
(defun lyskom-show-presence (num flag)
"Returns non-nil if presence messages for NUM should be displayed
according to the value of FLAG."
......@@ -441,7 +523,7 @@ converted, before insertion."
;;; ================================================================
;;; Functions for dealing with a new text
;;; Functions for dealing with a new or deleted text
(defun lyskom-default-new-text-hook (text-stat)
......@@ -459,7 +541,15 @@ converted, before insertion."
(lyskom-message "%s" (lyskom-format 'text-is-created
(text-stat->text-no text-stat))))))
(defun lyskom-default-deleted-text-hook (text-stat)
"Update the prompt. Run hooks"
(if (and (not lyskom-dont-change-prompt) ;We shall change it
(not lyskom-executing-command)) ;We have time to do it.
(lyskom-update-prompt))
(let ((no-message nil))
(run-hooks 'lyskom-deleted-text-hook)))
(defun lyskom-async-new-text (text-stat)
"Take care of a message that a new text has been created."
(cache-del-pers-stat (text-stat->author text-stat)) ;+++Borde {ndra i cachen i st{llet.
......@@ -501,6 +591,53 @@ converted, before insertion."
(lyskom-run 'async 'lyskom-prefetch-and-print-prompt))
(defun lyskom-async-deleted-text (text-stat)
"Take care of a message that a text has been deleted."
(cache-del-pers-stat (text-stat->author text-stat))
(lyskom-traverse
misc-info (text-stat->misc-info-list text-stat)
(let ((type (misc-info->type misc-info)))
(cond ((or (eq type 'RECPT)
(eq type 'CC-RECPT)
(eq type 'BCC-RECPT))
(initiate-get-conf-stat 'async 'lyskom-delete-old-text
(misc-info->recipient-no misc-info)
text-stat
(misc-info->local-no misc-info)))
((eq type 'COMM-TO)
(cache-del-text-stat (misc-info->comm-to misc-info)))
((eq type 'FOOTN-TO)
(cache-del-text-stat (misc-info->footn-to misc-info))))))
(lyskom-run 'async 'lyskom-default-deleted-text-hook text-stat)
(lyskom-run 'async 'lyskom-prefetch-and-print-prompt))
(defun lyskom-delete-old-text (recipient text-stat local-no)
"RECIPIENT is a conf-stat and previous recipient of TEXT-STAT.
This call is used in response to a deleted text message"
(when recipient
;; Update the cache
(cache-del-text-stat (text-stat->text-no text-stat))
(cache-del-text (text-stat->text-no text-stat))
(set-conf-stat->no-of-texts
recipient
(min (conf-stat->no-of-texts recipient)
(min (conf-stat->no-of-texts recipient)
(1- (conf-stat->no-of-texts recipient)))))
;; Update the read lists
(let ((membership (lyskom-try-get-membership
(conf-stat->conf-no recipient))))
(when (and membership
(lyskom-visible-membership membership))
(read-list-delete-text text-no recipient lyskom-to-do-list)))
(lyskom-set-mode-line)))
(defun lyskom-add-new-text (recipient text-no local-no)
"RECIPIENT is a conf-stat and recipient of TEXT-NO.
......
......@@ -241,7 +241,7 @@
(match-string 1)))
(defun lyskom-print-fast-reply (item &optional obj)
(concat (lyskom-format 'fast-reply
(concat (lyskom-format 'fast-reply-aux
(aux-item->data item)
(aux-item->creator item))
(lyskom-aux-item-terminating-button item obj)))
......@@ -254,8 +254,8 @@
(and (looking-at (lyskom-get-string 'cross-reference-pers-regexp))
(concat "P" (match-string 1)))))
(defun lyskom-edit-insert-cross-reference (item)
(lyskom-print-cross-reference item nil lyskom-pers-no))
(defun lyskom-edit-insert-cross-reference (item pers)
(lyskom-print-cross-reference item nil pers))
(defun lyskom-print-cross-reference (item &optional obj pers)
(let ((pers (if (and (zerop (aux-item->creator item))
......
......@@ -46,7 +46,8 @@
If full conf-stat is cached, construct an uconf-stat from that data and
cache it."
(or (cache-assoc conf-no lyskom-uconf-cache)
(cache-construct-uconf-stat (cache-get-conf-stat conf-no))))
(and (lyskom-have-feature long-conf-types)
(cache-construct-uconf-stat (cache-get-conf-stat conf-no)))))
(defun cache-construct-uconf-stat (conf)
"If conf is non-nil, create an uconf-stat from conf and cache it.
......
......@@ -240,7 +240,8 @@ This function checks if lyskom-doing-default-command and
lyskom-first-time-around are bound. The text entered in the buffer is
chosen according to this"
(if (not lyskom-proc)
(if (or (not lyskom-proc)
(memq (process-status lyskom-proc) '(closed signal exited nil)))
(lyskom-error "%s" (lyskom-get-string 'dead-session)))
(if (and lyskom-is-waiting
......@@ -317,7 +318,7 @@ chosen according to this"
(lyskom-set-last-viewed))
(lyskom-prefetch-and-print-prompt)
(run-hooks 'lyskom-after-command-hook)
(if lyskom-idle-time-flag
(if (lyskom-have-feature idle-time)
(save-excursion (set-buffer lyskom-buffer)
(initiate-user-active 'background nil)))
(if kom-inhibit-typeahead
......
......@@ -421,11 +421,13 @@ Returns t if it was possible, otherwise nil."
(lyskom-format-insert 'add-member-in
pers-conf-stat
conf-conf-stat))
(blocking-do 'add-member
(conf-stat->conf-no conf-conf-stat)
(conf-stat->conf-no pers-conf-stat)
priority where
membership-type))))
(lyskom-ignoring-async (18 lyskom-pers-no
(conf-stat->conf-no conf-conf-stat))
(blocking-do 'add-member
(conf-stat->conf-no conf-conf-stat)
(conf-stat->conf-no pers-conf-stat)
priority where
membership-type)))))
(defun lyskom-add-member-answer (answer conf-conf-stat pers-conf-stat)
......@@ -529,9 +531,10 @@ of the person."
(lyskom-format-insert 'unsubscribe-to conf)
(lyskom-format-insert 'exclude-from pers conf))
(setq reply (blocking-do 'sub-member
(conf-stat->conf-no conf)
(conf-stat->conf-no pers)))
(lyskom-ignoring-async (8 (conf-stat->conf-no conf))
(setq reply (blocking-do 'sub-member
(conf-stat->conf-no conf)
(conf-stat->conf-no pers))))
(if self
(lyskom-remove-membership (conf-stat->conf-no conf)
lyskom-membership))
......@@ -573,6 +576,8 @@ of the person."
(j-or-n-p (lyskom-get-string 'secret-conf) t)))
(orig (j-or-n-p (lyskom-get-string 'comments-allowed) t))
(anarchy (j-or-n-p (lyskom-get-string 'anonymous-allowed) t))
(secmem (and (lyskom-have-feature long-conf-types)
(not (lyskom-j-or-n-p (lyskom-get-string 'secret-members-allowed) t))))
(conf-no (blocking-do 'create-conf
conf-name
(lyskom-create-conf-type (not open)
......@@ -580,7 +585,7 @@ of the person."
secret
nil
anarchy
nil
secmem
nil
nil)
nil)))
......@@ -993,7 +998,6 @@ Don't ask for confirmation."
(delq lyskom-buffer lyskom-sessions-with-unread-letters))
(set-process-sentinel lyskom-proc nil)
(delete-process lyskom-proc)
(setq lyskom-proc nil)
(lyskom-insert-string 'session-ended)
(lyskom-scroll)
(setq mode-line-process (lyskom-get-string 'mode-line-down))
......@@ -2110,7 +2114,7 @@ prefix is negativ, invisible sessions are also shown.
If the prefix is 0, all visible sessions are shown."
(interactive "P")
(condition-case nil
(if lyskom-dynamic-session-info-flag
(if (lyskom-have-feature dynamic-session-info)
(lyskom-who-is-on-9 arg)
(lyskom-who-is-on-8))
(lyskom-no-users
......@@ -2132,7 +2136,7 @@ If the prefix is 0, all visible sessions are shown."
(lyskom-read-conf-stat (lyskom-get-string 'who-is-on-in-what-conference)
'(all) nil nil t)))
(condition-case nil
(if lyskom-dynamic-session-info-flag
(if (lyskom-have-feature dynamic-session-info)
(lyskom-who-is-on-9 arg conf-stat)
(lyskom-who-is-on-8 conf-stat))
(lyskom-no-users
......@@ -2370,7 +2374,9 @@ Uses Protocol A version 9 calls"
(setq members (mapcar 'member->conf-no
(append (member-list->members members))))
(while (< i len)
(if (memq (who-info->pers-no (aref who-info-list i)) members)
(if (lyskom-member-list-find-member
(who-info->pers-no (aref who-info-list i))
members)
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
......@@ -2385,7 +2391,10 @@ Uses Protocol A version 9 calls"
(setq members (mapcar 'member->conf-no
(append (member-list->members members))))
(while (< i len)
(if (memq (dynamic-session-info->person (aref who-info-list i)) members)
(if (lyskom-member-list-find-member
(dynamic-session-info->person (aref who-info-list i))
members)
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
......@@ -2570,7 +2579,7 @@ about or a single session number."
(lyskom-get-string 'person-not-logged-in-r)
(- (car sessions))))
(t
(if lyskom-dynamic-session-info-flag
(if (lyskom-have-feature dynamic-session-info)
(progn
(setq who-info (listify-vector
(blocking-do 'who-is-on-dynamic t t 0)))
......
This diff is collapsed.
......@@ -177,45 +177,28 @@ of the lyskom-provide-* functions instead."
(if tail
(setcdr tail new-parent))))
(defconst lyskom-xemacs-keysym
'((mouse-1 . (button1))
(mouse-2 . (button2))
(mouse-3 . (button3))
(down-mouse-3 . (button3))
(C- . (control aring))
(C- . (control adiaeresis))
(C- . (control Aring))
(C- . (control Adiaeresis))
( . aring)
( . Aring)
( . adiaeresis)
( . Adiaeresis)))
(defconst lyskom-gnu-keysym
'((C- . (control ))
(C- . (control ))
(C- . (control ))
(C- . (control ))
( . ?\)
( . ?\)
( . ?\)
( . ?\)
( . ?\)
( . ?\)))
(defun lyskom-keys (binding)
(cond ((vectorp binding) (apply 'vector (mapcar 'lyskom-keysym binding)))
(t binding)))
(defun lyskom-keysym (sym)
"Look up the proper symbol to bind sym to"
(lyskom-xemacs-or-gnu (or (cdr (assq sym lyskom-xemacs-keysym)) sym)
(or (cdr (assq sym lyskom-gnu-keysym))
(let ((name (symbol-name sym)))
(and (= (length name) 1)
(elt name 0)))
sym)))
'((button1 . "<mouse-1>")
(button2 . "<mouse-2>")
(button3 . "<mouse-3>")
(button1up . "<down-mouse-1>")
(button2up . "<down-mouse-2>")
(button3up . "<down-mouse-3>")))
(defconst lyskom-xemacs-keysym
'((button1 . "<button1>")
(button2 . "<button2>")
(button3 . "<button3>")
(button1up . "<button1up>")
(button2up . "<button2up>")
(button3up . "<button3up>")))
(defun lyskom-keys (sym)
"Look up the key description for key SYM."
(cdr (assq sym (lyskom-xemacs-or-gnu lyskom-xemacs-keysym
lyskom-gnu-keysym))))
;;; ============================================================
;;; Text property and extents stuff
......
......@@ -68,7 +68,7 @@
(listify-vector
(if (or (and (lyskom-is-in-minibuffer)
lyskom-completing-use-dynamic-info)
lyskom-dynamic-session-info-flag)
(lyskom-have-feature dynamic-session-info))
(blocking-do 'who-is-on-dynamic t t 0)
(blocking-do 'who-is-on))))))
......@@ -127,6 +127,7 @@ See lyskom-read-conf for a description of the parameters."
(cond ((null conf-z-info) 0)
((stringp conf-z-info) 0)
((lyskom-conf-stat-p conf-z-info) (conf-stat->conf-no conf-z-info))
((lyskom-uconf-stat-p conf-z-info) (uconf-stat->conf-no conf-z-info))
(t (conf-z-info->conf-no conf-z-info)))))
(defun lyskom-read-conf-stat (prompt type &optional empty initial mustmatch)
......@@ -141,6 +142,21 @@ See lyskom-read-conf for a description of the parameters."
(t (blocking-do 'get-conf-stat
(conf-z-info->conf-no conf-z-info))))))
(defun lyskom-read-uconf-stat (prompt type &optional empty initial mustmatch)
"Read a conference name from the minibuffer with completion and
return its conf-stat or nil if nothing was matched.
See lyskom-read-conf for a description of the parameters."
(let ((conf-z-info (lyskom-read-conf prompt type empty initial mustmatch)))
(cond ((null conf-z-info) nil)
((stringp conf-z-info) nil)
((lyskom-uconf-stat-p conf-z-info) conf-z-info)
((lyskom-conf-stat-p conf-z-info)
(blocking-do 'get-uconf-stat
(conf-stat->conf-no conf-z-info)))
(t (blocking-do 'get-uconf-stat
(conf-z-info->conf-no conf-z-info))))))
(defun lyskom-read-conf-name (prompt type &optional empty initial mustmatch)
"Read a conference name from the minibuffer with completion and
return its name.
......@@ -150,6 +166,7 @@ See lyskom-read-conf for a description of the parameters."
(cond ((null conf-z-info) "")
((stringp conf-z-info) conf-z-info)
((lyskom-conf-stat-p conf-z-info) (conf-stat->name conf-z-info))
((lyskom-uconf-stat-p conf-z-info) (uconf-stat->name conf-z-info))
(t (conf-z-info->name conf-z-info)))))
(defun lyskom-read-conf (prompt type &optional empty initial mustmatch)
......@@ -203,13 +220,10 @@ A string: A name that matched nothing in the database."
(defun lyskom-read-conf-get-logins ()
"Used internally by lyskom-read-conf-internal to get a list of
persons who are logged on."
(let ((lyskom-completing-use-dynamic-info
(cdr-safe (assq 'lyskom-dynamic-session-info-flag
(buffer-local-variables lyskom-buffer)))))
(mapcar (if lyskom-completing-use-dynamic-info
(function (lambda (el) (dynamic-session-info->person el)))
(function (lambda (el) (who-info->pers-no el))))
(lyskom-completing-who-is-on))))
(mapcar (if (lyskom-have-feature dynamic-session-info)
(function (lambda (el) (dynamic-session-info->person el)))
(function (lambda (el) (who-info->pers-no el))))
(lyskom-completing-who-is-on)))
(defun lyskom-read-conf-expand-specials (string
......@@ -221,11 +235,11 @@ persons who are logged on."
conference number specifications to something useful."
(cond ((string-match (lyskom-get-string 'person-or-conf-no-regexp) string)
(let* ((no (string-to-int (match-string 1 string)))
(cs (blocking-do 'get-conf-stat no)))