You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(46) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(5) |
Feb
|
Mar
(6) |
Apr
(2) |
May
(25) |
Jun
(2) |
Jul
(1) |
Aug
(5) |
Sep
(4) |
Oct
(7) |
Nov
|
Dec
(18) |
2003 |
Jan
(8) |
Feb
(1) |
Mar
(2) |
Apr
(4) |
May
(14) |
Jun
(32) |
Jul
(15) |
Aug
(23) |
Sep
(23) |
Oct
(22) |
Nov
(27) |
Dec
(24) |
2004 |
Jan
(18) |
Feb
(38) |
Mar
(32) |
Apr
(18) |
May
(70) |
Jun
(1) |
Jul
(21) |
Aug
(19) |
Sep
(32) |
Oct
(11) |
Nov
(11) |
Dec
(19) |
2005 |
Jan
(48) |
Feb
(13) |
Mar
(19) |
Apr
(25) |
May
(4) |
Jun
(23) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
(17) |
Nov
(4) |
Dec
(5) |
2006 |
Jan
(31) |
Feb
(30) |
Mar
(28) |
Apr
(11) |
May
(21) |
Jun
(7) |
Jul
(12) |
Aug
(5) |
Sep
(7) |
Oct
(24) |
Nov
(2) |
Dec
|
From: Alex S. <al...@em...> - 2002-05-30 10:50:38
|
Andreas Fuchs <as...@vo...> writes: >> Either the modify hook, or erc-insert-post-hook. > > I would vote for the -post-hook. Timestamping is IMHO supposed to > happen after everything else is done (most prominently filling), which > is the reason for this hook's existence. Hm, I think we want to add the timestamp, and then do the filling afterwards. Alex. -- http://www.electronicintifada.net/diaries/index.html http://www.us-israel.org/jsource/US-Israel/hr2506c.html |
From: Andreas F. <as...@vo...> - 2002-05-29 18:37:03
|
Today, Mario Lang <ml...@de...> wrote: >> How about having no timestamp stuff clutter the channel buffers, >> rather put the timestamp in a text property or similar, so that >> moving the mouse (or point) over it creates a timestamp message in >> the minibuffer. Maybe > Look at erc-echo-timestamps, and code which uses it :-). Oh, I just knew that this idea wasn't originally mine. (-: I will. As soon as the timestamping stuff is in skeleton state, I will write it. >> even a bubble-help like thingy could pop up... > Sounds good. Ok, I'll look into how the button thingies do "it." >>> Any ideas? Any comments? Is there something which prevents this? >>> Does someone want to do it? If not, I will try. >> >> I would certainly want to give filling advice, and most probably >> create the minibuffer timestamping stuff. > > Good. Do we need any additional hooks to be able to get rid of all > that in the core? IMHO, there should be no additional hooks required. What about this customizable thingy: (defcustom erc-timestamp-function-list nil "Functions to call when timestamping messages." :type '(repeat function)) (defun erc-timestamp-left (...)...) (defun erc-timestamp-right (...)...) (defun erc-timestamp-minibuffer (...)...) (defun erc-timestamp () "Timestamp incoming (and outgoing) messages. This function is designed to be called from `erc-insert-post-hook'. Customize `erc-timestamp-function-list' if you wish to modify timestamping behaviour." (mapc (lambda (function) (funcall function)) erc-timestamp-function-list)) Would something like that be fine? Have fun, -- Andreas Fuchs, <as...@ac...>, as...@ja..., antifuchs |
From: Mario L. <ml...@de...> - 2002-05-29 18:01:54
|
Andreas Fuchs <as...@vo...> writes: >> Either the modify hook, or erc-insert-post-hook. > > I would vote for the -post-hook. Timestamping is IMHO supposed to > happen after everything else is done (most prominently filling), which That's what I thought also. >> That would allow for different ways of timestamping, either prefix, or >> postfix, or any other way. > > Good idea. For prefix timestamping, filling will be another issue. Oh yes, hmmm. > How about having no timestamp stuff clutter the channel buffers, rather > put the timestamp in a text property or similar, so that moving the mouse > (or point) over it creates a timestamp message in the minibuffer. Maybe Look at erc-echo-timestamps, and code which uses it :-). > even a bubble-help like thingy could pop up... Sounds good. >> The ultimate goal would be to get all timestamping out of erc.el >> into say, erc-stamp.el. And do all the things via hooks. > > Good. > >> Any ideas? Any comments? Is there something which prevents this? >> Does someone want to do it? If not, I will try. > > I would certainly want to give filling advice, and most probably create > the minibuffer timestamping stuff. Good. Do we need any additional hooks to be able to get rid of all that in the core? -- CYa, Mario |
From: Andreas F. <as...@vo...> - 2002-05-29 15:53:14
|
Today, Mario Lang <ml...@de...> wrote: > Currently, we have timestamping spread out through the whole erc.el. Jup, I agree that it's a mess. > Either the modify hook, or erc-insert-post-hook. I would vote for the -post-hook. Timestamping is IMHO supposed to happen after everything else is done (most prominently filling), which is the reason for this hook's existence. > That would allow for different ways of timestamping, either prefix, or > postfix, or any other way. Good idea. For prefix timestamping, filling will be another issue. I have another idea (maybe not that good, but anyway): how about having no timestamp stuff clutter the channel buffers, rather put the timestamp in a text property or similar, so that moving the mouse (or point) over it creates a timestamp message in the minibuffer. Maybe even a bubble-help like thingy could pop up... > The ultimate goal would be to get all timestamping out of erc.el > into say, erc-stamp.el. And do all the things via hooks. Good. > Any ideas? Any comments? Is there something which prevents this? > Does someone want to do it? If not, I will try. I would certainly want to give filling advice, and most probably create the minibuffer timestamping stuff. Have fun, =2D-=20 Andreas Fuchs, <as...@ac...>, as...@ja..., antifuchs |
From: Mario L. <ml...@de...> - 2002-05-29 15:33:18
|
Hello. Currently, we have timestamping spread out through the whole erc.el. I was thinking about some things, and I would like to get feedback from people who actually already hacked timestamping, or have in any other way contact with the relevant code: Shouldn't it be possible to do all timestamp inserting from one of the insert hooks. Either the modify hook, or erc-insert-post-hook. That would allow for different ways of timestamping, either prefix, or postfix, or any other way. The ultimate goal would be to get all timestamping out of erc.el into say, erc-stamp.el. And do all the things via hooks. Any ideas? Any comments? Is there something which prevents this? Does someone want to do it? If not, I will try. -- CYa, Mario |
From: Andras B. <dr...@bi...> - 2002-05-12 22:08:32
|
Hi, I propose the following fixes to erc-bbdb.el 1.15: --- erc-bbdb.el.old Sun May 12 18:17:59 2002 +++ erc-bbdb.el Sun May 12 23:58:46 2002 @@ -127,6 +127,7 @@ (bbdb-annotate-notes record (or new-nick nick) erc-bbdb-irc-nick-field) (bbdb-annotate-notes record finger-host bbdb-finger-host-field) (and chan + (not (eq chan t)) (bbdb-annotate-notes record chan erc-bbdb-irc-channel-field)) (erc-bbdb-highlight-record record) (erc-bbdb-show-entry record chan proc)))) @@ -155,7 +156,7 @@ (unless (string= nick (erc-current-nick)) (let* ((finger-host (concat (nth 1 sender) "@" (nth 2 sender)))) (erc-bbdb-insinuate-and-show-entry erc-bbdb-auto-create-on-nick-p proc - nick nil finger-host t (aref parsed 2)))))) + nick nil finger-host nil (aref parsed 2)))))) (defun erc-bbdb-init-highlighting-hook-fun (proc parsed) (erc-bbdb-init-highlighting)) The first chunk is required because erc-bbdb-whois passes 't' as the channel name in order to pop up the bbdb record, but this causes (bbdb-annotate-notes record t erc-bbdb-irc-channel-field) to be invoked in erc-bbdb-insinuate-and-show-entry, which is just wrong and produces an error message. The second chunk changes erc-bbdb-NICK to pass 'nil' instead of 't' to erc-bbdb-insinuate-and-show-entry, which causes no popups to be displayed. IMHO it's better than having popups about people who're on hidden channels, but still not perfect. It should check if the person who had changed his/her nick is on the channel that is being displayed right now... Regards, -- BALI, Andra's GPG KeyID: 78560E1C dr...@bi..., ba...@de... http://drewie.hup.hu Debian GNU/Linux. The Universal Operating System. http://www.debian.org |
From: disumu <ds...@mu...> - 2002-05-06 17:54:32
|
Greetings, Fabien Penso <pe...@li...> wrote: > When I use the timestamp, if I use /away command, I see another > timestamp at the end of the line. Maybe this one should be removed ? I am working on a fix for this, just having noticed it as well. Some thoughts I've made: If the timestamp is already activated, there is no need to do anything. If timestamp is not activated, we can use the variable erc-away-timestamp-format to decide whether or not to show a timestamp when away. With a value of nil, don't show a timestamp at all. With a time string value, show the timestamp, but in the front, like the normal timestamp. If nobody else is working on this, I'll have a go at it... /disumu |
From: Fabien P. <pe...@li...> - 2002-05-06 12:00:21
|
Hi. I use :=20 ERC version 2.91 $Revision: 1.248 $ When I use the timestamp, if I use /away command, I see another timestamp at the end of the line. Maybe this one should be removed ?=20 =2D-=20 Fabien Penso <pe...@li...> | LinuxFr a toujours besoin de : http://perso.LinuxFr.org/penso/ | http://linuxFr.org/dons/ |
From: <dm...@dm...> - 2002-05-05 19:41:21
|
Here is a version that you can talk to yourself. I had to add a new hook, for which the patch is: Index: erc.el =================================================================== RCS file: /cvsroot/erc/erc/erc.el,v retrieving revision 1.254 diff -u -r1.254 erc.el --- erc.el 2 May 2002 21:12:33 -0000 1.254 +++ erc.el 5 May 2002 19:37:37 -0000 @@ -529,6 +529,13 @@ :group 'erc-hooks :type 'hook) +(defcustom erc-send-completed-hook nil + "Hook called after a message has successfully been sent to the +server. The single argument to the functions is the unmodified string +which the local user typed." + :group 'erc-hooks + :type 'hook) + (defvar erc-insert-this t "Insert the text into the target buffer or not. Functions on `erc-insert-pre-hook' can set this variable to nil @@ -5124,7 +5131,8 @@ (set-buffer old-buf) (erc-display-prompt) (when (featurep 'emacspeak) - (emacspeak-auditory-icon 'select-object))))))) + (emacspeak-auditory-icon 'select-object)) + (run-hook-with-args 'erc-send-completed-hook str)))))) (defun erc-send-paragraph (&optional force) The robot code is now: (autoload 'erc-select "erc" nil t) (eval-after-load "erc" '(progn (add-hook 'erc-server-PRIVMSG-hook 'dme:erc-robot-remote t) (add-hook 'erc-send-completed-hook 'dme:erc-robot-local t) )) (if (featurep 'xemacs) (defun dme:replace-regexp-in-string (regexp rep string &optional fixedcase literal subexp start) (replace-in-string string regexp rep literal)) (defalias 'dme:replace-regexp-in-string 'replace-regexp-in-string)) (defun dme:erc-doctor (args) (let* ((dbuf "*doctor*") (docbuf (get-buffer dbuf)) outpoint res) (if (not docbuf) (progn (doctor) (setq docbuf (get-buffer dbuf)) (bury-buffer docbuf))) (save-excursion (set-buffer docbuf) (goto-char (point-max)) (insert args) (goto-char (point-max)) (setq outpoint (point)) (doctor-ret-or-read 1) (doctor-ret-or-read 1) (goto-char outpoint) (re-search-forward "^.") (setq outpoint (- (point) 1)) (re-search-forward "^$") (dme:replace-regexp-in-string "\n" " " (buffer-substring outpoint (point))) ))) (setq dme:erc-robot-commands '( ("cmds" (lambda (args) (concat "commands available: " (mapconcat (lambda (e) (car e)) dme:erc-robot-commands " ")))) ("hello" (lambda (args) "hello to you too !")) ("zippy" (lambda (args) (dme:replace-regexp-in-string "\n" " " (yow)))) ("music" (lambda (args) (concat "now playing: " (let ((track (dme:now-playing))) 2 (if track track "nothing."))))) ("echo" (lambda (args) args)) ("doctor" dme:erc-doctor) ("version" (lambda (args) (erc-version))) )) (defface dme:erc-robot-face '((t (:foreground "yellow"))) "ERC face used for your robot's output." :group 'erc-faces) (defun dme:erc-robot-remote (proc parsed) "Implements a simple robot for erc. Messages to the robot are of the form: \"nick: !command args\", where: nick - the nickname of the user who is the target of the command, command - the specific command, args - arguments to the command (optional)." (let* ((sspec (aref parsed 1)) (nick (nth 0 (erc-parse-user sspec))) (tgt (aref parsed 2)) (msg (aref parsed 3))) (dme:erc-robot-command proc nick tgt msg)) nil) (defun dme:erc-robot-local (str) "Funnel text typed by the local user to the local robot." (dme:erc-robot-command erc-process (erc-current-nick) (buffer-name) str)) (defun dme:erc-robot-command (proc from tgt msg) "Robot worker." (let ((me (erc-current-nick))) (if (and dme:erc-robot-commands (string-match (concat "^" (regexp-quote me) ": !\\([^ ]+\\) ?\\(.*\\)") msg)) ; this is a robot command to me. (let* ((cmd (substring msg (match-beginning 1) (match-end 1))) (args (substring msg (match-beginning 2))) (l (assoc cmd dme:erc-robot-commands)) reply) (setq reply (concat from ": " (if l (funcall (cadr l) args) (concat "unknown command: " cmd ": try \"cmds\"")))) (erc-log reply) (save-excursion (set-buffer (erc-get-buffer tgt proc)) (let ((inhibit-read-only t) p) (goto-char (point-max)) (setq p (re-search-backward (erc-prompt))) (insert (erc-format-timestamp) "<" me "> ") (when (string-match "[\n]+$" reply) (setq reply (substring reply 0 (match-beginning 0)))) (erc-put-text-property 0 (length reply) 'face 'dme:erc-robot-face reply) (insert reply "\n") (save-excursion (save-match-data (save-restriction (narrow-to-region p (point)) (run-hook-with-args 'erc-send-modify-hook) (run-hook-with-args 'erc-send-post-hook)))) (set-marker (process-mark erc-process) (point)) (set-marker erc-insert-marker (point)) (goto-char (point-max)) (erc-process-input-line (concat reply "\n")))))))) |
From: <dm...@dm...> - 2002-05-05 16:03:34
|
* dm...@dm... [2002-05-05 16:31:42] > (if emacs-xemacs > (defun dme:replace-regexp-in-string (regexp rep string &optional fixedcase literal subexp start) > (replace-in-string string regexp rep literal)) > (defalias 'dme:replace-regexp-in-string 'replace-regexp-in-string)) kensanata pointed out that this should be: (if (featurep 'xemacs) (defun dme:replace-regexp-in-string (regexp rep string &optional fixedcase literal subexp start) (replace-in-string string regexp rep literal)) (defalias 'dme:replace-regexp-in-string 'replace-regexp-in-string)) |
From: <dm...@dm...> - 2002-05-05 15:34:21
|
This version: - supports xemacs (tested with 21.4 patch 6), - leaves point at the correct place after your own robot replies are inserted, - has a better 'add-hook' call Still no support for talking to your own robot. (eval-after-load "erc" '(add-hook 'erc-server-PRIVMSG-hook 'dme:erc-robot t)) (if emacs-xemacs (defun dme:replace-regexp-in-string (regexp rep string &optional fixedcase literal subexp start) (replace-in-string string regexp rep literal)) (defalias 'dme:replace-regexp-in-string 'replace-regexp-in-string)) (defun dme:erc-doctor (args) (let* ((dbuf "*doctor*") (docbuf (get-buffer dbuf)) outpoint res) (if (not docbuf) (progn (doctor) (setq docbuf (get-buffer dbuf)) (bury-buffer docbuf))) (save-excursion (set-buffer docbuf) (goto-char (point-max)) (insert args) (goto-char (point-max)) (setq outpoint (point)) (doctor-ret-or-read 1) (doctor-ret-or-read 1) (goto-char outpoint) (re-search-forward "^.") (setq outpoint (- (point) 1)) (re-search-forward "^$") (dme:replace-regexp-in-string "\n" " " (buffer-substring outpoint (point))) ))) (setq dme:erc-robot-commands '( ("cmds" (lambda (args) (concat "commands available: " (mapconcat (lambda (e) (car e)) dme:erc-robot-commands " ")))) ("hello" (lambda (args) "hello to you too !")) ("zippy" (lambda (args) (dme:replace-regexp-in-string "\n" " " (yow)))) ("music" (lambda (args) (concat "now playing: " (let ((track (dme:now-playing))) 2 (if track track "nothing."))))) ("echo" (lambda (args) args)) ("doctor" dme:erc-doctor) ("version" (lambda (args) (erc-version))) )) (defface dme:erc-robot-face '((t (:foreground "yellow"))) "ERC face used for your robot's output." :group 'erc-faces) (defun dme:erc-robot (proc parsed) "Implements a simple robot for erc. Messages to the robot are of the form: \"nick: !command args\", where: nick - the nickname of the user who is the target of the command, command - the specific command, args - arguments to the command (optional)." (let* ((sspec (aref parsed 1)) (nick (nth 0 (erc-parse-user sspec))) (tgt (aref parsed 2)) (msg (aref parsed 3)) (me (erc-current-nick))) (if (and dme:erc-robot-commands (string-match (concat "^" (regexp-quote me) ": !\\([^ ]+\\) ?\\(.*\\)") msg)) ; this is a robot command to me. (let* ((cmd (substring msg (match-beginning 1) (match-end 1))) (args (substring msg (match-beginning 2))) (l (assoc cmd dme:erc-robot-commands)) reply) (setq reply (concat nick ": " (if l (funcall (cadr l) args) (concat "unknown command: " cmd ": try \"cmds\"")))) (erc-log reply) (save-excursion (set-buffer (erc-get-buffer tgt proc)) (let ((inhibit-read-only t) p) (goto-char (point-max)) (setq p (re-search-backward (erc-prompt))) (insert (erc-format-timestamp) "<" (erc-current-nick) "> ") (when (string-match "[\n]+$" reply) (setq reply (substring reply 0 (match-beginning 0)))) (erc-put-text-property 0 (length reply) 'face 'dme:erc-robot-face reply) (insert reply "\n") (save-excursion (save-match-data (save-restriction (narrow-to-region p (point)) (run-hook-with-args 'erc-send-modify-hook) (run-hook-with-args 'erc-send-post-hook)))) (set-marker (process-mark erc-process) (point)) (set-marker erc-insert-marker (point)) (goto-char (point-max)) (erc-process-input-line (concat reply "\n")))) ; need to return nil to ensure that the string is passed ; to other hook functions nil) nil))) |
From: <dm...@dm...> - 2002-05-03 19:22:56
|
* dm...@dm... [2002-05-03 15:04:48] > Here's a first pass implementation of robot support for erc. At the > moment the main problem is that the reply from the robot is not > inserted into the local buffer. Looking through erc-send-current-line > made me a bit dizzy, so I'll think about that later. This version correctly echoes the robot output at the local end and also has support for a face to colour it. Getting the output in the correct order means that the order of hook functions in erc-server-PRIVMSG-hook needs to be correct: (setq erc-server-PRIVMSG-hook '(erc-auto-query erc-server-PRIVMSG-or-NOTICE dme:erc-robot)) Here it is: (defun dme:erc-doctor (args) (let* ((dbuf "*doctor*") (docbuf (get-buffer dbuf)) outpoint res) (if (not docbuf) (progn (doctor) (setq docbuf (get-buffer dbuf)) (bury-buffer docbuf))) (save-excursion (set-buffer docbuf) (goto-char (point-max)) (insert args) (goto-char (point-max)) (setq outpoint (point)) (doctor-ret-or-read 1) (doctor-ret-or-read 1) (goto-char outpoint) (re-search-forward "^.") (setq outpoint (- (point) 1)) (re-search-forward "^$") (replace-regexp-in-string "\n" " "(buffer-substring outpoint (point))) ))) (setq dme:erc-robot-commands '( ("cmds" (lambda (args) (concat "commands available: " (mapconcat (lambda (e) (car e)) dme:erc-robot-commands " ")))) ("hello" (lambda (args) "hello to you too !")) ("zippy" (lambda (args) (replace-regexp-in-string "\n" " " (yow)))) ("music" (lambda (args) (concat "now playing: " (let ((track (dme:now-playing))) 2 (if track track "nothing."))))) ("echo" (lambda (args) args)) ("doctor" dme:erc-doctor) )) (defface dme:erc-robot-face '((t (:foreground "yellow"))) "ERC face used for your robot's output." :group 'erc-faces) (defun dme:erc-robot (proc parsed) "Implements a simple robot for erc. Messages to the robot are of the form: \"nick: !command args\", where: nick - the nickname of the user who is the target of the command, command - the specific command, args - arguments to the command (optional)." (let* ((sspec (aref parsed 1)) (nick (nth 0 (erc-parse-user sspec))) (tgt (aref parsed 2)) (msg (aref parsed 3)) (me (erc-current-nick))) (if (and dme:erc-robot-commands (string-match (concat "^" (regexp-quote me) ": !\\([^ ]+\\) ?\\(.*\\)") msg)) ; this is a robot command to me. (let* ((cmd (substring msg (match-beginning 1) (match-end 1))) (args (substring msg (match-beginning 2))) (l (assoc cmd dme:erc-robot-commands)) reply) (setq reply (concat nick ": " (if l (funcall (cadr l) args) (concat "unknown command: " cmd ": try \"cmds\"")))) (erc-log reply) (save-excursion (let (p) (set-buffer (erc-get-buffer tgt proc)) (goto-char (point-max)) (setq p (re-search-backward (erc-prompt))) (insert (erc-format-timestamp) "<" (erc-current-nick) "> ") (when (string-match "[\n]+$" reply) (setq reply (substring reply 0 (match-beginning 0)))) (erc-put-text-property 0 (length reply) 'face 'dme:erc-robot-face reply) (insert reply "\n") (save-excursion (save-match-data (save-restriction (narrow-to-region p (point)) (run-hook-with-args 'erc-send-modify-hook) (run-hook-with-args 'erc-send-post-hook)))) (set-marker (process-mark erc-process) (point)) (set-marker erc-insert-marker (point)) (erc-process-input-line (concat reply "\n")))) ; need to return nil to ensure that the string is passed ; to other hook functions nil) nil))) |
From: <dm...@dm...> - 2002-05-03 14:57:27
|
A useful robot: (defun dme:erc-doctor (args) (let* ((dbuf "*doctor*") (docbuf (get-buffer dbuf)) outpoint res) (if (not docbuf) (progn (doctor) (setq docbuf (get-buffer dbuf)) (bury-buffer docbuf))) (save-excursion (set-buffer docbuf) (goto-char (point-max)) (insert args) (goto-char (point-max)) (setq outpoint (point)) (doctor-ret-or-read 1) (doctor-ret-or-read 1) (goto-char outpoint) (re-search-forward "^.") (setq outpoint (- (point) 1)) (re-search-forward "^$") (replace-regexp-in-string "\n" " "(buffer-substring outpoint (point))) ))) (add-to-list 'dme:erc-robot-commands '("doctor" dme:erc-doctor)) |
From: <dm...@dm...> - 2002-05-03 14:06:50
|
Here's a first pass implementation of robot support for erc. At the moment the main problem is that the reply from the robot is not inserted into the local buffer. Looking through erc-send-current-line made me a bit dizzy, so I'll think about that later. Is anyone interested in this ? I was thinking about adding support for evaluating lisp expressions using the unsafep package... (setq dme:erc-robot-commands '( ("cmds" (lambda (args) (concat "commands available: " (mapconcat (lambda (e) (car e)) dme:erc-robot-commands " ")))) ("hello" (lambda (args) "hello to you too !")) ("zippy" (lambda (args) (replace-regexp-in-string "\n" "" (yow)))) ("music" (lambda (args) (concat "now playing: " (let ((track (dme:now-playing))) (if track track "nothing."))))) ("echo" (lambda (args) args)) )) (defun dme:erc-robot (proc parsed) "Implements a simple robot for erc. Messages to the robot are of the form: \"nick: !command args\", where: nick - the nickname of the user who is the target of the command, command - the specific command, args - arguments to the command (optional)." (let* ((sspec (aref parsed 1)) (nick (nth 0 (erc-parse-user sspec))) (tgt (aref parsed 2)) (msg (aref parsed 3)) (me (erc-current-nick))) (if (string-match (concat "^" (regexp-quote me) ": !\\([^ ]+\\) ?\\(.*\\)") msg) ; this is a robot command to me. (let* ((cmd (substring msg (match-beginning 1) (match-end 1))) (args (substring msg (match-beginning 2))) (l (assoc cmd dme:erc-robot-commands)) reply) (goto-char (point-max)) (setq reply (concat nick ": " (if l (funcall (cadr l) args) (concat "unknown command: " cmd ": try \"cmds\"")))) (erc-log reply) ; how to insert the reply in my buffer as well ? (save-excursion (set-buffer (erc-get-buffer tgt proc)) (erc-process-input-line reply)) ; need to return nil to ensure that the string is passed ; to other hook functions nil) nil))) (add-hook 'erc-server-PRIVMSG-hook 'dme:erc-robot) |
From: Alex S. <al...@em...> - 2002-05-02 20:07:48
|
Gergely Nagy <alg...@bo...> writes: > Look at the Debian package, it has a ChangeLog, generated from CVS log > entries. I mainly use rcs2log, with my own tweaks. I'll upload the > stuff into http://bonehunter.rulez.org/~algernon/changelog/, if you're > interested, check it out. Good, I use the Emacs function vc-update-change-log which also uses rcs2log. > Oh, I prefer the automatically generated changelog =) Fine with me. Next time I prepare a release I will just have to remember. Alex. -- http://www.electronicintifada.net/diaries/index.html http://www.us-israel.org/jsource/US-Israel/hr2506c.html |
From: Alex S. <al...@em...> - 2002-05-02 20:06:44
|
dm...@dm... writes: > * al...@em... [2002-05-01 18:58:57] >> I will apply the patch. Since it is longer than 10 lines, I'll add >> your name to the list of contributors. What name should I use? > > David Edmondson. Thanks. > * al...@em... [2002-05-01 19:06:33] >> Oh and another thing, a ChangeLog entry would be nice... :) In this >> case something like the following, I guess... (but with your name >> instead of mine). > > Are you happy to use the one you generated, or would you like me to > write something more ? The one I used is fine. It's just for future contributions by people on the list. :) Alex. -- http://www.electronicintifada.net/diaries/index.html http://www.us-israel.org/jsource/US-Israel/hr2506c.html |
From: Gergely N. <alg...@bo...> - 2002-05-01 22:05:38
|
> Do we want a ChangeLog in erc? I added a ChangeLog file to erc here > at home, because I prepare any ChangeLog entries using C-x 4 a, these > I can then paste into the buffers used for commit messages. So > perhaps a ChangeLog would be nice? Perhaps it would be even better to > not have a ChangeLog and create it from the CVS log entries. Look at the Debian package, it has a ChangeLog, generated from CVS log entries. I mainly use rcs2log, with my own tweaks. I'll upload the stuff into http://bonehunter.rulez.org/~algernon/changelog/, if you're interested, check it out. Oh, I prefer the automatically generated changelog =) |
From: <dm...@dm...> - 2002-05-01 19:50:08
|
* al...@em... [2002-05-01 18:58:57] > I will apply the patch. Since it is longer than 10 lines, I'll add > your name to the list of contributors. What name should I use? David Edmondson. * al...@em... [2002-05-01 19:06:33] > Oh and another thing, a ChangeLog entry would be nice... :) In this > case something like the following, I guess... (but with your name > instead of mine). Are you happy to use the one you generated, or would you like me to write something more ? |
From: Alex S. <al...@em...> - 2002-05-01 18:21:44
|
Alex Schroeder <al...@em...> writes: > Perhaps it would be even better to not have a ChangeLog and create > it from the CVS log entries. This would be what it looks like (after replacing the name of my host with "user.sf.net"). Alex. 2002-05-01 kensanata <ken...@us...> * erc.el (erc-warn-about-blank-lines): New option. (erc-send-current-line): Use it. (erc-quit-reason-various-alist): New option. (erc-quit-reason): New option. (erc-quit-reason-normal): New function. (erc-quit-reason-zippy): New function. (erc-quit-reason-various): New function. (erc-cmd-QUIT): Use them. 2002-04-30 kensanata <ken...@us...> * erc.el: Version 2.92 * erc.el (erc-send-modify-hook): Default value is nil. 2002-04-27 jwiegley <jwi...@us...> * erc.el: Don't redisplay the prompt if the ERC buffer is no longer alive. 2002-04-26 jwiegley <jwi...@us...> * erc.el: Don't call `set-buffer' on old-buf unless the buffer is valid. It's often not when separate frames are being used. ... -- http://www.electronicintifada.net/diaries/index.html http://www.us-israel.org/jsource/US-Israel/hr2506c.html |
From: Alex S. <al...@em...> - 2002-05-01 18:10:13
|
Do we want a ChangeLog in erc? I added a ChangeLog file to erc here at home, because I prepare any ChangeLog entries using C-x 4 a, these I can then paste into the buffers used for commit messages. So perhaps a ChangeLog would be nice? Perhaps it would be even better to not have a ChangeLog and create it from the CVS log entries. Alex. -- http://www.electronicintifada.net/diaries/index.html http://www.us-israel.org/jsource/US-Israel/hr2506c.html |
From: Alex S. <al...@em...> - 2002-05-01 18:02:49
|
Oh and another thing, a ChangeLog entry would be nice... :) In this case something like the following, I guess... (but with your name instead of mine). 2002-05-01 Alex Schroeder <al...@em...> * erc.el (erc-warn-about-blank-lines): New option. (erc-send-current-line): Use it. (erc-quit-reason-various-alist): New option. (erc-quit-reason): New option. (erc-quit-reason-normal): New function. (erc-quit-reason-zippy): New function. (erc-quit-reason-various): New function. (erc-cmd-QUIT): Use them. Alex. -- http://www.electronicintifada.net/diaries/index.html http://www.us-israel.org/jsource/US-Israel/hr2506c.html |
From: Alex S. <al...@em...> - 2002-05-01 17:55:21
|
I will apply the patch. Since it is longer than 10 lines, I'll add your name to the list of contributors. What name should I use? Alex. -- http://www.electronicintifada.net/diaries/index.html http://www.us-israel.org/jsource/US-Israel/hr2506c.html |
From: <dm...@dm...> - 2002-05-01 13:42:01
|
This patch includes the previous one (configurable /quit messages) and adds the ability to disable the message and (ding) if you type a blank line. --- erc.el.~1.249.~ Fri Apr 26 03:46:35 2002 +++ erc.el Wed May 1 14:38:18 2002 @@ -130,6 +130,10 @@ :group 'erc :type 'boolean) +(defcustom erc-warn-about-blank-lines t + "Warn the user if they attempt to send a blank line." + :group 'erc + :type 'boolean) ;; tunable GUI stuff @@ -448,6 +452,29 @@ :group 'erc :type 'boolean) +(defcustom erc-quit-reason-various-alist nil + "Alist of possible arguments to the /quit command and what should happen +as a result. For example: + (setq erc-quit-reason-various-alist + '((\"zippy\" erc-quit-reason-zippy) + (\"xmms\" dme:now-playing) + (\"version\" erc-quit-reason-normal) + (\"home\" \"Gone home !\"))) +If the user types \"/quit zippy\", then a Zippy the Pinhead quotation +will be used as the quit message. The car of each element should be +a regexp. If none match, the string is inserted directly." + :group 'erc + :type '(repeat (list regexp (choice (string) (function))))) + +(defcustom erc-quit-reason 'erc-quit-reason-normal + "A function which returns the reason for quitting. Passed a single +argument, which is the string typed by the user after \"/quit\"." + :group 'erc + :type '(choice (const erc-quit-reason-normal) + (const erc-quit-reason-zippy) + (const erc-quit-reason-various) + (symbol))) + (defvar erc-grab-buffer-name "*erc-grab*" "The name of the buffer created by `erc-grab-region'.") @@ -2341,6 +2368,28 @@ (erc-update-mode-line)) t) (t nil))) + +(defun erc-quit-reason-normal (&optional s) + "Normal quit message." + (or s + (format "\C-bERC\C-b v%s (IRC client for Emacs)"; - \C-b%s\C-b" + erc-version-string) ; erc-official-location) + )) + +(defun erc-quit-reason-zippy (&optional s) + "Zippy quit message." + (or s + (replace-regexp-in-string "\n" "" (yow)))) + +(defun erc-quit-reason-various (s) + "Choose a quit reason based on the string \"s\"." + (let ((res (car (assoc-default + s erc-quit-reason-various-alist 'string-match)))) + (cond + ((functionp res) (funcall res)) + ((stringp res) res) + (s)))) + (defalias 'erc-cmd-Q 'erc-cmd-QUERY) (defun erc-cmd-QUIT (line &optional force) @@ -2351,16 +2400,12 @@ ((string-match "^\\s-*\\(.*\\)$" line) (let* ((s (match-string 1 line)) (ob (current-buffer)) - (buffer (erc-server-buffer))) + (buffer (erc-server-buffer)) + (reason (funcall erc-quit-reason (if s s "")))) (if (and buffer (bufferp buffer)) (set-buffer buffer)) - (erc-log (format "cmd: QUIT: %s" s)) + (erc-log (format "cmd: QUIT: %s" reason)) (setq quitting t) - (erc-send-command - (if (or (not s) (string= s "")) - (format - "QUIT :\C-bERC\C-b v%s (IRC client for Emacs)"; - \C-b%s\C-b" - erc-version-string) ; erc-official-location) - (format "QUIT :%s" s)) force) + (erc-send-command (format "QUIT :%s" reason) force) (set-buffer ob) (when erc-save-queries-on-quit (erc-save-query-buffers erc-process)) @@ -5028,8 +5073,10 @@ (old-buf (current-buffer))) (cond ((string-match "^\\s-*\n*$" str) - (message "Blank line - ignoring...") - (ding)) + (if erc-warn-about-blank-lines + (progn + (message "Blank line - ignoring...") + (ding)))) ((<= (point) erc-insert-marker) (message "Point is not in the input area") (ding)) |
From: <dm...@dm...> - 2002-04-26 13:19:43
|
* dm...@dm... [2002-04-26 12:44:39] > The following patch against CVS allows the user to customize the quit > message by writing a lisp function. Two functions are provided: > - erc-quit-reason-normal: uses the existing version number > string > - erc-quit-reason-zippy: uses a quote from Zippy the Pinhead. > > I'm not subscribed to erc-help, please cc: me on any replies. Here's a better one, as it allows the user to specify an alist of quit keywords to string/function mappings (as well as the previous behaviour). |
From: <dm...@dm...> - 2002-04-26 11:45:53
|
The following patch against CVS allows the user to customize the quit message by writing a lisp function. Two functions are provided: - erc-quit-reason-normal: uses the existing version number string - erc-quit-reason-zippy: uses a quote from Zippy the Pinhead. I'm not subscribed to erc-help, please cc: me on any replies. |