Commit e720c8e2 authored by Peter Liljenberg's avatar Peter Liljenberg
Browse files

Ny featuritis (se NEWS-0.46 och ChangeLog för mer info):

* Korta av långa inlägg när man återser dem.

* Vilkalistan kan visa connection-time och idle-time.
parent 6f8b894d
......@@ -63,6 +63,13 @@ tar-arkivet.
** Man kan simulera högerknapptryckning med + för att kunna använda
menyer med tangentbordet.
** Långa inlägg kan kortas av när man återser dem. Se inställningarna
för "Korta av långa inlägg".
** Vilkalistorna kan även visa när en session kopplades upp, och hur
länge den har varit inaktiv. Se inställningen "Visa när personer
loggade in och när de var aktiva".
* Tilläggsinformation
......
Thu Feb 18 17:17:42 1999 Peter Liljenberg <petli@lysator.liu.se>
* commands1.el (lyskom-who-is-on-9):
(lyskom-insert-deferred-session-info-since): Vilkalistan kan visa
nr en session kopplade upp sig och hur lnge den har varit
inaktiv.
* vars.el.in (kom-show-since-and-when):
* english-strings.el:
* swedish-strings.el:
* option-edit.el: Konfigurera ovanstende beteende.
1999-01-09 David Byers <davby@ida.liu.se>
* commands2.el (kom-where-is): Nytt kommando.
......@@ -25,6 +37,34 @@ Mon Sep 14 19:54:03 1998 David Kagedal <davidk@lysator.liu.se>
* prioritize.el (kom-prioritize): Gr
(lyskom-wait-for-membership).
Mon Oct 12 19:45:52 1998 Peter Liljenberg <petli@lysator.liu.se>
* lyskom-rest.el (kom-view-next-text): Stter flat-review till t
om texten r en tersedd kommenter eller en markerad text.
* commands1.el (lyskom-view-commented-text): Stter
flat-review-argumentet till t.
* vars.el.in (kom-truncate-threshold, kom-truncate-show-lines):
Nya variabler.
* option-edit.el: Konfigurera ovanstende variabler.
* english-strings.el (lyskom-message):
swedish-strings.el (lyskom-message): reformat-* ndrade.
* lyskom-rest.el (lyskom-signal-reformatted-text): Bygger en lista
av formatteringsmetoderna istllet fr att bara stta en symbol.
* view-text.el (lyskom-format-text-footer): format-flags (och
drmed lyskom-last-text-format-flags) r nu en lista av symboler i
lyskom-messages, som formatteras till en parantes med komman
emellan strngarna.
(lyskom-view-text, lyskom-print-text): Nytt argument (flat-review)
som r t nr man terser en kommentar eller en markerad text.
Anvnds fr att trunkera inlgg om anvndaren s nskar.
1998-08-16 David Byers <davby@ida.liu.se>
* edit-text.el (kom-edit-send lyskom-edit-send
......@@ -50,6 +90,11 @@ Mon Sep 14 19:54:03 1998 David Kagedal <davidk@lysator.liu.se>
* swedish-strings.el (kom-tell-phrases): Lade till
kom-tell-is-anonymous
Thu Jul 30 18:36:10 1998 Peter Liljenberg <petli@lysator.liu.se>
* lyskom-buttons.el (lyskom-keyboard-menu): Rensa echo-arean innan
kommandot krs.
Thu Jul 23 15:03:10 1998 Peter Liljenberg <petli@lysator.liu.se>
* commands1.el (lyskom-who-is-on-check-membership-9):
......
......@@ -253,7 +253,10 @@ the other ones."
(lyskom-create-text-list (cdr text-nos))
lyskom-current-text)
lyskom-reading-list t))
(lyskom-view-text (car text-nos)))
(lyskom-view-text (car text-nos)
nil nil nil
nil nil nil
t))
(lyskom-insert-string 'no-comment-to))))
......@@ -2200,6 +2203,8 @@ Uses Protocol A version 9 calls"
session-width "P" "M"))
(format-string-2 (lyskom-info-line-format-string
session-width "D" "s"))
(format-string-3 (lyskom-info-line-format-string
session-width "D" "s"))
(lyskom-default-conf-string 'not-present-anywhere)
(lyskom-default-pers-string 'secret-person))
......@@ -2223,6 +2228,12 @@ Uses Protocol A version 9 calls"
(lyskom-get-string 'from-machine)
(lyskom-get-string 'is-doing)))
(if kom-show-since-and-when
(lyskom-format-insert format-string-3
""
(lyskom-get-string 'connection-time)
(lyskom-get-string 'active-last)))
(lyskom-insert
(concat (make-string (- (lyskom-window-width) 2) ?-) "\n"))
......@@ -2271,6 +2282,42 @@ Uses Protocol A version 9 calls"
username
(concat "(" (dynamic-session-info->what-am-i-doing who-info)
")"))))
(if kom-show-since-and-when
(let ((active (if (< (dynamic-session-info->idle-time who-info) 60)
(lyskom-get-string 'active)
(lyskom-format-secs
(dynamic-session-info->idle-time who-info))))
defer-info
static
since)
(cond (kom-deferred-printing
(setq static (cache-get-static-session-info session-no))
(if static
(setq since
(upcase-initials
(lyskom-format-time
(static-session-info->connection-time static))))
(setq defer-info
(lyskom-create-defer-info
'get-static-session-info
session-no
'lyskom-insert-deferred-session-info-since
(make-marker)
(length lyskom-defer-indicator)
"%#1s"))
(setq since defer-info)))
(t
(setq static
(blocking-do 'get-static-session-info session-no))
(setq since (upcase-initials
(lyskom-format-time
(static-session-info->connection-time static))))))
(lyskom-format-insert
format-string-3
""
since
active)))
(setq who-list (cdr who-list))))
(lyskom-insert (concat (make-string (- (lyskom-window-width) 2) ?-)
......@@ -2325,6 +2372,14 @@ Uses Protocol A version 9 calls"
(static-session-info->hostname session-info)))
(lyskom-replace-deferred defer-info "")))
(defun lyskom-insert-deferred-session-info-since (session-info defer-info)
(if session-info
(lyskom-replace-deferred defer-info
(upcase-initials
(lyskom-format-time
(static-session-info->connection-time session-info))))
(lyskom-replace-deferred defer-info "")))
;;; =====================================================================
;;; Lista klienter - List clients
;;; Author: David Kågedal
......
......@@ -337,6 +337,9 @@ and you have finished reading. Please come back later.
(is-in-conf . "In conference")
(from-machine . "At")
(is-doing . "Activity")
(connection-time . "Connected")
(active-last . "Active last")
(active . "Active")
(lyskom-client . "Client")
(text-to-add-recipient . "Add recipient to which article:")
(text-to-add-copy . "Add recipient of carbon copy of which article:")
......@@ -1064,10 +1067,12 @@ On since %#8s%#9s")
(language-set-to . "Language set to %#1s.\n")
(language-not-loaded . "%#1s is unavailable.\n")
(reformat-generic . "(%#1s)")
(reformat-html . "(HTML)")
(reformat-enriched . "(Enriched)")
(reformat-filled . "(Filled)")
;; (reformat-generic . "(%#1s)")
(reformat-html . "HTML")
(reformat-enriched . "enriched")
(reformat-filled . "filled")
(reformat-truncated . "truncated")
(need-library . "The \"%#1s\" package is required for this command.\n")
(calc-expression . "Expression: ")
......@@ -1876,6 +1881,8 @@ Select whether to execute command or keyboard macro.")
(long-format . "Show help texts")
(short-format . "Hide help texts")
(truncate-threshold-lines . "Max lines")
;;
;; Misc doc strings
;;
......@@ -2154,6 +2161,15 @@ Lists etc. : [INS] Add a line [DEL] Remove a line [*] Modify")
If dashed lines are off the author's name will be shown as in this
example, but the dashed lines are natually not displayed.")
(kom-truncate-threshold-doc . "\
If this is activated texts longer than the maximum number of lines will
be truncated when you review comments, review marked texts or review the
first or last texts in a conference. Texts will not be truncated when
you review a text, review a tree or read the next text.")
(kom-truncate-show-lines-doc . "\
The number of lines to show of truncated texts.")
(kom-print-number-of-unread-on-entrance-doc . "\
Determines whether the number of unread articles is shown when entering
a conference:
......@@ -2205,6 +2221,9 @@ Lists etc. : [INS] Add a line [DEL] Remove a line [*] Modify")
6810 George Berkeley Philosophy
7571 John Locke Philosophy")
(kom-show-since-and-when-doc . "\
If this is on, the list of active users will include the connection time
and the inactivity period for each user.")
(kom-idle-hide-doc . "\
The listing of active users normally only shows those users who have been
......@@ -2429,6 +2448,11 @@ Lists etc. : [INS] Add a line [DEL] Remove a line [*] Modify")
(kom-show-author-at-end-tag .
"Show the name of the author after the body: ")
(kom-truncate-threshold-tag .
"Truncate long texts: ")
(kom-truncate-show-lines-tag .
"Lines to show of truncated texts: ")
(kom-reading-puts-comments-in-pointers-last-tag . "Comment links are shown:")
(kom-read-depth-first-tag . "Read order:")
(kom-deferred-printing-tag . "Delayed display:")
......@@ -2444,6 +2468,8 @@ Lists etc. : [INS] Add a line [DEL] Remove a line [*] Modify")
"Number of minutes of inactivity before session is hidden: ")
(kom-show-where-and-what-tag .
"Show where sessions are logged on from and what they are doing: ")
(kom-show-since-and-when-tag .
"Show when sessions connected and how long they have been inactive: ")
......
......@@ -323,6 +323,7 @@ If there is no active area, then do something else."
(if entry
(progn
(setq going nil)
(message nil)
(funcall (cdr (car entry)) buf arg text))))
;; Help
......
......@@ -367,7 +367,9 @@ If the optional argument REFETCH is non-nil, all caches are cleared and
lyskom-reading-list))
priority
is-review-tree
(not is-review)))
(not is-review)
(or (eq type 'REVIEW)
(eq type 'REVIEW-MARK))))
(if mark-as-read
(lyskom-is-read text-no)
(read-list-delete-text nil lyskom-reading-list)
......@@ -1466,11 +1468,11 @@ Note that it is not allowed to use deferred insertions in the text."
result))))
(formatted (and fn (funcall fn text))))
(when (eq t lyskom-last-text-format-flags)
(lyskom-signal-reformatted-text
(if content-type
(lyskom-format 'reformat-generic content-type)
nil)))
;; (when (eq t lyskom-last-text-format-flags)
;; (lyskom-signal-reformatted-text
;; (if content-type
;; (lyskom-format 'reformat-generic content-type)
;; nil)))
(cond (formatted formatted)
(kom-text-properties
......@@ -1481,7 +1483,8 @@ Note that it is not allowed to use deferred insertions in the text."
(defun lyskom-signal-reformatted-text (how)
"Signal that the last text was reformatted HOW, which should be a string
in lyskom-messages."
(setq lyskom-last-text-format-flags how))
(or (memq how lyskom-last-text-format-flags)
(setq lyskom-last-text-format-flags (cons how lyskom-last-text-format-flags))))
(defun lyskom-w3-region (start end)
......@@ -1559,7 +1562,7 @@ in lyskom-messages."
(lyskom-fill-region (point-min) (point-max))
(goto-char (point-max)))
(forward-line 1))
(lyskom-signal-reformatted-text t)
(lyskom-signal-reformatted-text 'reformat-filled)
(if kom-text-properties
(lyskom-button-transform-text (buffer-string))
(buffer-substring (point-min) (1- (point-max))))))))
......
......@@ -66,6 +66,7 @@
"\n"
[kom-idle-hide]
[kom-show-where-and-what]
[kom-show-since-and-when]
"\n"
[kom-friends]
"\n"
......@@ -126,7 +127,9 @@
[kom-autowrap]
[kom-dashed-lines]
[kom-show-author-at-end]
"\n"
[kom-truncate-threshold]
[kom-truncate-show-lines]
"\n\n"
section
(writing bold centered)
......@@ -431,6 +434,11 @@ customize buffer but do not save them to the server."
(number nil :tag max-text-length))))
(kom-dashed-lines (toggle (on off)))
(kom-show-author-at-end (toggle (on off)))
(kom-truncate-threshold (choice ((const (off nil))
(number nil :tag truncate-threshold-lines))))
(kom-truncate-show-lines (number nil))
(kom-print-number-of-unread-on-entrance (toggle (yes no)))
(kom-presence-messages (choice ((const (on t))
(const (friends friends))
......@@ -446,6 +454,7 @@ customize buffer but do not save them to the server."
:tag some-persons
:menu-tag some-persons))))
(kom-show-where-and-what (toggle (yes no)))
(kom-show-since-and-when (toggle (yes no)))
(kom-idle-hide (number))
(kom-show-footnotes-immediately (toggle (yes no)))
(kom-follow-comments-outside-membership (toggle (yes no)))
......
......@@ -322,6 +322,9 @@ du har l
(is-in-conf . "Nrvarande i mte")
(from-machine . "Kr frn")
(is-doing . "Gr")
(connection-time . "Loggade in")
(active-last . "Aktiv senast")
(active . "Aktiv")
(lyskom-client . "Klient")
(text-to-add-recipient . "Vilket inlgg vill du addera mottagare till:")
(text-to-add-copy . "Vilket inlgg vill du addera en extra kopia till:")
......@@ -1080,10 +1083,12 @@ Uppkopplad sedan %#8s%#9s")
(language-set-to . "Sprket r %#1s.\n")
(language-not-loaded . "%#1s finns inte tillgngligt.\n")
(reformat-generic . "(%#1s)")
(reformat-html . "(HTML)")
(reformat-enriched . "(Enriched)")
(reformat-filled . "(Ombruten)")
;; (reformat-generic . "(%#1s)")
(reformat-html . "HTML")
(reformat-enriched . "enriched")
(reformat-filled . "ombruten")
(reformat-truncated . "nedkortad")
(need-library . "Paketet \"%#1s\" behvs fr att utfra detta kommando.\n")
(calc-expression . "Uttryck: ")
......@@ -1709,6 +1714,9 @@ Inneh
(define-key lyskom-sv-mode-map "sm" 'kom-status-conf)
(define-key lyskom-sv-mode-map "sp" 'kom-status-person)
(define-key lyskom-sv-mode-map "ss" 'kom-status-session)
(define-key lyskom-sv-mode-map (lyskom-keys [s ]) 'kom-send-message)
(define-key lyskom-sv-mode-map "s{" 'kom-send-message)
(define-key lyskom-sv-mode-map "s[" 'kom-send-message)
;; Running in buffer
......@@ -1959,6 +1967,8 @@ Inneh
(long-format . "Visa hjlptexter")
(short-format . "Gm hjlptexter ")
(truncate-threshold-lines . "Max rader")
;;
;; Misc doc strings
;;
......@@ -2210,6 +2220,14 @@ i servern. Annars sparas det i din .emacs.")
Om man har streckade linjer avslaget s visas frfattaren p samma
stt, men de streckade linjerna finns naturligtvis inte med.")
(kom-truncate-threshold-doc . "\
Om detta r pslaget kommer inlgg som r lngre n maxantalet att kortas
ner nr man terser kommentarer, terser markerade inlgg eller terser de
senaste eller frsta. Inlgg kortas inte av d man terser inlgg, terser
trd eller bara lser nsta inlgg.")
(kom-truncate-show-lines-doc . "\
Antalet rader som visas nr ett inlgg avkortats.")
(kom-dashed-lines-doc . "\
Om detta r pslaget visas streckade linjer fre och efter inlggstexten,
......@@ -2292,6 +2310,9 @@ i servern. Annars sparas det i din .emacs.")
6810 George Berkeley Filosofimtet
7571 John Locke Filosofimtet")
(kom-show-since-and-when-doc . "\
Information i vilkalistan om nr en person loggade in och hur lnge sedan
personen var aktiv.")
(kom-idle-hide-doc . "\
I vilkalistan visas per default enbart de sessioner som har varit aktiva
......@@ -2541,6 +2562,11 @@ i servern. Annars sparas det i din .emacs.")
(kom-show-author-at-end-tag .
"Visa frfattarens namn efter inlgget: ")
(kom-truncate-threshold-tag .
"Korta av lnga inlgg: ")
(kom-truncate-show-lines-tag .
"Rader att visa vid avkortade inlgg: ")
(kom-reading-puts-comments-in-pointers-last-tag . "Kommentarslnkar visas:")
(kom-read-depth-first-tag . "Lsordning:")
(kom-deferred-printing-tag . "Frdrjda utskrifter:")
......@@ -2556,6 +2582,8 @@ i servern. Annars sparas det i din .emacs.")
"Antal minuter en session fr vara inaktiv och nd visas: ")
(kom-show-where-and-what-tag .
"Visa varifrn personer r inloggade och vad de gr: ")
(kom-show-since-and-when-tag .
"Visa nr personer loggade in och nr de var aktiva: ")
......
......@@ -253,6 +253,20 @@ nil nil \"(%n) %f\"
server
inherited)
(def-kom-var kom-truncate-threshold nil
"*If non-nil, truncate long texts when revieiwing.
If the text is longer (in lines) then the threshold it will be
truncated to `kom-truncate-show-lines' length."
server)
(def-kom-var kom-truncate-show-lines nil
"*How many lines to show after truncating.
If the text is truncated by `kom-truncate-threshold', show this many
lines. If this is greater than the threshold, the threshold will be
used."
server)
(def-kom-var kom-print-number-of-unread-on-entrance t
"*If Non-nil then print automatically the number of unread articles when
entering a conference."
......@@ -284,6 +298,10 @@ changing name is printed."
and what he is doing."
server)
(def-kom-var kom-show-since-and-when nil
"*Non-nil means kom-who-is-on shows when the user connected and when
he was active last."
server)
(def-kom-var kom-idle-hide 30
"*The number of minutes of idle-time before a user is excluded from the list
......@@ -931,27 +949,6 @@ Users are encouraged to use their best sense of humor."
server)
;;; =================================================================
;;;
;;; Email import variables
;;;
(def-kom-var kom-mail-importer-persons nil
"*List of persons (numbers) which are mail importers.
Texts by these persons are formatted as email texts, rather than
ordinary LysKOM texts."
server)
(def-kom-var kom-mail-address
(concat (user-full-name) " <" user-mail-address ">")
"*Email address to use in From:-header."
server)
(def-kom-var kom-mail-visible-headers
'("to" "cc" "reply-to")
"*List of headers to show when displaying an email text."
server)
;;; =================================================================
;;;
......
......@@ -40,16 +40,19 @@
(defun lyskom-view-text (text-no &optional mark-as-read
follow-comments conf-stat priority
build-review-tree filter-active)
build-review-tree filter-active
flat-review)
"Display text number TEXT-NO.
Args: TEXT-NO &optional MARK-AS-READ FOLLOW-COMMENTS CONF-STAT
PRIORITY BUILD-REVIEW-TREE.
PRIORITY BUILD-REVIEW-TREE FLAT-REVIEW.
If MARK-AS-READ is non-nil the text will be marked as read.
If FOLLOW-COMMENTS is non-nil all comments and footnotes to this text will be
read before the next text. CONF-STAT must be the conference status of the
current conference, and PRIORITY the priority, if FOLLOW-COMMENTS is non-nil.
If BUILD-REVIEW-TREE is non-nil then it fixes a new entry in the
lyskom-reading-list to read the comments to this.
If FLAT-REVIEW is non-nil this is a review caused by lyskom-view-commented or
kom-view-text viewing REVIEW or REVIEW-MARK text.
Note that this function must not be called asynchronously."
......@@ -201,7 +204,7 @@ Note that this function must not be called asynchronously."
num-marks))))))
(lyskom-print-text text-stat text
mark-as-read text-no))
mark-as-read text-no flat-review))
(let ((text nil))
......@@ -488,8 +491,19 @@ the user is a member of. Uses blocking-do. Returns t if TEXT-STAT is nil."
""
(make-string (- 42 (length author-name)) ?-))
"------------------------------------------")
(if format-flags
(lyskom-get-string format-flags)
(if (and format-flags (listp format-flags))
(let ((first-flag t))
(concat
"("
(mapconcat (function
(lambda (str)
(cond
(first-flag
(setq first-flag nil)
(upcase-initials (lyskom-get-string str)))
(t (lyskom-get-string str)))))
format-flags ", ")
")"))
""))
(while (string-match "%\\(=?-?[0-9]+\\)?\\([-nPpf% ]\\)" format start)
......@@ -565,11 +579,11 @@ the user is a member of. Uses blocking-do. Returns t if TEXT-STAT is nil."
format-flags))))
(defun lyskom-print-text (text-stat text mark-as-read text-no)
(defun lyskom-print-text (text-stat text mark-as-read text-no flat-review)
"Print a text. The header must already be printed.
Print an error message if TEXT-STAT or TEXT is nil.
Mark the text as read if (and only if) MARK-AS-READ is non-nil.
Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO."
Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO FLAT-REVIEW."
(let ((lyskom-current-function 'lyskom-print-text))
(cond
((or (null text)
......@@ -579,6 +593,7 @@ Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO."
(setq lyskom-current-text text-no))
(t
(let* ((str (text->text-mass text))
(truncated nil)
;; s1 s2 t1 t2
body)
(cond
......@@ -594,8 +609,32 @@ Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO."
"------------------------------------------------------------\n")
(lyskom-insert "\n"))
;; (setq t1 (point-max))
;; Truncate body if flat-review and long text
(if (and flat-review kom-truncate-show-lines kom-truncate-threshold)
(let ((lines 0)
(pos 0)
(show-lines (min kom-truncate-show-lines
kom-truncate-threshold))
last-line)
(while (and pos (setq pos (string-match "\n" body pos)))
(setq pos (1+ pos))
(setq lines (1+ lines))
(if (= lines show-lines)
(setq last-line (1- pos)))
(if (>= lines kom-truncate-threshold)
(setq body (substring body 0 last-line)
pos nil
truncated t)))))
(let ((lyskom-current-function-phase 'body))
(lyskom-format-insert "%#1t" (cons text-stat body)))
;; Indicate that the text was truncated
(if truncated
(setq lyskom-last-text-format-flags
(cons 'reformat-truncated lyskom-last-text-format-flags)))
;; (setq t2 (point-max))
)
(t ;No \n found. Don't print header.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment