[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/rt-liberation 237b11d 30/68: * rt-liberation-viewer.el:
From: |
Yoni Rabkin |
Subject: |
[elpa] externals/rt-liberation 237b11d 30/68: * rt-liberation-viewer.el: reorganize |
Date: |
Wed, 16 Dec 2020 12:11:10 -0500 (EST) |
branch: externals/rt-liberation
commit 237b11d4507ee8b1208cab40eddf9d2c6747a183
Author: Yoni Rabkin <yoni@rabkins.net>
Commit: Yoni Rabkin <yoni@rabkins.net>
* rt-liberation-viewer.el: reorganize
---
rt-liberation-viewer.el | 69 ++++++++++++++++++++++++++-----------------------
1 file changed, 37 insertions(+), 32 deletions(-)
diff --git a/rt-liberation-viewer.el b/rt-liberation-viewer.el
index e3b6309..bc0e15d 100644
--- a/rt-liberation-viewer.el
+++ b/rt-liberation-viewer.el
@@ -36,37 +36,14 @@
"Type: " "Field: " "OldValue: "
"NewValue: " "Data: "
"Description: " "Created: "
- "Creator: " "Attachments: ") t)))
+ "Creator: " "Attachments: ")
+ t)))
(list
(list (concat "^" header-regexp ".*$") 0
'font-lock-comment-face)))
"Expressions to font-lock for RT ticket viewer.")
-(defun rt-liber-jump-to-latest-correspondence ()
- "Move point to the newest correspondence section."
- (interactive)
- (let (latest-point)
- (save-excursion
- (goto-char (point-max))
- (when (re-search-backward rt-liber-correspondence-regexp
- (point-min) t)
- (setq latest-point (point))))
- (if latest-point
- (progn
- (goto-char latest-point)
- (rt-liber-next-section-in-viewer))
- (message "no correspondence found"))))
-
-(defun rt-liber-viewer-visit-in-browser ()
- "Visit this ticket in the RT Web interface."
- (interactive)
- (let ((id (rt-liber-ticket-id-only rt-liber-ticket-local)))
- (if id
- (browse-url
- (concat rt-liber-base-url "Ticket/Display.html?id=" id))
- (error "no ticket currently in view"))))
-
(defun rt-liber-display-ticket-history (ticket-alist &optional assoc-browser)
"Display history for ticket.
@@ -93,6 +70,34 @@ ASSOC-BROWSER if non-nil should be a ticket browser."
(setq buffer-read-only t)))
(switch-to-buffer new-ticket-buffer)))
+
+;;; ------------------------------------------------------------------
+;;; viewer mode functions
+;;; ------------------------------------------------------------------
+(defun rt-liber-jump-to-latest-correspondence ()
+ "Move point to the newest correspondence section."
+ (interactive)
+ (let (latest-point)
+ (save-excursion
+ (goto-char (point-max))
+ (when (re-search-backward rt-liber-correspondence-regexp
+ (point-min) t)
+ (setq latest-point (point))))
+ (if latest-point
+ (progn
+ (goto-char latest-point)
+ (rt-liber-next-section-in-viewer))
+ (message "no correspondence found"))))
+
+(defun rt-liber-viewer-visit-in-browser ()
+ "Visit this ticket in the RT Web interface."
+ (interactive)
+ (let ((id (rt-liber-ticket-id-only rt-liber-ticket-local)))
+ (if id
+ (browse-url
+ (concat rt-liber-base-url "Ticket/Display.html?id=" id))
+ (error "no ticket currently in view"))))
+
(defun rt-liber-viewer-mode-quit ()
"Bury the ticket viewer."
(interactive)
@@ -129,6 +134,13 @@ ASSOC-BROWSER if non-nil should be a ticket browser."
(message "no previous section"))
(goto-char (point-at-bol)))
+(defun rt-liber-refresh-ticket-history (&optional _ignore-auto _noconfirm)
+ (interactive)
+ (if rt-liber-ticket-local
+ (rt-liber-display-ticket-history rt-liber-ticket-local
+ rt-liber-assoc-browser)
+ (error "not viewing a ticket")))
+
(defconst rt-liber-viewer-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "q") 'rt-liber-viewer-mode-quit)
@@ -165,15 +177,8 @@ ASSOC-BROWSER if non-nil should be a ticket browser."
(rt-liber-jump-to-latest-correspondence))
(run-hooks 'rt-liber-viewer-hook))
-(defun rt-liber-refresh-ticket-history (&optional _ignore-auto _noconfirm)
- (interactive)
- (if rt-liber-ticket-local
- (rt-liber-display-ticket-history rt-liber-ticket-local
- rt-liber-assoc-browser)
- (error "not viewing a ticket")))
;; wrapper functions around specific functions provided by a backend
-
(declare-function
rt-liber-gnus-compose-reply-to-requestor
"rt-liberation-gnus.el")
- [elpa] externals/rt-liberation updated (6b062b7 -> f682e7b), Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 61dda6f 06/68: * rt-liberation.el: remove unused code, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 965be87 05/68: fix broken dependencies, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 203ec6a 08/68: * rt-liberation-gnus.el: avoid compiler warning, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 291a8e3 20/68: move to other machine, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation f7a290c 15/68: * doc/developer-release.txt: new file, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 5648253 17/68: fix info listing problem, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 237b11d 30/68: * rt-liberation-viewer.el: reorganize,
Yoni Rabkin <=
- [elpa] externals/rt-liberation 84ce235 10/68: Syncronize with Stefan's changes, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 2e9b1f3 01/68: * rt-liberation.el: remove old cli code, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 133559f 18/68: * dir: fix info listing issues take 2, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 700d45e 21/68: * doc/developer-release.txt: update documentation, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 4e4cb06 14/68: add manual to ELPA, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation f586e7d 27/68: * doc/rt-liber.texinfo: update manual, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation a5d7634 26/68: * doc/developer-release.txt: add compile comment, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation b2f3f57 02/68: * doc/rt-liberation.texinfo: update documentation, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation 12d16aa 28/68: Add lexical binding declaration, Yoni Rabkin, 2020/12/16
- [elpa] externals/rt-liberation ab6c820 33/68: * rt-liberation-viewer.el:, Yoni Rabkin, 2020/12/16