From 0a24ff91660feb188aacf54afa62ea246e6f6836 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Tue, 9 Feb 2021 17:15:54 -0500 Subject: * rt-liberation.el: disable filling in viewer The text is going through too many changes from the client's mail system to RT and then to rt-liberation. A lot more work would be required to get it to play nice with filling. --- rt-liberation.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rt-liberation.el b/rt-liberation.el index 4ee51c9..66570ee 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -1405,9 +1405,9 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (while (re-search-forward "^ " (point-max) t) (replace-match " ")) ;; fill - (let ((paragraph-separate " >[[:space:]]+$")) - (fill-region (point-min) - (point-max))) + ;; (let ((paragraph-separate " >[[:space:]]+$")) + ;; (fill-region (point-min) + ;; (point-max))) ;; finally (buffer-substring (point-min) (point-max))))) -- cgit v1.2.3 From fce45b07db87680b982e3afd5df1a7806d41bcba Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Tue, 9 Feb 2021 17:28:25 -0500 Subject: * rt-liberation.el: disable filling for now See explanation in previous commit. --- rt-liberation.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rt-liberation.el b/rt-liberation.el index 66570ee..92886c4 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -1421,9 +1421,9 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (while (re-search-forward "^ " (point-max) t) (replace-match "")) ;; fill - (let ((paragraph-separate ">[[:space:]]+$")) - (fill-region (point-min) - (point-max))) + ;; (let ((paragraph-separate ">[[:space:]]+$")) + ;; (fill-region (point-min) + ;; (point-max))) ;; finally (buffer-substring (point-min) (point-max)))) -- cgit v1.2.3 From 2bdd3d4e5393480b319eed2f64c8889db86a02a5 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Mon, 15 Feb 2021 18:54:20 -0500 Subject: * NEWS: --- NEWS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2490ea3..8932364 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,9 @@ -New in version ... +New in version 2.02 + + * ... + + +New in version 2.01 * Support getting REST credentials from auth-source. -- cgit v1.2.3 From f404ae4f301899f71c232b6b0d8b6a0a49e8e560 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Mon, 15 Feb 2021 21:25:08 -0500 Subject: * rt-liberation.el: copyright year update --- rt-liberation.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt-liberation.el b/rt-liberation.el index 92886c4..ab3c44f 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -1,6 +1,6 @@ ;;; rt-liberation.el --- Emacs interface to RT -*- lexical-binding: t; -*- -;; Copyright (C) 2008-2020 Free Software Foundation, Inc. +;; Copyright (C) 2008-2021 Free Software Foundation, Inc. ;; Author: Yoni Rabkin ;; Authors: Aaron S. Hawley , John Sullivan -- cgit v1.2.3 From f77c1e495a44272c7936f958e6af631a42295dd1 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Mon, 15 Feb 2021 22:07:26 -0500 Subject: * rt-liberation.el: --- rt-liberation.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rt-liberation.el b/rt-liberation.el index ab3c44f..913bbeb 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -1056,8 +1056,8 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (let (latest-point) (save-excursion (goto-char (point-max)) - (when (re-search-backward rt-liber-correspondence-regexp - (point-min) t) + (when (re-search-backward + rt-liber-correspondence-regexp (point-min) t) (setq latest-point (point)))) (if latest-point (progn -- cgit v1.2.3 From 2bbaa7641fbafdc07bea5d965d75cc2d2f831235 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 11:07:37 -0500 Subject: * rt-liberation.el: last communcation instead of section Make "N" jump to the last Comment, Create, or Correspond section, instead of just the last section. --- rt-liberation.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rt-liberation.el b/rt-liberation.el index 913bbeb..4ea72d1 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -246,6 +246,9 @@ This variable is made buffer local for the ticket history") (defvar rt-liber-viewer2-section-regexp "^Ticket [0-9]+ by " "Regular expression to match a section in the viewer.") +(defvar rt-liber-viewer2-communicate-regexp (regexp-opt '("[Create]" "[Correspond]" "[Comment]")) + "Regular expression to match ticket communication.") + (defvar rt-liber-viewer2-recenter 4 "Argument passed to `recenter' in the viewer.") @@ -1535,14 +1538,14 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (recenter rt-liber-viewer2-recenter))) (goto-char (point-at-bol)))) -(defun rt-liber-viewer2-last-section-in () +(defun rt-liber-viewer2-last-communicate-in () (interactive) (goto-char (point-max)) - (let ((last (re-search-backward rt-liber-viewer2-section-regexp + (let ((last (re-search-backward rt-liber-viewer2-communicate-regexp (point-min) t))) (if (not last) - (error "no sections found") + (error "no communcations found") (recenter rt-liber-viewer2-recenter) (goto-char (point-at-bol))))) @@ -1586,7 +1589,7 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (defconst rt-liber-viewer2-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "q") 'rt-liber-viewer2-mode-quit) - (define-key map (kbd "N") 'rt-liber-viewer2-last-section-in) + (define-key map (kbd "N") 'rt-liber-viewer2-last-communicate-in) (define-key map (kbd "n") 'rt-liber-viewer2-next-section-in) (define-key map (kbd "p") 'rt-liber-viewer2-previous-section-in) (define-key map (kbd "V") 'rt-liber-viewer-visit-in-browser) -- cgit v1.2.3 From eb21239bc048090c2e3603e1645608dfe8317c43 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 11:15:30 -0500 Subject: * rt-liberation-gnus.el: doc fix --- rt-liberation-gnus.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt-liberation-gnus.el b/rt-liberation-gnus.el index 789e482..a9c53f0 100644 --- a/rt-liberation-gnus.el +++ b/rt-liberation-gnus.el @@ -208,7 +208,7 @@ OPTIONS association list of options. )))) (defun rt-liber-gnus-visit-ticket-at-point () - "Call `rt-liber-display-ticket' on this ticket." + "Display the ticket at point." (interactive) (save-excursion (goto-char (point-at-bol)) -- cgit v1.2.3 From 519184e7e7816f775c47d86ba1fdf2e8c7afea91 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 11:15:45 -0500 Subject: * rt-liberation.el: new function `rt-liber-display-ticket' --- rt-liberation.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rt-liberation.el b/rt-liberation.el index 4ea72d1..40c11cc 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -493,6 +493,15 @@ AFTER date after predicate." (error "null field symbol")) (cdr (assoc field-symbol rt-liber-field-dictionary))) +(defun rt-liber-display-ticket (ticket-number) + "Display ticket with TICKET-NUMBER." + (interactive "nticket number: ") + (let ((ticket-id (number-to-string ticket-number))) + (rt-liber-browse-query + (rt-liber-compile-query + (id ticket-id)) + (concat "#" ticket-id)))) + ;;; -------------------------------------------------------- ;;; Ticket browser -- cgit v1.2.3 From d143f911f8e8c442da505cda25cdf30b17b09ec3 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 11:48:24 -0500 Subject: * rt-liberation.el: better descriptors Use the Description field for non-communication sections. --- rt-liberation.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rt-liberation.el b/rt-liberation.el index 40c11cc..6c1da8d 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -1446,6 +1446,7 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (creator (alist-get 'Creator section)) (date (alist-get 'Created section)) (type (alist-get 'Type section)) + (desc (alist-get 'Description section)) (oldvalue (alist-get 'OldValue section)) (newvalue (alist-get 'NewValue section)) (field (alist-get 'Field section)) @@ -1476,14 +1477,12 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (add-text-properties start (point) `(rt-liberation-section-data ,section)) - (cond ((string= type "Status") + (cond ((or (string= type "Status") + (string= type "SetWatcher") + (string= type "Set") + (string= type "AddLink")) (insert - (format "\n Status change from %s to %s\n\n" oldvalue newvalue))) - ((and (string= type "Set") - (string= field "Owner") - (string= oldvalue "10")) - (insert - (format "\n Ticket assigned\n\n"))) + (format "\n %s\n\n" desc))) ;; catch-all (t (insert -- cgit v1.2.3 From cc42b5eb3b5d8af4df42c7a4cecbf647ffc89b68 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 12:12:30 -0500 Subject: * rt-liberation.el: version bump --- rt-liberation.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt-liberation.el b/rt-liberation.el index 6c1da8d..38761da 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -5,7 +5,7 @@ ;; Author: Yoni Rabkin ;; Authors: Aaron S. Hawley , John Sullivan ;; Maintainer: Yoni Rabkin -;; Version: 2.01 +;; Version: 2.02 ;; Keywords: rt, tickets ;; Package-Type: multi ;; url: http://www.nongnu.org/rtliber/ -- cgit v1.2.3 From 0e2e19d2d12154ede1a9f9581a9c26a8ffca86b8 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 12:12:52 -0500 Subject: * rt-liberation.el: solve macro compilation problem --- rt-liberation.el | 80 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/rt-liberation.el b/rt-liberation.el index 38761da..73a6c0a 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -269,39 +269,40 @@ This variable is made buffer local for the ticket history") ;;; -------------------------------------------------------- ;;; TicketSQL compiler ;;; -------------------------------------------------------- -(defun rt-liber-bool-p (sym) - "Return t if SYM is a boolean operator, otherwise nil." - (member sym '(and or))) -(defun rt-liber-attrib-p (sym) - "Return t if SYM is a ticket attribute, otherwise nil." - (member sym '(id owner status subject content queue lastupdatedby - email-address))) -(defun rt-liber-time-p (sym) - "Return t if SYM is a temporal attribute, otherwise nil." - (member sym '(created lastupdated resolved))) -(defun rt-liber-negation-p (sym) - (member sym '(not))) - -(defun rt-liber-reduce (op seq) - "Reduce-OP with SEQ to a string of \"s0 op s1 op s2..\"." - (if seq - (cl-reduce - #'(lambda (a b) - (format "%s %s %s" a op b)) - seq) - "")) - -(defun rt-liber-make-interval (pred before after) - "Return a formatted TicketSQL interval. +(eval-and-compile ;; for use in macro `rt-liber-compile-query' + (defun rt-liber-bool-p (sym) + "Return t if SYM is a boolean operator, otherwise nil." + (member sym '(and or))) + (defun rt-liber-attrib-p (sym) + "Return t if SYM is a ticket attribute, otherwise nil." + (member sym '(id owner status subject content queue lastupdatedby + email-address))) + (defun rt-liber-time-p (sym) + "Return t if SYM is a temporal attribute, otherwise nil." + (member sym '(created lastupdated resolved))) + (defun rt-liber-negation-p (sym) + (member sym '(not))) + + (defun rt-liber-reduce (op seq) + "Reduce-OP with SEQ to a string of \"s0 op s1 op s2..\"." + (if seq + (cl-reduce + #'(lambda (a b) + (format "%s %s %s" a op b)) + seq) + "")) + + (defun rt-liber-make-interval (pred before after) + "Return a formatted TicketSQL interval. PRED temporal attribute predicate. BEFORE date before predicate. AFTER date after predicate." - (when (string= before "") (setq before nil)) - (when (string= after "") (setq after nil)) - (concat - (if before (format "%s < '%s'" pred before) "") - (if (and before after) (format " AND ") "") - (if after (format "%s > '%s'" pred after) ""))) + (when (string= before "") (setq before nil)) + (when (string= after "") (setq after nil)) + (concat + (if before (format "%s < '%s'" pred before) "") + (if (and before after) (format " AND ") "") + (if after (format "%s > '%s'" pred after) "")))) (defmacro rt-liber-compile-query (query &optional n) "Compile sexp-based QUERY into TicketSQL." @@ -493,15 +494,6 @@ AFTER date after predicate." (error "null field symbol")) (cdr (assoc field-symbol rt-liber-field-dictionary))) -(defun rt-liber-display-ticket (ticket-number) - "Display ticket with TICKET-NUMBER." - (interactive "nticket number: ") - (let ((ticket-id (number-to-string ticket-number))) - (rt-liber-browse-query - (rt-liber-compile-query - (id ticket-id)) - (concat "#" ticket-id)))) - ;;; -------------------------------------------------------- ;;; Ticket browser @@ -1449,7 +1441,6 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (desc (alist-get 'Description section)) (oldvalue (alist-get 'OldValue section)) (newvalue (alist-get 'NewValue section)) - (field (alist-get 'Field section)) (s-content (rt-liber-viewer2-format-content (alist-get 'Content section)))) (when (not (or (string= type "CommentEmailRecord") @@ -1623,6 +1614,15 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (lambda (&optional _noconfirm) 'slow)) (run-hooks 'rt-liber-viewer-hook)) +(defun rt-liber-display-ticket (ticket-number) + "Display ticket with TICKET-NUMBER." + (interactive "nticket number: ") + (let ((ticket-id (number-to-string ticket-number))) + (rt-liber-browse-query + (rt-liber-compile-query + (id ticket-id)) + (concat "#" ticket-id)))) + (provide 'rt-liberation) -- cgit v1.2.3 From ead59e7abb222b775260237f201b15e4022920e4 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 12:19:15 -0500 Subject: * NEWS: news! --- NEWS | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 8932364..85900a0 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,15 @@ New in version 2.02 - * ... + * The new viewer now displays meaningful descriptors in + non-commincation sections. + + * New interactive function `rt-liber-display-ticket' asks for a + ticket number and does exactly what you think it does. + + * 'N' now jumps to the last comminication, as opposed to merely + the section. + + * Disable the sub-optimal filling in the new viewer. New in version 2.01 -- cgit v1.2.3 From 86c41fb41f23fa6ac453d0af2ca7cbd11f581596 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 12:32:25 -0500 Subject: * doc/developer-release.txt: --- doc/developer-release.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/developer-release.txt b/doc/developer-release.txt index e15282c..ee5945d 100644 --- a/doc/developer-release.txt +++ b/doc/developer-release.txt @@ -27,12 +27,11 @@ Compile an HTML version of the manual and update it on the Website: Push these updates to the git repo. * tag -Tag the release with the ELPA version number: +Tag the release with the ELPA version number, then push that tag to +the VCS: $ git tag -a 2.00 -m "2.00" -Then push that tag to the VCS: - $ git push --tags origin "2.00" * ELPA -- cgit v1.2.3 From f5d70db774273650707ad10f2a18bb3b27f00a3c Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Wed, 17 Feb 2021 12:32:31 -0500 Subject: * rt-liberation.el: new way of versioning Since elpa will mangle it to be that way regardless of what I name it. --- rt-liberation.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt-liberation.el b/rt-liberation.el index 73a6c0a..a2b116a 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -5,7 +5,7 @@ ;; Author: Yoni Rabkin ;; Authors: Aaron S. Hawley , John Sullivan ;; Maintainer: Yoni Rabkin -;; Version: 2.02 +;; Version: 2.2 ;; Keywords: rt, tickets ;; Package-Type: multi ;; url: http://www.nongnu.org/rtliber/ -- cgit v1.2.3