Commit 7bee7316 authored by David Byers's avatar David Byers
Browse files

Fixed bugs 979, 995, 987, 745. Work on bug 983.

> 2003-03-13  David Byers  <david.byers@swipnet.se>
>
> 	Some work on bug 983:
> 	* option-edit.el (lyskom-custom-variables): Added
> 	kom-highlight-conferences.
>
> 	* lyskom-buttons.el (lyskom-generate-button): Allow explicit lists
> 	of numbers as the key in kom-highlight-conferences.
>
> 	Fix bug 745 (Patch from C C Magnus Gustavsson):
> 	* review.el (kom-review-converted): New command.
>
> 	* vars.el.in (lyskom-commands): Added kom-review-converted.
> 	(lyskom-button-actions): Added lyskom-button-review-converted.
>
> 	* lyskom-buttons.el (lyskom-button-review-converted): New
> 	function.
>
> 	Fix bug 987:
> 	* commands1.el (kom-list-conferences): Print legend.
>
> 	Fix bug 995:
> 	* utilities.el (lyskom-get-send-comments-to): Handle CONF-NO set
> 	to nil.
>
> 	Fix bug 979:
> 	* option-edit.el (lyskom-customize-buffer-format): Added
> 	kom-show-sync-messages.
> 	(lyskom-custom-variables): Ditto.
>
> 	* vars.el.in (kom-show-sync-messages): New variable.
>
> 	* async.el (lyskom-parse-async): Use it.
>
> 2003-03-11  David Byers  <david.byers@swipnet.se>
>
> 	* utilities.el (lyskom-buffer-display-message): New function.
>
> 2003-02-09  David Byers  <david.byers@swipnet.se>
>
> 	* lyskom-buttons.el (lyskom-generate-button): Use
> 	kom-highlight-conferences instead of kom-friends and kom-morons.
>
> 	* vars.el.in (kom-highlight-conferences): New variable
>
parent e76db5ce
2003-03-08 Per Cederqvist <ceder@ceder.dyndns.org>
2003-03-13 David Byers <david.byers@swipnet.se>
Some work on bug 983:
* option-edit.el (lyskom-custom-variables): Added
kom-highlight-conferences.
* lyskom-buttons.el (lyskom-generate-button): Allow explicit lists
of numbers as the key in kom-highlight-conferences.
Fix bug 745 (Patch from C C Magnus Gustavsson):
* review.el (kom-review-converted): New command.
* vars.el.in (lyskom-commands): Added kom-review-converted.
(lyskom-button-actions): Added lyskom-button-review-converted.
* lyskom-buttons.el (lyskom-button-review-converted): New
function.
Fix bug 987:
* commands1.el (kom-list-conferences): Print legend.
Fix bug 995:
* utilities.el (lyskom-get-send-comments-to): Handle CONF-NO set
to nil.
Fix bug 979:
* option-edit.el (lyskom-customize-buffer-format): Added
kom-show-sync-messages.
(lyskom-custom-variables): Ditto.
* vars.el.in (kom-show-sync-messages): New variable.
* async.el (lyskom-parse-async): Use it.
2003-03-11 David Byers <david.byers@swipnet.se>
* utilities.el (lyskom-buffer-display-message): New function.
2003-02-09 David Byers <david.byers@swipnet.se>
* lyskom-buttons.el (lyskom-generate-button): Use
kom-highlight-conferences instead of kom-friends and kom-morons.
* vars.el.in (kom-highlight-conferences): New variable
2003-03-08 Per Cederqvist <ceder@ceder.dyndns.org>
kom-review-backward always raised an error.
* review.el (kom-review-backward): Extract the list of texts to
......@@ -51,7 +97,7 @@
2003-01-15 David Byers <david.byers@swipnet.se>
* vars.el.in: Minor fixes to documentation.
* vars.el.in: YES! YES! YES! FINALLY DONE (FOR NOW)! All user
variables (well at least nearly all) are documented! God, this was
boring work.
......
......@@ -127,7 +127,8 @@ this function shall be with current-buffer the BUFFER."
(lyskom-save-excursion
(set-buffer buffer)
;; I removed the test for kom-presence-messages /david
(if (not (lyskom-is-in-minibuffer))
(if (and (not (lyskom-is-in-minibuffer))
kom-show-sync-messages)
(lyskom-message "%s" (lyskom-get-string 'database-sync)))
(setq mode-line-process (lyskom-get-string 'mode-line-saving))
(setq lyskom-is-saving t)
......
......@@ -1786,8 +1786,10 @@ For more flexible searching, use `kom-list-re'."
(let ((result (blocking-do 'lookup-z-name match 0 1)))
(if result
(if (conf-z-info-list->conf-z-infos result)
(lyskom-traverse info (conf-z-info-list->conf-z-infos result)
(lyskom-list-conf-print info))
(progn
(lyskom-traverse info (conf-z-info-list->conf-z-infos result)
(lyskom-list-conf-print info))
(lyskom-insert 'conf-list-legend))
(lyskom-format-insert 'no-matching-confs match))
(lyskom-insert (lyskom-current-error)))))
......
......@@ -1602,6 +1602,7 @@ You must become an active member of the conference to enter it.\n")
(start-keep-alive . "Sending data at %#1d second intervals to keep the connection active.")
(stop-keep-alive . "No longer keeping connection active by sending extra data.")
(review-converted-q . "Review which text converted?")
(review-noconversion-q . "Review which text unconverted?")
(review-commented-q . "Review the commented for which text?")
......@@ -1650,6 +1651,7 @@ You must become an active member of the conference to enter it.\n")
(lyskom-button-view-text-action . "View text")
(lyskom-button-copy-text-no-action . "Copy text number")
(lyskom-button-review-converted-action . "Review converted")
(lyskom-button-review-noconversion-action . "Review unconverted")
(lyskom-button-find-root-review-action . "Review tree")
(lyskom-button-find-root-action . "Review root text")
......@@ -1844,6 +1846,7 @@ environment to one that uses \"%#2s\" to encode text.
(reading-settings-from-done . "Reading options from %s...done")
(super-jump-q . "Super jump which text? ")
(conf-list-legend . "* Not member; - Passive member\n")
))
......@@ -1907,6 +1910,7 @@ environment to one that uses \"%#2s\" to encode text.
(kom-review-clear . "Review and skip")
(kom-review-last-normally-read
. "Review again")
(kom-review-converted . "Review converted")
(kom-review-noconversion . "Review unconverted")
(kom-review-next . "Review next")
(kom-find-root . "Review original (text)")
......@@ -2394,6 +2398,7 @@ environment to one that uses \"%#2s\" to encode text.
(define-key lyskom-en-review-prefix (kbd "j") 'kom-review-clear)
(define-key lyskom-en-review-prefix (kbd "n") 'kom-review-next)
(define-key lyskom-en-review-prefix (kbd "u") 'kom-review-noconversion)
(define-key lyskom-en-review-prefix (kbd "v") 'kom-review-converted)
(define-key lyskom-en-review-prefix (kbd "o") 'kom-find-root)
(define-key lyskom-en-review-prefix (kbd "l") 'kom-review-by-to)
(define-key lyskom-en-review-prefix (kbd "f") 'kom-review-first)
......@@ -2782,6 +2787,13 @@ Select whether to execute command or keyboard macro.")
(lynx-xterm . "Lynx in xterm")
(lynx-emacs . "Lynx in emacs terminal-mode")
(morons . "Morons and other \"special\" people")
(friends . "Friends and other special people")
(me . "Mig, myself and I")
(highlight-conferences . "Conferences:")
(highlight-face . "Face:")
(highlight-conflist . "Conference list")
;;
;; Misc doc strings
;;
......@@ -3800,6 +3812,13 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-lynx-xterm-command-doc . "\
This is the command to use to start Lynx in an xterm. The command
neets to start both the terminal emulator and lynx.")
(kom-show-sync-messages-doc . "\
When this is on, the client will display a message when the LysKOM
server signals that it is saving the database.")
(kom-highlight-conferences-doc . "\
This setting controls display of conference names. For each choice
it is possible to select a face. The value must be either a face or
the name of a variable that contains a face.")
;;
;; Tags for variables
......@@ -4001,6 +4020,8 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-lynx-terminal-command-tag . "Command to run lynx in emacs:")
(kom-lynx-terminal-tag . "Where to run lynx:")
(kom-lynx-xterm-command-tag . "Command to run lynx in xterm:")
(kom-show-sync-messages-tag . "Show database-saving message:")
(kom-highlight-conferences-tag . "Display of names::")
)
)
......
......@@ -475,11 +475,34 @@ kom-next- and -previous-link won't notice the button"
numarg)
(list 'face
(or face
(cond ((eq persno numarg) kom-me-face)
((memq numarg kom-friends) kom-friends-face)
((memq numarg kom-morons) kom-morons-face)
(t kom-active-face)))
(or
(lyskom-traverse el kom-highlight-conferences
(cond ((and (symbolp (car el))
(boundp (car el))
(listp (symbol-value (car el)))
(memq numarg (symbol-value (car el))))
(lyskom-traverse-break
(cond ((facep (cdr el)) (cdr el))
((and (symbolp (cdr el))
(boundp (cdr el)))
(symbol-value (cdr el))))))
((and (symbolp (car el))
(boundp (car el))
(eq numarg (symbol-value (car el))))
(lyskom-traverse-break
(cond ((facep (cdr el)) (cdr el))
((and (symbolp (cdr el))
(boundp (cdr el)))
(symbol-value (cdr el))))))
((and (listp (car el))
(memq numarg (car el)))
(lyskom-traverse-break
(cond ((facep (cdr el)) (cdr el))
((and (symbolp (cdr el))
(boundp (cdr el)))
(symbol-value (cdr el)))))))
nil)
kom-active-face))
'mouse-face kom-highlight-face
'lyskom-button-text text
'lyskom-button-type type
......@@ -636,6 +659,14 @@ Last argument TEXT is ignored. This is a LysKOM button action."
(goto-char (point-max))
(kom-review-noconversion arg))))
(defun lyskom-button-review-converted (buf arg text)
"In the LysKOM buffer BUF, view the text ARG converted.
Last argument TEXT is ignored. This is a LysKOM button action."
(cond ((not (integerp arg)) nil)
(t (pop-to-buffer buf)
(goto-char (point-max))
(kom-review-converted arg))))
(defun lyskom-button-find-root-review (buf arg text)
"In the LysKOM buffer BUF, view the text ARG. Last argument TEXT is ignored.
This is a LysKOM button action."
......
......@@ -75,6 +75,7 @@
[kom-show-where-and-what]
[kom-show-since-and-when]
"\n"
[kom-highlight-conferences]
[kom-friends]
[kom-morons]
"\n"
......@@ -90,6 +91,7 @@
[kom-trim-buffer-minimum]
[kom-bury-buffers]
[kom-keep-alive-interval]
[kom-show-sync-messages]
"\n"
[kom-agree-text]
[kom-mercial]
......@@ -661,6 +663,23 @@ customize buffer but do not save them to the server."
(const (sender-rcpt sender))
(const (last-recipient-recpt last-recipient)))))
(kom-filter-outgoing-messages (noggle (yes no)))
(kom-highlight-conferences
(repeat (cons ((choice ((const (morons kom-morons))
(const (friends kom-friends))
(const (me lyskom-pers-no))
(repeat (person nil :tag name)
:indent 12
:tag highlight-conflist
:lyskom-predicate (pers conf)
:menu-tag highlight-conflist)
)
:tag highlight-conferences
:format "%[%t%] %v\n"
)
(face nil :tag highlight-face))
:format "%v"
)
))
(kom-friends (repeat (person nil :tag name) :indent 4))
(kom-morons (repeat (person nil :tag name) :indent 4))
(kom-url-viewer-preferences (repeat (url-viewer nil :tag viewer-program)
......@@ -804,6 +823,7 @@ customize buffer but do not save them to the server."
(kom-dashed-lines-face (face t))
(kom-async-text-body-face (face t))
(kom-async-dashed-lines-face (face t))
(kom-show-sync-messages (toggle (yes no)))
))
(defvar lyskom-widget-functions
......@@ -1075,11 +1095,15 @@ customize buffer but do not save them to the server."
:value nil
:format "%t"))
wargs)))
(lyskom-build-simple-widget-spec
'menu-choice
(list ':format "%[%t%] %v\n"
':args wargs)
propl)))
(if args
(lyskom-build-simple-widget-spec 'menu-choice
(list ':format "%[%t%] %v\n")
propl)
(lyskom-build-simple-widget-spec 'symbol
(list ':format "%[%t%] %v\n"
':size 30
':args wargs)
propl))))
(defun lyskom-url-viewer-widget (type &optional args propl var)
(lyskom-build-simple-widget-spec
......
......@@ -1404,6 +1404,28 @@ This command accepts text number prefix arguments \(see
(lyskom-view-text text-no))
(lyskom-insert 'confusion-what-to-view)))
;;; ============================================================
;;; Återse konverterat - Review a text converted
(def-kom-command kom-review-converted (text-no)
"Displays the selected text with all conversions enabled, even if
some or all of them have are disabled by current settings.
This command accepts text number prefix arguments \(see
`lyskom-read-text-no-prefix-arg')."
(interactive (list (lyskom-read-text-no-prefix-arg 'review-converted-q)))
(if text-no
(let ((lyskom-format-special nil)
(kom-smileys t)
(kom-autowrap t)
(kom-format-html-authors '((t . t))))
(unless kom-review-uses-cache
(cache-del-text-stat text-no))
(lyskom-view-text text-no))
(lyskom-insert 'confusion-what-to-view)))
(defun lyskom-review-get-priority ()
......
......@@ -1639,6 +1639,7 @@ Du m
(start-keep-alive . "Snder data med %#1d sekunders mellanrum fr att hlla frbindelsen aktiv.")
(stop-keep-alive . "Data snds inte lngre fr att hlla frbindelsen aktiv.")
(review-converted-q . "terse vilket inlgg konverterat?")
(review-noconversion-q . "terse vilket inlgg omodifierat?")
(review-commented-q . "terse vilket inlgg kommenterade?")
(review-tree-q . "terse alla kommentarer rekursivt fr vilket inlgg?")
......@@ -1687,6 +1688,7 @@ Du m
(lyskom-button-view-text-action . "terse texten")
(lyskom-button-copy-text-no-action . "Kopiera inlggsnumret")
(lyskom-button-review-converted-action . "terse konverterat")
(lyskom-button-review-noconversion-action . "terse omodifierat")
(lyskom-button-find-root-review-action . "terse trd")
(lyskom-button-find-root-action . "terse urinlgget")
......@@ -1781,7 +1783,7 @@ Ignorerar f
Variablerna r inte registrerade LysKOM-variabler och kan drfr inte
lsas frn servern. Du kan ta bort variablerna frn servern genom att
ge kommandot \"Spara variabler\".\n\n")
ge kommandot \"Spara instllningar\".\n\n")
(unknown-aux-item . "Oknd tillggsinformation")
(text-header-aux-item . "%#1s: <%#2d> \"%#3s\" %#4s")
......@@ -1879,6 +1881,7 @@ teckenkodning.
(reading-settings-from-done . "Lser instllningar frn %s...klart")
(super-jump-q . "Superhoppa vilket inlgg? ")
(conf-list-legend . "* Ej medlem; - Passiv medlem\n")
))
(lyskom-language-var local lyskom-month-names sv
......@@ -1941,6 +1944,7 @@ teckenkodning.
(kom-review-clear . "terse hoppa")
(kom-review-last-normally-read
. "terse igen")
(kom-review-converted . "terse konverterat")
(kom-review-noconversion . "terse omodifierat")
(kom-review-next . "terse nsta")
(kom-find-root . "terse urinlgget")
......@@ -2491,6 +2495,7 @@ teckenkodning.
(define-key lyskom-sv-review-prefix (kbd "i") 'kom-review-last-normally-read)
(define-key lyskom-sv-review-prefix (kbd "n") 'kom-review-next)
(define-key lyskom-sv-review-prefix (kbd "o") 'kom-review-noconversion)
(define-key lyskom-sv-review-prefix (kbd "v") 'kom-review-converted)
(define-key lyskom-sv-review-prefix (kbd "r") 'kom-find-root)
(define-key lyskom-sv-review-prefix (kbd "u") 'kom-find-root)
(define-key lyskom-sv-review-prefix (kbd "s") 'kom-review-by-to)
......@@ -2899,6 +2904,13 @@ teckenkodning.
(lynx-xterm . "Lynx i xterm")
(lynx-emacs . "Lynx i emacs terminal-mode")
(morons . "Idioter och knppskallar")
(friends . "Vnner och bekanta")
(me . "Mig sjlv och ingen annan")
(highlight-conferences . "Mten:")
(highlight-face . "Utseende:")
(highlight-conflist . "Mteslista")
;;
;; Misc doc strings
;;
......@@ -3922,6 +3934,13 @@ i servern. Annars sparas det i din .emacs.")
(kom-lynx-xterm-command-doc . "\
Kommandot som anvnds fr att starta Lynx i en xterm. Kommandot ska
starta bde xterm och lynx.")
(kom-show-sync-messages-doc . "\
Om denna instllning r pslagen s kommer klienten att visa ett
meddelande i ekoarean nt servern signallerar att den hller p
spara databasen.")
(kom-highlight-conferences-doc . "\
Denna instllning styr hur mtesnamn frglggs. Fr varje val
kan ett utseende anges. Utseendena r namn p faces i Emacs.")
......@@ -4124,6 +4143,8 @@ i servern. Annars sparas det i din .emacs.")
(kom-lynx-terminal-command-tag . "Kommando fr Lynx i Emacs:")
(kom-lynx-terminal-tag . "Var ska Lynx kra:")
(kom-lynx-xterm-command-tag . "Kommando fr Lynx i xterm:")
(kom-show-sync-messages-tag . "Visa databasen-sparar-meddelanden:")
(kom-highlight-conferences-tag . "Frglggning av namn:")
)
)
......
......@@ -527,6 +527,25 @@ the resulting string may be narrower than END-COLUMN."
str))))
(defun lyskom-buffer-display-message (string &optional buffer)
(let* ((inhibit-read-only t)
(buffer (or buffer (current-buffer)))
(window (cdr
(assoc (selected-frame)
(mapcar (lambda (x) (cons (window-frame x) x))
(get-buffer-window-list buffer))))))
(erase-buffer)
(unless window (setq window (display-buffer buffer)))
(select-window window)
(delete-other-windows window)
(insert (make-string (/ (window-height window) 3) ?\n))
(insert string)
(center-region (point-min) (point-max))
(goto-char (point-min))
(fundamental-mode)
(toggle-read-only t)))
(eval-and-compile
(lyskom-xemacs-or-gnu
(fset 'lyskom-string= (symbol-function 'string=))
......@@ -1253,9 +1272,9 @@ Returns nil if there is no send-comments-to set.
f WANT-TYPE is set, return as a conf (RECPT . TYPE), wher RECPT
is the conference to use and TYPE is the type of recipient (numeric)."
(let* ((conf-stat (if (lyskom-conf-stat-p conf-no)
conf-no
(blocking-do 'get-conf-stat conf-no)))
(let* ((conf-stat (if (numberp conf-no)
(blocking-do 'get-conf-stat conf-no)
conf-no))
(send-comments-to
(and conf-stat
(car (lyskom-get-aux-item (conf-stat->aux-items conf-stat) 33))))
......
......@@ -134,6 +134,18 @@ if the variable is in kom-dont-read-saved-variables."
;;; User flags
(def-kom-var kom-show-sync-messages nil
"**Controls display of database saving message.
When this variable is set to `t', the client will show a message in
the echo area when the LysKOM server signals that it is saving the
database. When set to `nil', no message is shown (the mode line is
changed regardless of the setting of this variable).
Values other than `t' and `nil' are reserved for future use."
server)
(def-kom-var kom-text-links
'((t ("\\<bug[ \t\n]+\\([0-9]+\\)\\>"
"http://bugzilla.lysator.liu.se/show_bug.cgi?id=\\1"
......@@ -1635,6 +1647,27 @@ the same way normal messages are shown when sent.
Values other than `t' and `nil' are reserved for future use."
server)
(def-kom-var kom-highlight-conferences
'((kom-friends . kom-friends-face)
(kom-morons . kom-morons-face)
(lyskom-pers-no . kom-me-face))
"**How to highlight conference an person names.
The value of this variable is an alist whose keys are matched against
conference numbers and whose values are the names of faces to use for
matching conferences.
The following values are legal for keys:
Value Meaning
Symbol If the value is a list, matches if the conference
number is in the list. If the value is an integer,
matches if the conference number matches the integer.
List Matches if the conference number is in the list.
All other values are reserved for future use."
server)
(def-kom-var kom-friends nil
"**List of friends and other nice people.
......@@ -2454,6 +2487,7 @@ Values other than `nil' and strings are reserved for future use."
((lyskom-button-view-text-action . lyskom-button-view-text)
(lyskom-button-copy-text-no-action . lyskom-button-copy-text-no)
(lyskom-button-review-noconversion-action . lyskom-button-review-noconversion)
(lyskom-button-review-converted-action . lyskom-button-review-converted)
(lyskom-button-find-root-review-action . lyskom-button-find-root-review)
(lyskom-button-find-root-action . lyskom-button-find-root)
(lyskom-button-review-comments-action . lyskom-button-review-comments)
......@@ -2758,6 +2792,7 @@ Users are encouraged to use their best sense of humor."
kom-review-clear
kom-review-last-normally-read
kom-review-noconversion
kom-review-converted
kom-review-next
kom-find-root
kom-review-by-to
......
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