Commit ee0a343f authored by David Byers's avatar David Byers
Browse files

> 2002-12-16 David Byers <david.byers@swipnet.se>

>
> 	Fix bug 305:
> 	* lyskom-buttons.el (lyskom-button-transform-text): Added support
> 	for bugzilla links.
> 	(lyskom-button-show-bugzilla-bug): New function.
>
> 	* vars.el.in (kom-my-bugzilla): New variable.
> 	(lyskom-text-buttons): Added bugzilla links.
> 	(lyskom-button-actions): Added bugzilla links.
>
parent dda69a38
2002-12-16 David Byers <david.byers@swipnet.se>
Fix bug 305:
* lyskom-buttons.el (lyskom-button-transform-text): Added support
for bugzilla links.
(lyskom-button-show-bugzilla-bug): New function.
* vars.el.in (kom-my-bugzilla): New variable.
(lyskom-text-buttons): Added bugzilla links.
(lyskom-button-actions): Added bugzilla links.
2002-12-13 David Byers <david.byers@swipnet.se>
Bug 915:
......
......@@ -1693,6 +1693,7 @@ You must become an active member of the conference to enter it.\n")
(lyskom-button-open-url-action . "Open")
(lyskom-button-copy-url-action . "Copy")
(lyskom-button-goto-info-node-action . "Open")
(lyskom-button-show-bugzilla-bug-action . "Show in bugzilla")
(lyskom-button-open-email-action . "Send mail")
(lyskom-button-copy-email-action . "Copy")
(lyskom-button-info-aux-action . "Information")
......@@ -3683,6 +3684,10 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
\\& means substitute original matched text,
\\N means substitute match for (...) number N,
\\\\ means insert one \\.")
(kom-my-bugzilla-doc . "\
The elisp client attempts to locate references to bugs in bugzilla. This
setting specifies where the bugzilla server is located. The value must be
the base URL of the bugzilla server \(e.g. `http://bugzilla.example.com/'\).")
;;
......@@ -3863,6 +3868,7 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-max-overlays-tag . "Maximum number of overlays:")
(kom-mark-read-texts-as-read-in-new-recipient-tag . "Mark read texts read when added to new recipients:")
(kom-url-transformation-rules-tag . "Transformation of URLs:")
(kom-my-bugzilla-tag . "Location of bugzilla:")
)
)
......
......@@ -363,6 +363,12 @@ lyskom-text-buttons. Returns the modified string."
(lyskom-button-get-arg el text)
(lyskom-button-get-text el text)
(lyskom-button-get-face el)))
((eq (elt el 1) 'bugzilla)
(lyskom-generate-button 'bugzilla
(lyskom-button-get-arg el text)
(lyskom-button-get-text el text)
(lyskom-button-get-face el)))
((eq (elt el 1) 'email)
(lyskom-generate-button 'email
......@@ -793,6 +799,20 @@ This is a LysKOM button action."
(compose-mail text)
(mail nil text)))
(defun lyskom-button-show-bugzilla-bug (buf arg text)
(let ((case-fold-search t)
(url ""))
(unless (string-match "^http" kom-my-bugzilla)
(setq url "http://"))
(setq url (concat url kom-my-bugzilla))
(unless (string-match "/$" url)
(setq url (concat url "/")))
(setq url (concat url "show_bug.cgi?id=" arg))
(lyskom-button-open-url buf
nil
url)))
(defun lyskom-button-copy-url (but arg text)
"In the LysKOM buffer BUF, ignore ARG and copy TEXT to the kill ring.
This is a LysKOM button action."
......
......@@ -232,6 +232,7 @@
[kom-mosaic-command]
[kom-netscape-command]
[kom-galeon-command]
[kom-my-bugzilla]
"\n\n"
section
......@@ -731,6 +732,7 @@ customize buffer but do not save them to the server."
(kom-keyboard-menu-immediate-selection (noggle (yes no)))
(kom-url-transformation-rules (repeat (cons ((string nil :tag url-transform-regexp)
(string nil :tag url-transform-newtext)))))
(kom-my-bugzilla (string))
))
(defvar lyskom-widget-functions
......
......@@ -1709,6 +1709,7 @@ Du m
(lyskom-button-open-url-action . "ppna")
(lyskom-button-copy-url-action . "Kopiera")
(lyskom-button-goto-info-node-action . "ppna")
(lyskom-button-show-bugzilla-bug-action . "Visa i bugzilla")
(lyskom-button-open-email-action . "Skicka mail")
(lyskom-button-copy-email-action . "Kopiera")
(lyskom-button-info-aux-action . "Information")
......@@ -3776,6 +3777,11 @@ i servern. Annars sparas det i din .emacs.")
\\& erstts med den text som matchar regexpen
\\N erstts med den text som matchar (...)-uttryck N i regexpen
\\\\ erstts med en \\.")
(kom-my-bugzilla-doc . "\
Elispklienten frsker hitta hnvisningar till buggar registrerade i
bugzilla. Den hr instllningen anger var bugzilla-servern finns.
Vrdet skall vara bas-URLen fr bugzilla \(till exempel
`http://bugzilla.example.com'\).")
......@@ -3957,6 +3963,7 @@ i servern. Annars sparas det i din .emacs.")
(kom-max-overlays-tag . "Hgsta antal frgmarkeringar:")
(kom-mark-read-texts-as-read-in-new-recipient-tag . "Markera lsta inlgg lsta ven i nya mottagare:")
(kom-url-transformation-rules-tag . "Transformation av URLer:")
(kom-my-bugzilla-tag . "URL till bugzilla:")
)
)
......
......@@ -124,6 +124,15 @@ if the variable is in kom-dont-read-saved-variables."
;;; User flags
(def-kom-var kom-my-bugzilla "bugzilla.lysator.liu.se"
"*Location of bugzilla.
Either the base URL of bugzilla (e.g. `http://bugzilla.example.com/') or
the hostname where bugzilla is located (e.g. `bugzilla.example.com'), if
bugzilla is located in the root of the server.
Values other than a string are reserved for future use."
server)
(defconst kom-old-farts-text-prompt-strategy
'((kom-comment-previous . ((t . lyskom-get-previous-text)
(nil . lyskom-get-previous-text)))
......@@ -1042,13 +1051,18 @@ conference and person buttons are not expected.")
;; JySKom enhancements
("<(?m[|ö]te[ \t\n]*\\([0-9]+\\)\\([^0-9>]?\\|[^0-9>][^>]*\\))?>"
("<(?m[|ö]te[ \t\n\r]*\\([0-9]+\\)\\([^0-9>]?\\|[^0-9>][^>]*\\))?>"
conf 0 1 nil)
("<(?text[ \t\n]*\\([0-9]+\\)\\([^0-9>]?\\|[^0-9>][^>]*\\))?>"
("<(?text[ \t\n\r]*\\([0-9]+\\)\\([^0-9>]?\\|[^0-9>][^>]*\\))?>"
text 0 1 nil)
("<(?person[ \t\n]*\\([0-9]+\\)\\([^0-9>]?\\|[^0-9>][^>]*\\))?>"
("<(?person[ \t\n\r]*\\([0-9]+\\)\\([^0-9>]?\\|[^0-9>][^>]*\\))?>"
pers 0 1 nil)
;; Bugs
("\\<bugg?[ \t\n\r]+\\([0-9]+\\)"
bugzilla 0 1 kom-url-face)
;; Info node reference
("\\*Note[ \n\t]+\\([^:\n]*\\(\n[^:\n]*\\)?\\):\\s-*\\(\\(([^\)]+)\\)?[^.,\t\n]*\\(\n[^.,\t\n]*\\)?\\)[.,\t]"
......@@ -1548,6 +1562,11 @@ appear more than once"
lyskom-button-goto-info-node
((lyskom-button-goto-info-node-action . lyskom-button-goto-info-node))
nil)
(bugzilla
generic-popup-title
lyskom-button-show-bugzilla-bug
((lyskom-show-button-bugzilla-bug-action . lyskom-button-show-bugzilla-bug))
nil)
(email
generic-popup-title
lyskom-button-open-email
......
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