From 41bffe96d55ac1d45331be3714f9ef035153a08e Mon Sep 17 00:00:00 2001 From: David Byers <david.byers@liu.se> Date: Wed, 10 Sep 1997 13:14:28 +0000 Subject: [PATCH] =?UTF-8?q?Bugfixar=20Nya=20features=20i=20lyskom-edit-mod?= =?UTF-8?q?e:=20-=20Flytta=20text=20-=20L=C3=A4gga=20till=20kommentarsl?= =?UTF-8?q?=C3=A4nk=20Hantera=20misc-info=20nr=2015=20S=C3=A4kert=20en=20d?= =?UTF-8?q?el=20annat=20sm=C3=A5tt...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ChangeLog | 78 +++++++++++++++++++++++++++ src/TODO | 10 ++-- src/async.el | 3 +- src/commands1.el | 54 +++++++++++++++---- src/commands2.el | 12 +++-- src/compatibility.el | 13 ++++- src/edit-text.el | 119 ++++++++++++++++++++++++++++++++++++++--- src/english-strings.el | 51 ++++++++++-------- src/filter.el | 13 +++-- src/komtypes.el | 3 +- src/lyskom-rest.el | 5 +- src/parse.el | 4 +- src/prefetch.el | 3 ++ src/swedish-strings.el | Bin 116073 -> 116754 bytes src/vars.el.in | 10 +++- src/view-text.el | 16 ++++-- 16 files changed, 334 insertions(+), 60 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 312e1ae4..94beb7f4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,81 @@ +Wed Sep 10 11:23:33 1997 David Byers <davby@ida.liu.se> + + * edit-text.el (lyskom-edit-replace-miscs): Ny funktion. + (lyskom-edit-translate-miscs): Ny funktion. + (lyskom-edit-move-recipients): Ny funktion. + (kom-edit-move-recipients): Ny funktion. + (lyskom-edit-add-recipient/copy): Tar ett extra argument + what-to-do. + + * compatibility.el (lyskom-xemacs-keysym): Lade till C-� och C-� + (lyskom-gnu-keysym): Dito. + (characerp): Lade till definition f�r icke-MULEiserade Emacsen. + + * english-strings.el,swedish-strings.el (lyskom-sv-edit-mode-map): + Bytte ut alla C-c <bokstav> mot C-c C-<bokstav> + + * edit-text.el (kom-edit-add-comment): Ny funktion. + + * swedish-strings.el (lyskom-message): Lade till text-to-comment-q + + * edit-text.el (kom-edit-insert-text): Lade till window-argumented + till kom-edit-insert-text. + +Tue Sep 9 12:05:32 1997 David Byers <davby@ida.liu.se> + + * commands2.el (lyskom-help): Fixade buggen. + +Mon Sep 8 15:49:30 1997 David Byers <davby@ida.liu.se> + + * english-strings.el,swedish-strings.el (lyskom-sv-edit-mode-map): + Bind f�rhelvete inte C-c k! + +Thu Sep 4 18:07:14 1997 David Byers <davby@ida.liu.se> + + * commands1.el (kom-add-bcc): Nytt kommando + + * services.el (initiate-add-recipient): St�d f�r bcc-recpt. + + * lyskom-rest.el (lyskom-format-misc-item): St�d f�r bcc-recpt. + + * vars.el.in (lyskom-bcc-flag): Ny variabel. + + * edit-text.el (kom-edit-add-bcc): Ny funktion. + + * vars.el.in (lyskom-last-added-bccrcpt): Ny variabel. + + * commands1.el (lyskom-comment-recipients): Lade till st�d f�r + bcc-recpt. + (lyskom-add-sub-recipient): Dito. + + * english-strings.el, swedish-strings.el (lyskom-message): Lade + till BCC-RECPT relaterade str�ngar. + + * view-text.el (lyskom-view-text): Hantera BCC-RECPT + (lyskom-text-read-p): Dito. + (lyskom-text-read-at-least-once-p): Dito. + (lyskom-mark-as-read): Dito. + (lyskom-print-header-recpt): Dito. + + * prefetch.el (lyskom-prefetch-text-all-handler): Hantera BCC-RECPT + (lyskom-prefetch-texttree-handler): Dito. + (lyskom-prefetch-texts-handler): Dito. + + * lyskom-rest.el (lyskom-is-read-handler): Hantera BCC-RECPT. + + * komtypes.el (lyskom-create-misc-info): Uppdaterade doc-str�ngen. + + * filter.el (kom-super-jump): Hantera BCC-RECPT + + * commands1.el (lyskom-get-recipients-from-misc-list): Hantera + BCC-RECPT + + * async.el (lyskom-async-new-text): St�d f�r BCC-RECPT + + * filter.el (lyskom-filter-text-p-2): St�d f�r BCC-RECPT + + * parse.el (lyskom-parse-misc-info-list-sub): Parsea bcc-recpt. + Mon Aug 18 10:15:45 1997 David Byers <davby@ida.liu.se> * lyskom-rest.el (find-face): Deklarerade extern. diff --git a/src/TODO b/src/TODO index a0db11da..34d8307d 100644 --- a/src/TODO +++ b/src/TODO @@ -4,10 +4,6 @@ Att g -------- Buggar - Radera inl�gg borde gn�lla lite om det finns markeringar. - - �terse alla markerade borde g� att avbryta med n�sta m�te. - lyskom-replace-deferred verkar inte anv�nda lyskom-last-viewed i alla fall. Och den beter sig fel n�r man st�r vid prompten och vill bl�ddra bak�t. @@ -65,6 +61,12 @@ Att g -------- Allm�nna f�rb�ttringar + Filtrera asynkrona meddelanden (Pontus Lidman) + + Radera inl�gg borde gn�lla lite om det finns markeringar. + + �terse alla markerade borde g� att avbryta med n�sta m�te. + F�rgl�ggning av meddelanden baserat p� varifr�n de kommer, och vart det g�r. John Olsson efterfr�gar. diff --git a/src/async.el b/src/async.el index 04f69200..49964778 100644 --- a/src/async.el +++ b/src/async.el @@ -446,7 +446,8 @@ converted, before insertion." (let ((type (misc-info->type misc-info))) (cond ((or (eq type 'RECPT) - (eq type 'CC-RECPT)) + (eq type 'CC-RECPT) + (eq type 'BCC-RECPT)) ;; add on lyskom-reading-list and lyskom-to-do-list if ;; this recipient is a recipient that has been checked. (if (and (eq (misc-info->recipient-no misc-info) diff --git a/src/commands1.el b/src/commands1.el index b5661efa..88674366 100644 --- a/src/commands1.el +++ b/src/commands1.el @@ -681,7 +681,8 @@ The default subject is SUBJECT. TYPE is either 'comment or 'footnote." (if (null text-stat) (progn (lyskom-insert-string 'confusion-what-to-comment)) - (let ((ccrep)) + (let ((ccrep nil) + (bccrep nil)) (lyskom-tell-internat (if (eq type 'comment) 'kom-tell-write-comment 'kom-tell-write-footnote)) @@ -699,24 +700,32 @@ The default subject is SUBJECT. TYPE is either 'comment or 'footnote." (eq 'CC-RECPT (misc-info->type misc-info))) (setq ccrep (cons (misc-info->recipient-no misc-info) ccrep)) + (setq data (cons (blocking-do 'get-conf-stat + (misc-info->recipient-no misc-info)) + data))) + ((and (eq type 'footnote) + (eq 'BCC-RECPT (misc-info->type misc-info))) + (setq bccrep (cons (misc-info->recipient-no misc-info) + bccrep)) (setq data (cons (blocking-do 'get-conf-stat (misc-info->recipient-no misc-info)) data)))))) (text-stat->misc-info-list text-stat)) (lyskom-comment-recipients data lyskom-proc text-stat - subject type ccrep))))) + subject type ccrep bccrep))))) (defun lyskom-comment-recipients (data lyskom-proc text-stat - subject type ccrep) + subject type ccrep bccrep) "Compute recipients to a comment to a text. -Args: DATA, LYSKOM-PROC TEXT-STAT SUBJECT TYPE CCREP. +Args: DATA, LYSKOM-PROC TEXT-STAT SUBJECT TYPE CCREP BCCREP. DATA is a list of all the recipients that should receive this text. If DATA contains more than one conference the user is asked (using y-or-n-p) if all conferences really should receive the text. The call is continued to the lyskom-edit-text. TYPE is info whether this is going to be a comment of footnote. -CCREP is a list of all recipients that are going to be cc-recipients." +CCREP is a list of all recipients that are going to be cc-recipients. +BCCREP is a list of all recipient that are going to be bcc-recipients." (condition-case nil ;; Catch any quits @@ -753,10 +762,12 @@ CCREP is a list of all recipients that are going to be cc-recipients." (setq recver (append recver (list - (cons (if (memq (conf-stat->conf-no conf-stat) - ccrep) - 'cc-recpt - 'recpt) + (cons (cond + ((memq (conf-stat->conf-no conf-stat) + ccrep) 'cc-recpt) + ((memq (conf-stat->conf-no conf-stat) + bccrep) 'bcc-recpt) + (t 'recpt)) (conf-stat->comm-conf conf-stat))))) (if (lyskom-get-membership (conf-stat->conf-no conf-stat)) (setq member t)) @@ -936,7 +947,8 @@ Don't ask for confirmation." (type (misc-info->type info))) (cond ((null misc-list) '()) ((or (eq type 'RECPT) - (eq type 'CC-RECPT)) + (eq type 'CC-RECPT) + (eq type 'BCC-RECPT)) (append (list (intern (downcase (symbol-name type))) (misc-info->recipient-no info)) (lyskom-get-recipients-from-misc-list @@ -2555,6 +2567,16 @@ the user has used a prefix command argument." 'add-copy conf))) +(def-kom-command kom-add-bcc (text-no-arg) + "Add a cc recipient to a text. If the argument TEXT-NO-ARG is non-nil, +the user has used a prefix command argument." + (interactive "P") + (let ((conf (blocking-do 'get-conf-stat lyskom-last-added-bccrcpt))) + (lyskom-add-sub-recipient text-no-arg + (lyskom-get-string 'text-to-add-bcc) + 'add-bcc + conf))) + (def-kom-command kom-sub-recipient (text-no-arg) "Subtract a recipient from a text. If the argument TEXT-NO-ARG is non-nil, the user has used a prefix command argument." @@ -2632,6 +2654,18 @@ command argument." (conf-stat->conf-no conf-to-add-to) 'cc-recpt)) + ((eq action 'add-bcc) + (lyskom-format-insert 'adding-name-as-copy + conf-to-add-to + text-stat) + (setq lyskom-last-added-bccrcpt + (conf-stat->conf-no conf-to-add-to)) + (blocking-do 'add-recipient + text-no + (conf-stat->conf-no conf-to-add-to) + 'bcc-recpt)) + + ((eq action 'sub) (lyskom-format-insert 'remove-name-as-recipient conf-to-add-to diff --git a/src/commands2.el b/src/commands2.el index 40209650..36ba55e9 100644 --- a/src/commands2.el +++ b/src/commands2.el @@ -972,11 +972,13 @@ Format is 23:29 if the text is written today. Otherwise 04-01." (function (lambda (arg) (format "%s - %s" - (if (fboundp 'map-keymap) - (if (symbolp (car arg)) - (format "%s" (car arg)) - (format "%c" (car arg))) - (format "%c" (car arg))) + (if (fboundp 'key-description) + (key-description (car arg)) + (cond ((symbolp (car arg)) + (format "%s" (car arg))) + ((characterp (car arg)) + (format "%c" (car arg))) + (t (format "%S" (car arg))))) (or (lyskom-command-name (cdr arg)) (and (keymapp (cdr arg)) (lyskom-get-string diff --git a/src/compatibility.el b/src/compatibility.el index 8343cbbf..2f21360c 100644 --- a/src/compatibility.el +++ b/src/compatibility.el @@ -143,6 +143,9 @@ of the lyskom-provide-* functions instead." (lyskom-provide-macro byte-code-function-p (obj) (` (compiled-function-p (, obj)))) +(lyskom-provide-function characterp (obj) + (integerp obj)) + (lyskom-compatibility-forms (fboundp 'frame-width) (fset 'frame-width 'screen-width)) @@ -177,13 +180,21 @@ of the lyskom-provide-* functions instead." (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 �)) + (� . ?\�) (� . ?\�) (� . ?\�) (� . ?\�) diff --git a/src/edit-text.el b/src/edit-text.el index c2c9aeab..720c8c46 100644 --- a/src/edit-text.el +++ b/src/edit-text.el @@ -120,6 +120,7 @@ Does lyskom-end-of-command." "Insert MISC-LIST into header of text. recpt -> Mottagare: <%d> %s. cc-recpt -> Extra kopia: <%d> %s. +bcc-recpt -> F�r k�nnedom: <%d> %s. comm-to -> Kommentar till text %d. footn-to -> Fotnot till text %d." (let ((edit-buffer (current-buffer)) @@ -139,6 +140,10 @@ footn-to -> Fotnot till text %d." (lyskom-edit-insert-misc-conf (blocking-do 'get-conf-stat data) (lyskom-get-string 'carbon-copy) where-put-misc data)) + ((eq key 'bcc-recpt) + (lyskom-edit-insert-misc-conf (blocking-do 'get-conf-stat data) + (lyskom-get-string 'blank-carbon-copy) + where-put-misc data)) ((eq key 'comm-to) (lyskom-edit-get-commented-author (blocking-do 'get-text-stat data) (lyskom-get-string 'comment) @@ -217,6 +222,7 @@ The second item should be the corresponding conf- or text-no. The result is a list of dotted pairs: ('recpt . conf-no) ('cc-recpt . conf-no) + ('bcc-recpt . conf-no) ('comm-to . text-no) ('footn-to . text-no). First element is a type-tag." @@ -528,6 +534,7 @@ text is a member of some recipient of this text." comm-to-list))) ((or (eq (car misc) 'recpt) (eq (car misc) 'cc-recpt)) + (eq (car misc) 'bcc-recpt) (if (eq (cdr misc) me) (setq num-me (1+ num-me))) (setq recipient-list (cons (cdr misc) recipient-list))))) @@ -624,6 +631,7 @@ text is a member of some recipient of this text." (setq comm-to-list (cons (cdr misc) comm-to-list))) ((or (eq (car misc) 'recpt) + (eq (car misc) 'bcc-recpt) (eq (car misc) 'cc-recpt)) (if (or (memq (cdr misc) author-list) (eq (cdr misc) me)) @@ -737,9 +745,14 @@ text is a member of some recipient of this text." (read-from-minibuffer (format "%s" (lyskom-get-string 'which-text-include))))) ((prefix-numeric-value current-prefix-arg))))) - (let ((buffer (current-buffer))) + (let ((buffer (current-buffer)) + (window (selected-window))) (set-buffer lyskom-buffer) - (initiate-get-text 'edit 'lyskom-edit-insert-commented no buffer) + (initiate-get-text 'edit + 'lyskom-edit-insert-commented + no + buffer + window) (set-buffer buffer) (sit-for 0))) @@ -778,6 +791,22 @@ text is a member of some recipient of this text." ;;; Changed by: Linus Tolke +(defun kom-edit-add-comment () + "Adds a text as commented to the text being edited." + (interactive) + (let* ((edit-buffer (current-buffer)) + (insert-at (point-min-marker)) + (text-no (lyskom-read-number (lyskom-get-string 'text-to-comment-q))) + (text-stat (blocking-do 'get-text-stat text-no))) + (lyskom-save-excursion + (if text-stat + (lyskom-edit-get-commented-author + (blocking-do 'get-text-stat text-no) + (lyskom-get-string 'comment) + insert-at text-no) + (lyskom-error "%s" (lyskom-get-string 'no-such-text-m)))))) + + (defun kom-edit-add-recipient () "Adds a conference as recipient to the text being edited." (interactive) @@ -785,14 +814,51 @@ text is a member of some recipient of this text." (lyskom-get-string 'recipient))) +(defun kom-edit-add-bcc () + "Adds a conference as bcc recipient to the text being edited." + (interactive) + (lyskom-edit-add-recipient/copy (lyskom-get-string 'added-blank-carbon-copy) + (lyskom-get-string 'blank-carbon-copy))) + + (defun kom-edit-add-copy () "Adds a conference to which a copy of the edited text will be sent." (interactive) (lyskom-edit-add-recipient/copy (lyskom-get-string 'added-carbon-copy) (lyskom-get-string 'carbon-copy))) +(defun kom-edit-move-text () + "Adds a conference as a recipient, and changes all other recipients to +CC recipients." + (interactive) + (lyskom-edit-add-recipient/copy (lyskom-get-string 'who-to-move-to-q) + (lyskom-get-string 'recipient) + 'lyskom-edit-move-recipients)) -(defun lyskom-edit-add-recipient/copy (prompt string) +(defun lyskom-edit-move-recipients (conf-stat insert-at edit-buffer) + (save-excursion + (set-buffer edit-buffer) + (let* ((tmp (lyskom-edit-parse-headers)) + (subject (car tmp)) + (miscs (cons 'MISC-LIST + (mapcar + (function + (lambda (x) + (if (eq (car x) 'recpt) + (cons 'cc-recpt (cdr x)) + x))) + (cdr (lyskom-edit-translate-miscs (cdr tmp))))))) + (lyskom-edit-replace-miscs subject miscs) + (lyskom-edit-insert-misc-conf conf-stat + (lyskom-get-string 'recipient) + (point-min-marker) + nil)))) + + + + + +(defun lyskom-edit-add-recipient/copy (prompt string &optional what-to-do) "Adds a new recipient or a cc-recipient to the text which is being edited." (let ((edit-buffer (current-buffer)) (insert-at (point-min-marker)) @@ -804,7 +870,9 @@ text is a member of some recipient of this text." ;; make sure it is up-to-date. (let ((text-no (conf-stat->msg-of-day conf-stat))) (if (zerop text-no) - (lyskom-edit-insert-misc-conf conf-stat string insert-at nil) + (if what-to-do + (funcall what-to-do conf-stat insert-at edit-buffer) + (lyskom-edit-insert-misc-conf conf-stat string insert-at nil)) (let ((text (blocking-do 'get-text text-no))) (if (and text (get-buffer-window edit-buffer)) (let ((win-config (current-window-configuration))) @@ -814,11 +882,15 @@ text is a member of some recipient of this text." (text->text-no text) (text->text-mass text)))) (and (j-or-n-p (lyskom-get-string 'still-want-to-add)) - (lyskom-edit-insert-misc-conf conf-stat string - insert-at nil)) + (if what-to-do + (funcall what-to-do conf-stat insert-at edit-buffer) + (lyskom-edit-insert-misc-conf conf-stat string + insert-at nil))) (set-window-configuration win-config)) - (lyskom-edit-insert-misc-conf conf-stat string - insert-at nil)))))))) + (if what-to-do + (funcall what-to-do conf-stat insert-at edit-buffer) + (lyskom-edit-insert-misc-conf conf-stat string + insert-at nil))))))))) @@ -827,6 +899,34 @@ text is a member of some recipient of this text." ;;; in lyskom-edit-mode. +(defun lyskom-edit-translate-miscs (misc-list) + "Translate result of lyskom-edit-parse-header to something we can send +to lyskom-edit-replace-miscs" + (let ((result nil)) + (while misc-list + (setq result (cons (cons (car misc-list) (car (cdr misc-list))) + result)) + (setq misc-list (cdr (cdr misc-list)))) + (cons 'MISC-LIST (nreverse result)))) + +(defun lyskom-edit-replace-miscs (subject misc-list) + "Replace all headers with SUBJECT and MISC-LIST" + (save-excursion + (let ((start nil) + (end nil)) + (goto-char (point-min)) + (setq start (point-marker)) + (set-marker-insertion-type start t) + (search-forward (substitute-command-keys + (lyskom-get-string 'header-separator))) + (end-of-line) + (setq end (point-marker)) + (goto-char (point-min)) + (lyskom-edit-insert-miscs misc-list subject "") + (delete-region start end) + (goto-char end) + (delete-char 1)))) + (defun lyskom-looking-at-header (header match-number) "Check if point is at the beginning of a header of type HEADER. Return the corresponding number (conf no etc.) if MATCH-NUMBER is @@ -869,6 +969,9 @@ easy to use the result in a call to `lyskom-create-misc-list'." (nconc result (list 'recpt n))) ((setq n (lyskom-looking-at-header 'carbon-copy-prefix 'angled)) (nconc result (list 'cc-recpt n))) + ((setq n (lyskom-looking-at-header 'blank-carbon-copy-prefix + 'angled)) + (nconc result (list 'bcc-recpt n))) ((setq n (lyskom-looking-at-header 'comment-prefix t)) (nconc result (list 'comm-to n))) ((setq n (lyskom-looking-at-header 'footnote-prefix t)) diff --git a/src/english-strings.el b/src/english-strings.el index 4f8715ba..5e6ee4f4 100644 --- a/src/english-strings.el +++ b/src/english-strings.el @@ -67,36 +67,36 @@ (define-prefix-command 'lyskom-en-edit-insert-prefix) (define-key lyskom-en-edit-mode-map "\C-c" 'lyskom-en-edit-prefix) (define-key lyskom-en-edit-mode-map "\C-c?" 'lyskom-help) - (define-key lyskom-en-edit-mode-map "\C-cr" 'lyskom-en-edit-review-prefix) - (define-key lyskom-en-edit-mode-map "\C-ci" 'lyskom-en-edit-insert-prefix) + (define-key lyskom-en-edit-mode-map "\C-c\C-r" 'lyskom-en-edit-review-prefix) + (define-key lyskom-en-edit-mode-map "\C-c\C-i" 'lyskom-en-edit-insert-prefix) (define-key lyskom-en-edit-mode-map (lyskom-keys [mouse-2]) 'kom-button-click-or-yank) (define-key lyskom-en-edit-mode-map (lyskom-keys [down-mouse-3]) 'kom-popup-menu) (define-key lyskom-en-edit-mode-map [mouse-3] 'kom-mouse-null) (define-key lyskom-en-edit-mode-map "\C-c*" 'kom-button-press) (define-key lyskom-en-edit-mode-map "\C-c\C-c" 'kom-edit-send) (define-key lyskom-en-edit-mode-map "\C-c\C-s" 'kom-ispell-message) - (define-key lyskom-en-edit-mode-map "\C-ck" 'kom-edit-quit) (define-key lyskom-en-edit-mode-map "\C-c\C-k" 'kom-edit-quit) (define-key lyskom-en-edit-mode-map "\C-cr?" 'lyskom-help) - (define-key lyskom-en-edit-mode-map "\C-crc" 'kom-edit-show-commented) - (define-key lyskom-en-edit-mode-map "\C-ci?" 'lyskom-help) - (define-key lyskom-en-edit-mode-map "\C-cic" 'kom-edit-insert-commented) - (define-key lyskom-en-edit-mode-map "\C-ci\C-y" 'kom-edit-insert-commented) - (define-key lyskom-en-edit-mode-map "\C-ci1" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci2" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci3" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci4" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci5" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci6" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci7" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci8" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci9" 'kom-edit-insert-digit-text) - (define-key lyskom-en-edit-mode-map "\C-ci " 'kom-edit-insert-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-r\C-c" 'kom-edit-show-commented) + (define-key lyskom-en-edit-mode-map "\C-c\C-i?" 'lyskom-help) + (define-key lyskom-en-edit-mode-map "\C-c\C-i\C-c" 'kom-edit-insert-commented) + (define-key lyskom-en-edit-mode-map "\C-c\C-i\C-y" 'kom-edit-insert-commented) + (define-key lyskom-en-edit-mode-map "\C-c\C-i1" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i2" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i3" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i4" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i5" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i6" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i7" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i8" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i9" 'kom-edit-insert-digit-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-i " 'kom-edit-insert-text) (define-prefix-command 'lyskom-en-edit-add-prefix) - (define-key lyskom-en-edit-mode-map "\C-ca" 'lyskom-en-edit-add-prefix) - (define-key lyskom-en-edit-mode-map "\C-car" 'kom-edit-add-recipient) - (define-key lyskom-en-edit-mode-map "\C-cac" 'kom-edit-add-copy) - (define-key lyskom-en-edit-mode-map "\C-ca?" 'lyskom-help)) + (define-key lyskom-en-edit-mode-map "\C-c\C-a" 'lyskom-en-edit-add-prefix) + (define-key lyskom-en-edit-mode-map "\C-c\C-a\C-r" 'kom-edit-add-recipient) + (define-key lyskom-en-edit-mode-map "\C-c\C-a\C-c" 'kom-edit-add-copy) + (define-key lyskom-en-edit-mode-map "\C-c\C-a\C-m" 'kom-edit-move-text) + (define-key lyskom-en-edit-mode-map "\C-c\C-a?" 'lyskom-help)) ;;(defvar lyskom-header-separator @@ -322,6 +322,7 @@ and you have finished reading. Please come back later. (lyskom-client . "Client") (text-to-add-recipient . "Add recipient to which article:") (text-to-add-copy . "Add recipient of carbon copy of which article:") + (text-to-add-bcc . "Add recipient of blind carbon copy of which article:") (text-to-delete-recipient . "Remove recipient from which article:") (text-to-move . "Which text do you want to move: ") (text-to-add-comment-to . "Add comment to which article:") @@ -635,7 +636,9 @@ Article %#1n has more than one root but only one of the trees will be shown.\n") (recipient . "Recipient:") (recipient-prefix . "[Rr]") (carbon-copy . "Carbon copy:") + (blank-carbon-copy . "Blind Carbon copy:") (carbon-copy-prefix . "[Cc]\\([Aa]\\|[Cc]\\)") + (blank-carbon-copy-prefix . "[Bb]\\([Ll]\\|[Cc][Cc]\\)") (header-subject . "Subject: ") (header-separator . "\\<lyskom-edit-mode-map>\ --- Write below. \ @@ -651,6 +654,8 @@ Help: \\[describe-mode] ---") (which-text-include . "Include which article? ") (added-recipient . "Recipient: ") (added-carbon-copy . "Carbon copy to conference: ") + (added-blank-carbon-copy . "Blind carbon copy to conference: ") + (text-to-comment-q . "Which article to you want to comment? ") (conf-has-motd-no . "The conference has a note on the door. (%#1d)\n\n%#2s") (still-want-to-add . "Do you still want to add the conference as a recipient? ") (could-not-create-text . "\nCouldn't create the article. Error: %#2s.\n") @@ -684,6 +689,8 @@ Help: \\[describe-mode] ---") (head-Subject . "Subject: ") (Recipient . "Recipient") (Extra-recipient . "CC") + (Hidden-recipient . "BCC") + (Strange-recipient . "Also to") (send-at . " Posted: %#1s\n") (sent-by . " Posted by %#1P\n") (recieved-at . " Received: %#1s\n") @@ -1110,6 +1117,7 @@ On since %#8s%#9s") (kom-review-all-marked-texts . "Review all marked (articles)") (kom-add-recipient . "Add recipient") (kom-add-copy . "Add (recipient of) carbon copy") + (kom-add-bcc . "Addera (recipient of) blind carbon copy") (kom-sub-recipient . "Remove recipient") (kom-move-text . "Move text") (kom-add-comment . "Add comment") @@ -1585,6 +1593,7 @@ On since %#8s%#9s") (define-key lyskom-en-prioritize-mode-map "p" 'kom-prioritize-set-priority) (define-key lyskom-en-prioritize-mode-map "s" 'kom-prioritize-save) (define-key lyskom-en-prioritize-mode-map "q" 'kom-prioritize-quit) + (define-key lyskom-en-prioritize-mode-map "\C-c\C-c" 'kom-prioritize-quit) (define-key lyskom-en-prioritize-mode-map "\t" 'kom-next-link) (define-key lyskom-en-prioritize-mode-map "\M-\C-i" 'kom-previous-link) ) diff --git a/src/filter.el b/src/filter.el index bd14956c..b2b854a1 100644 --- a/src/filter.el +++ b/src/filter.el @@ -155,7 +155,9 @@ invalid-value until a filter action has been selected.") misc (text-stat->misc-info-list text-stat) (let ((type (misc-info->type misc))) - (if (or (eq type 'RECPT) (eq type 'CC-RECPT)) + (if (or (eq type 'RECPT) + (eq type 'CC-RECPT) + (eq type 'BCC-RECPT)) (initiate-get-conf-stat 'filter nil (misc-info->recipient-no misc))))) @@ -532,6 +534,7 @@ the current text" (let ((text-stat (blocking-do 'get-text-stat lyskom-current-text)) (recipients nil) (cc-recipients nil) + (bcc-recipients nil) (filter-recipient nil) (conf-stat (if (and lyskom-current-conf (not (zerop lyskom-current-conf))) @@ -543,7 +546,10 @@ the current text" recipients))) ((eq (misc-info->type misc) 'CC-RECPT) (setq cc-recipients (cons (misc-info->recipient-no misc) - cc-recipients))))) + cc-recipients))) + ((eq (misc-info->type misc) 'BCC-RECPT) + (setq bcc-recipients (cons (misc-info->recipient-no misc) + bcc-recipients))))) (setq filter-recipient (or (and conf-stat @@ -552,7 +558,8 @@ the current text" (memq lyskom-current-conf cc-recipients)) lyskom-current-conf) (car (nreverse recipients)) - (car (nreverse cc-recipients)))) + (car (nreverse cc-recipients)) + (car (nreverse bcc-recipients)))) (if (null filter-recipient) (lyskom-insert-string 'no-recipient) diff --git a/src/komtypes.el b/src/komtypes.el index b2ad7c03..e71c9c08 100644 --- a/src/komtypes.el +++ b/src/komtypes.el @@ -682,7 +682,8 @@ Both vectors should be of the same length." sender sent-at) "Create a misc-info from all parameters. -TYPE is one of RECPT, CC-RECPT COMM-TO COMM-IN FOOTN-TO or FOOTN-IN." +TYPE is one of RECPT, CC-RECPT, BCC-RECPT, COMM-TO, COMM-IN, +FOOTN-TO or FOOTN-IN." (cons 'MISC-INFO (vector type recipient-no local-no rec-time comm-to comm-in diff --git a/src/lyskom-rest.el b/src/lyskom-rest.el index 48620e5f..3c654176 100644 --- a/src/lyskom-rest.el +++ b/src/lyskom-rest.el @@ -389,6 +389,7 @@ lyskom-mark-as-read." (lyskom-traverse misc (text-stat->misc-info-list text-stat) (if (or (eq 'RECPT (misc-info->type misc)) + (eq 'BCC-RECPT (misc-info->type misc)) (eq 'CC-RECPT (misc-info->type misc))) (let ((membership (lyskom-try-get-membership (misc-info->recipient-no misc)))) @@ -2767,7 +2768,9 @@ Other objects are converted correctly." ((eq (car misc-item) 'recpt) 0) ((eq (car misc-item) 'cc-recpt) 1) ((eq (car misc-item) 'comm-to) 2) - ((eq (car misc-item) 'footn-to) 4)) + ((eq (car misc-item) 'footn-to) 4) + ((eq (car misc-item) 'bcc-recpt) + (if lyskom-bcc-flag 15 1))) (cdr misc-item))) diff --git a/src/parse.el b/src/parse.el index 4a27f7c8..72c4c140 100644 --- a/src/parse.el +++ b/src/parse.el @@ -338,6 +338,8 @@ result is assigned to the element." (setq res (lyskom-parse-misc-footn-to last n))) ((eq next-key 5) ;footn-in (setq res (lyskom-parse-misc-footn-in last n))) + ((eq next-key 15) ;bcc-recpt + (setq res (lyskom-parse-misc-recipient 'BCC-RECPT last n))) (t ;error! (signal 'lyskom-protocol-error (list 'lyskom-parse-misc-info-list-sub @@ -350,7 +352,7 @@ result is assigned to the element." (defun lyskom-parse-misc-recipient (type last n) "Parse a recipient. Args: TYPE LAST N. -TYPE is either RECPT or CC-RECPT. +TYPE is either RECPT, CC-RECPT or BCC-RECPT. LAST is a pointer to the last element on a misc-info-list. N is number of misc-items left to parse. Returns (cons n next-key)." diff --git a/src/prefetch.el b/src/prefetch.el index 30a2c77d..59ac56c6 100644 --- a/src/prefetch.el +++ b/src/prefetch.el @@ -561,6 +561,7 @@ Put the requests on QUEUE." (let ((type (misc-info->type misc))) (cond ((or (eq type 'RECPT) + (eq type 'BCC-RECPT) (eq type 'CC-RECPT)) (lyskom-prefetch-conf (misc-info->recipient-no misc) queue)) ((eq type 'COMM-IN) @@ -592,6 +593,7 @@ Put the requests on QUEUE." (let ((type (misc-info->type misc))) (cond ((or (eq type 'RECPT) + (eq type 'BCC-RECPT) (eq type 'CC-RECPT)) (lyskom-prefetch-conf (misc-info->recipient-no misc) queue)) ((eq type 'COMM-IN) @@ -698,6 +700,7 @@ Put the requests on QUEUE." (let ((type (misc-info->type misc))) (cond ((or (eq type 'RECPT) + (eq type 'BCC-RECPT) (eq type 'CC-RECPT)) (lyskom-prefetch-conf (misc-info->recipient-no misc) queue)) ((eq type 'COMM-IN) diff --git a/src/swedish-strings.el b/src/swedish-strings.el index 40070816619e21e9dec79336afe69eb5566c319c..945a52701dc6f8ceb2653f66c0c9a25792cd5fe8 100644 GIT binary patch delta 759 zcmaFa#Xe~Q`-Uf+lMVRzSYw=ZW0fXx*-kd#<CKinNY2kIDay}LNY+$<vuibDCvgQa zIqOdT$r;J)towBGFHUEW`pvrB7K|VhGL<IxaClFDugu6jc`r{5Ta2@Awvxi+THZ<+ z^Czz>ON_H_=5#?pM$O3&c*NK<p^EDHd>9ob*YkO?WEv_dOkU6L!46Vrgv2&RVw)hb zO_A7UNNjT?wgnQ~5{a##q%irgVEOdpCX9TOU4`sHmL|qH>rQSJa+iy7)&;S%l@!#o z^K*4mQ!-0*6H`)jlk;<PQ}ZSp^6SBs3kW+2LzSl?DW9Il#i#=E=jI^c8`|t3%}L40 zlllDRgt9Y}vlA84z7;8CKgr8WP07!l<RG!x&^}RsNx^#aB!6LJ#iX3Xylma%#G<79 zJl*8{f=UHF1tm8m9h2uYY0G1%(k&=TP0OqRDUNna+q|!76;n=PN=j;qE{0N&8e{_% zN-}eDtQ3?qxfB!>6f{awD@t@r@}V9s(Jch256jHSPAyT$%*%O_o~}@qnUkZCQmT** z4wI79qD1@6@vT!>{XH^MQd0ADi&B#_3o=vlN<dnXt%BJRTvC*nm!68MFf=bEwJ0Yu zT_HEWq$Dvtu_$%(>#j~u6=(o*f?THnGSM+5CAA1O7&m8JQH^BEQ<^TX$|$ovL6^~* RY5E&wM)~cz`iy_30syC9_^JQ^ delta 282 zcmbO<f&FC{`-Uf+lizWPPF}?o$@p~gYA!G4=%cZdH*&c!M?VG8wv!!%I47^?=G&aW zt;NWksl+*X0*^l<=i~=Gjm+6foRiaet=VFnbs@}3u+TGJSH{fAGMqLnnIPd(J|9NT z$)$YmESZK%oRbCkJy<f0U<_jz!vw}Kg)z)v409O60>-d}F%*<ICtnvVpByOU#h5sG zk&ru6V)kTPVMoTq$u`1Hn@<bh(BAyoK0{z~y&v1==m1{h$&;FuHs5Jp$h7%WTQ}?G aD?N>#n_I6*Ms9zp&&bEL-NlIU+*ANXBvyU^ diff --git a/src/vars.el.in b/src/vars.el.in index 47a0d48d..d9927e3e 100644 --- a/src/vars.el.in +++ b/src/vars.el.in @@ -1093,7 +1093,8 @@ Users are encouraged to use their best sense of humor." "The largest int emacs, and thus this LysKOM client, can handle.") (defconst lyskom-server-features - '(((>= 1 9 0) (lyskom-accept-async-flag + '(((> 1 9 0) (lyskom-bcc-flag)) + ((>= 1 9 0) (lyskom-accept-async-flag lyskom-dynamic-session-info-flag lyskom-idle-time-flag)) ((>= 1 8 0) (lyskom-long-conf-types-flag @@ -1159,6 +1160,10 @@ lyskom-server-features for more information." "t if the server supports the accept-async call." inherited) +(def-kom-var lyskom-bcc-flag nil + "t if the server supports the bcc misc items." + inherited) + (def-kom-var lyskom-max-packet-size lyskom-max-int "The largest possible packet size that can be transmitted to a TCP/IP connection. This should be unlimited, but in practise there @@ -1482,6 +1487,9 @@ This is used by the command kom-busy-wait." (def-kom-var lyskom-last-added-ccrcpt 0 "The default conference when adding a ccrecipient.") +(def-kom-var lyskom-last-added-bccrcpt 0 + "The default conference when adding a bccrecipient.") + (def-kom-var lyskom-saved-file-name (concat default-directory "kom-text") "The default file name when saving a lyskom-text.") diff --git a/src/view-text.el b/src/view-text.el index c10ba466..76aa6e56 100644 --- a/src/view-text.el +++ b/src/view-text.el @@ -129,6 +129,7 @@ Note that this function must not be called asynchronously." (let ((type (misc-info->type misc))) (cond ((or (eq type 'RECPT) + (eq type 'BCC-RECPT) (eq type 'CC-RECPT)) (lyskom-print-header-recpt (misc-info->recipient-no misc) @@ -304,7 +305,9 @@ recipients to it that the user is a member in." (let* ((misc-info (elt misc-info-list i)) (type (misc-info->type misc-info))) (cond - ((or (eq type 'RECPT) (eq type 'CC-RECPT)) + ((or (eq type 'RECPT) + (eq type 'BCC-RECPT) + (eq type 'CC-RECPT)) ;; Is this function ever called asynchronously? If not, we ;; can use lyskom-get-membership istead. (let ((membership (lyskom-try-get-membership @@ -339,7 +342,9 @@ the user is a member of. Uses blocking-do. Returns t if TEXT-STAT is nil." (setq misc-item (car misc-info-list)) (setq type (misc-info->type misc-item)) (setq misc-info-list (cdr misc-info-list)) - (cond ((or (eq type 'RECPT) (eq type 'CC-RECPT)) + (cond ((or (eq type 'RECPT) + (eq type 'BCC-RECPT) + (eq type 'CC-RECPT)) (setq membership (lyskom-get-membership (misc-info->recipient-no misc-item))) (when membership @@ -524,6 +529,7 @@ the client. That is done by lyskom-is-read." (lyskom-traverse misc-info misc-info-list (if (and (or (eq (misc-info->type misc-info) 'RECPT) + (eq (misc-info->type misc-info) 'BCC-RECPT) (eq (misc-info->type misc-info) 'CC-RECPT)) ;; The whole membership list might not be fetched ;; yet. So we better mark it as read in all conferences. @@ -539,7 +545,11 @@ the client. That is done by lyskom-is-read." (lyskom-format-insert "%#1s: %#2M <%#3d>\n" (cond ((eq (misc-info->type misc) 'RECPT) (lyskom-get-string 'Recipient)) - (t (lyskom-get-string 'Extra-recipient))) + ((eq (misc-info->type misc) 'BCC-RECPT) + (lyskom-get-string 'Hidden-recipient)) + ((eq (misc-info->type misc) 'CC-RECPT) + (lyskom-get-string 'Extra-recipient)) + (t (lyskom-get-string 'Strange-recipient))) conf-no (misc-info->local-no misc)) (if (misc-info->sent-at misc) -- GitLab