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...> - 2003-09-29 20:11:42
|
lawrence mitchell <we...@gm...> writes: > /---[ gnus-util.el ] > | (eval-and-compile > | (cond > | ((fboundp 'replace-in-string) > | (defalias 'gnus-replace-in-string 'replace-in-string)) > | ((fboundp 'replace-regexp-in-string) > | (defun gnus-replace-in-string (string regexp newtext &optional literal) > | (replace-regexp-in-string regexp newtext string nil literal))) > | (t > | (defun gnus-replace-in-string (string regexp newtext &optional literal) > | (let ((start 0) tail) > | (while (string-match regexp string start) > | (setq tail (- (length string) (match-end 0))) > | (setq string (replace-match newtext nil literal string)) > | (setq start (- (length string) tail)))) > | string)))) > \--- Looks just like the sort of crud we have in erc-compat.el ;) I would just distinguish two cases, however. No reason to support Emacs 19 and other brands. Alex. -- http://www.emacswiki.org/alex/ There is no substitute for experience. |
|
From: lawrence m. <we...@gm...> - 2003-09-27 22:36:54
|
Idly browsing the erc.el code, I stumbled across usage of REPLACE-REGEXP-IN-STRING, which doesn't exist in XEmacs. A compatibilty function probably belongs in erc-compat.el. Do we want to go the Gnus route, and try and cater for everyone: /---[ gnus-util.el ] | (eval-and-compile | (cond | ((fboundp 'replace-in-string) | (defalias 'gnus-replace-in-string 'replace-in-string)) | ((fboundp 'replace-regexp-in-string) | (defun gnus-replace-in-string (string regexp newtext &optional literal) | (replace-regexp-in-string regexp newtext string nil literal))) | (t | (defun gnus-replace-in-string (string regexp newtext &optional literal) | (let ((start 0) tail) | (while (string-match regexp string start) | (setq tail (- (length string) (match-end 0))) | (setq string (replace-match newtext nil literal string)) | (setq start (- (length string) tail)))) | string)))) \--- Or just provide a definition of REPLACE-REGEXP-IN-STRING for XEmacsen? -- lawrence mitchell <we...@gm...> |
|
From: lawrence m. <we...@gm...> - 2003-09-26 20:34:06
|
lawrence mitchell wrote:
> Mario Lang wrote:
>> lawrence mitchell <we...@gm...> writes:
> [...]
>>> If it's not really a prompt (it isn't), should it still be
>>> fontified using ERC-PROMPT-FACE?
>> That would at least be consistent with the case where
>> erc-show-my-nick is nil, wouldn't it?
> I'm not sure what you're getting at here. In any csae, I've
> committed the previous patch, modulo name changes.
How about this:
I'm not sure whether I should be (ab)using ERC-DISPLAY-PROMPT
quite as much as I am though.
--8<---------------cut here---------------start------------->8---
Index: erc.el
===================================================================
RCS file: /cvsroot/erc/erc/erc.el,v
retrieving revision 1.570
diff -u -r1.570 erc.el
--- erc.el 25 Sep 2003 18:13:46 -0000 1.570
+++ erc.el 26 Sep 2003 20:08:51 -0000
@@ -756,6 +756,11 @@
'((t (:bold t :foreground "Black" :background"lightBlue2")))
"ERC face for the prompt."
:group 'erc-faces)
+(defface erc-command-indicator-face
+ '((t (:bold t)))
+ "ERC face for the command indicator. See the variable
+`erc-command-indicator'."
+ :group 'erc-faces)
(defface erc-notice-face '((t (:bold t :foreground "SlateBlue")))
"ERC face for notices."
:group 'erc-faces)
@@ -3439,11 +3444,12 @@
(set-buffer cb)
(switch-to-buffer-other-window buf))))
-(defun erc-display-prompt (&optional buffer pos prompt)
+(defun erc-display-prompt (&optional buffer pos prompt face)
"Display PROMPT in BUFFER at position POS.
Display ERC prompt (defined by `erc-prompt' variable if PROMPT is
NIL) in BUFFER (if NIL or not provided - current buffer) using
-`erc-prompt-face' at the POS (if not NIL) or current position."
+`erc-prompt-face' (if FACE is nil) at the POS (if not NIL) or
+current position."
(let* ((prompt (or prompt (erc-prompt)))
(l (length prompt))
(ob (current-buffer)))
@@ -3468,7 +3474,7 @@
'front-sticky t
'read-only t))
(erc-put-text-property 0 (1- (length prompt))
- 'face 'erc-prompt-face
+ 'face (or face 'erc-prompt-face)
prompt)
(when erc-prompt-interactive-input
(setq prompt (erc-propertize prompt
@@ -5731,7 +5737,9 @@
(if (and (not multiline-p)
(char-equal (aref line 0) ?/)) ; is it a non-pasted command?
(if (not erc-hide-prompt)
- (erc-display-prompt nil nil (erc-command-indicator)))
+ (erc-display-prompt nil nil (erc-command-indicator)
+ (and (erc-command-indicator)
+ 'erc-command-indicator-face)))
(insert ; ok, it's a privmsg.
(if erc-show-my-nick
(concat "<" nickname "> ")
--8<---------------cut here---------------end--------------->8---
--
lawrence mitchell <we...@gm...>
|
|
From: lawrence m. <we...@gm...> - 2003-09-25 18:23:46
|
Mario Lang wrote: > lawrence mitchell <we...@gm...> writes: [...] >> If it's not really a prompt (it isn't), should it still be >> fontified using ERC-PROMPT-FACE? > That would at least be consistent with the case where > erc-show-my-nick is nil, wouldn't it? I'm not sure what you're getting at here. In any csae, I've committed the previous patch, modulo name changes. -- lawrence mitchell <we...@gm...> |
|
From: Mario L. <ml...@de...> - 2003-09-25 17:19:50
|
lawrence mitchell <we...@gm...> writes: > Mario Lang wrote: > > [...] > >> Hmm, I like this. However, I think the name is a bit >> misleading. It is not really a prompt, since the user does not >> see it as such. Can you think of a better name? Other than >> that, I'd be fine with this change. > > How about ERC-COMMAND-INDICATOR? That sounds good to me. > If it's not really a prompt (it isn't), should it still be > fontified using ERC-PROMPT-FACE? That would at least be consistent with the case where erc-show-my-nick is nil, wouldn't it? -- CYa, Mario | Debian Developer <URL:http://debian.org/> | Get my public key via finger ml...@db... | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44 |
|
From: lawrence m. <we...@gm...> - 2003-09-25 11:41:47
|
Mario Lang wrote: [...] > Hmm, I like this. However, I think the name is a bit > misleading. It is not really a prompt, since the user does not > see it as such. Can you think of a better name? Other than > that, I'd be fine with this change. How about ERC-COMMAND-INDICATOR? If it's not really a prompt (it isn't), should it still be fontified using ERC-PROMPT-FACE? -- lawrence mitchell <we...@gm...> |
|
From: Mario L. <ml...@de...> - 2003-09-25 02:11:16
|
lawrence mitchell <we...@gm...> writes: > It allows one to have a separate prompt for the use of commands > (if ERC-HIDE-PROMPT is non-nil). Example output (with > ERC-COMMAND-PROMPT set to ">>>"): > > | 17:39 <lurwas> lawrence: Ok, thanks :) > | 17:44 >>> /mode lawrence -w > | 17:44 *** djax (~dj...@pD...) has quit: "leaving" > | 17:44 >>> /mode lawrence +w Hmm, I like this. However, I think the name is a bit misleading. It is not really a prompt, since the user does not see it as such. Can you think of a better name? Other than that, I'd be fine with this change. -- CYa, Mario |
|
From: lawrence m. <we...@gm...> - 2003-09-24 16:52:36
|
What do people think of this change (if we're not in
feature-freeze).
It allows one to have a separate prompt for the use of commands
(if ERC-HIDE-PROMPT is non-nil). Example output (with
ERC-COMMAND-PROMPT set to ">>>"):
| 17:39 <lurwas> lawrence: Ok, thanks :)
| 17:44 >>> /mode lawrence -w
| 17:44 *** djax (~dj...@pD...) has quit: "leaving"
| 17:44 >>> /mode lawrence +w
--8<---------------cut here---------------start------------->8---
Index: erc.el
===================================================================
RCS file: /cvsroot/erc/erc/erc.el,v
retrieving revision 1.568
diff -u -r1.568 erc.el
--- erc.el 17 Sep 2003 15:12:03 -0000 1.568
+++ erc.el 24 Sep 2003 16:49:26 -0000
@@ -147,7 +147,9 @@
(defcustom erc-hide-prompt nil
"If non-nil, the prompt will not appear in the ERC buffer for commands (i.e.,
-input starting with a '/').")
+input starting with a '/')."
+ :group 'erc
+ :type 'boolean)
;; tunable GUI stuff
@@ -256,6 +258,23 @@
(concat prompt " ")
prompt)))
+(defcustom erc-command-prompt nil
+ "Prompt used by ERC for showing commands.
+If non-nil, this prompt will be used in the ERC buffer for
+commands (i.e., input starting with a '/'), instead of using
+`erc-prompt'."
+ :group 'erc
+ :type '(choice string function))
+
+(defun erc-command-prompt ()
+ (and erc-command-prompt
+ (let ((prompt (if (functionp erc-command-prompt)
+ (funcall erc-command-prompt)
+ erc-command-prompt)))
+ (if (> (length prompt) 0)
+ (concat prompt " ")
+ prompt))))
+
; Hmm, is this useful at all. If so, we would need to do it better, because
; one looses nickname completion when turning this variable on.
(defcustom erc-prompt-interactive-input nil
@@ -3420,12 +3439,12 @@
(set-buffer cb)
(switch-to-buffer-other-window buf))))
-(defun erc-display-prompt (&optional buffer pos)
- "Display prompt in BUFFER at position POS.
-Display ERC prompt (defined by `erc-prompt' variable) in BUFFER (if NIL or not
-provided - current buffer) using `erc-prompt-face' at the POS (if not NIL) or
-current position."
- (let* ((prompt (erc-prompt))
+(defun erc-display-prompt (&optional buffer pos prompt)
+ "Display PROMPT in BUFFER at position POS.
+Display ERC prompt (defined by `erc-prompt' variable if PROMPT is
+NIL) in BUFFER (if NIL or not provided - current buffer) using
+`erc-prompt-face' at the POS (if not NIL) or current position."
+ (let* ((prompt (or prompt (erc-prompt)))
(l (length prompt))
(ob (current-buffer)))
(when (> l 0)
@@ -5708,9 +5727,8 @@
(let ((insert-position (point)))
(if (and (not multiline-p)
(char-equal (aref line 0) ?/)) ; is it a non-pasted command?
- ;; This used to be `erc-display-prompt', which seems wrong.
(if (not erc-hide-prompt)
- (erc-display-prompt))
+ (erc-display-prompt nil nil (erc-command-prompt)))
(insert ; ok, it's a privmsg.
(if erc-show-my-nick
(concat "<" nickname "> ")
--8<---------------cut here---------------end--------------->8---
--
lawrence mitchell <we...@gm...>
|
|
From: David H. <dav...@ph...> - 2003-09-22 21:48:15
|
On Mon, 22 Sep 2003 17:29:19 +0200 Mario Lang wrote: > Bruno Hertz <br...@ya...> writes: > >> Still, I'll give it a try next time around. Actually, after >> thinking about it, maybe always announcing 'away' maybe a little >> too verbose anyway :) > That is why it is not default behaviour. And usually this is considered as abuse. If you implement such a feature: please add a note (in read bold blinking italic ... letters) to the wiki, that it is not recommended. Regards, David |
|
From: Mario L. <ml...@de...> - 2003-09-22 15:29:55
|
Bruno Hertz <br...@ya...> writes: > Still, I'll give it a try next time around. Actually, after > thinking about it, maybe always announcing 'away' maybe a little > too verbose anyway :) That is why it is not default behaviour. -- CYa, Mario | Debian Developer <URL:http://debian.org/> | Get my public key via finger ml...@db... | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44 |
|
From: Bruno H. <br...@ya...> - 2003-09-21 16:38:35
|
On Sun, 2003-09-21 at 15:28, Jorgen Schaefer wrote: > He wants, on /away food, the following commands be issued: > > /AWAY food > and for every channel he is in: > /ME is away: food > > Currently, `erc-public-away-p' does a public "I'm back" on the > default target. > > Bruno, you can add a function to erc-server-306-hook and do > whatever you want there, i.e. telling every channel (and every > query if you want) any message you want (the macro > `erc-with-all-buffers-of-server' might be of help to you here). > > Other ERC developers, the correct thing here, I think, would be to > remove most parts of erc-process-away to an external file > (erc-autoaway, probably), because they're not core functionality. > I'm short on time, so don't expect that from me anytime soon :) > > Greetings, > -- Jorgen Jorgen many thanks, as said in a previous mail I found a quick workaround by hacking erc-process-away. I guess though that your solution would be cleaner - I didn't look too close at erc internals. Still, I'll give it a try next time around. Actually, after thinking about it, maybe always announcing 'away' maybe a little too verbose anyway :) Bruno |
|
From: Jorgen S. <fo...@fo...> - 2003-09-21 13:28:22
|
Alex Schroeder <al...@em...> writes:
> I am a bit confused. What exactly is the unexpected behaviour?
> I've been using "/AWAY food" and similar commands without further
> thought on #emacs on freenode, so you have to be clearer in what you
> are seeing and what you are expecting to see.
He wants, on /away food, the following commands be issued:
/AWAY food
and for every channel he is in:
/ME is away: food
Currently, `erc-public-away-p' does a public "I'm back" on the
default target.
Bruno, you can add a function to erc-server-306-hook and do
whatever you want there, i.e. telling every channel (and every
query if you want) any message you want (the macro
`erc-with-all-buffers-of-server' might be of help to you here).
Other ERC developers, the correct thing here, I think, would be to
remove most parts of erc-process-away to an external file
(erc-autoaway, probably), because they're not core functionality.
I'm short on time, so don't expect that from me anytime soon :)
Greetings,
-- Jorgen
--
((email . "fo...@fo...") (www . "http://www.forcix.cx/")
(gpg . "1024D/028AF63C") (irc . "nick forcer on IRCnet"))
|
|
From: Alex S. <al...@em...> - 2003-09-21 12:53:16
|
I am a bit confused. What exactly is the unexpected behaviour? I've been using "/AWAY food" and similar commands without further thought on #emacs on freenode, so you have to be clearer in what you are seeing and what you are expecting to see. Alex. Bruno Hertz <br...@ya...> writes: > One concerns /away and public visibility of corresponding > messages. More specifically, when leaving with a message > like '/away coffee' other clients like xchat issue a gone > message of the kind '* nick is away: coffee'. > > I found out already that the back message is there and > controlled by a predicate (public-away), but a superficial > inspection of the erc sources gave me the impression that > provisions of a gone message, which I think is the more > important since I can start talking when being back but not > after leaving, are missing. > > So - any plans for that or hints how I could implement it > myself? I'm not much acquainted with the irc protocol but > hopefully it shouldn't be too difficult .... (?) -- http://www.emacswiki.org/alex/ There is no substitute for experience. |
|
From: Alex S. <al...@em...> - 2003-09-21 12:51:14
|
Xavier Maillard <ze...@gn...> writes: > Hmm. What I mean is that the french translation I made is quite good > and ready (for the basics) but I have problems to tell ERC to use it by > default. I must kludge to have it started and this is why I say it is > pain to have french. This is why I don't have french by default too :) Ah, well that would be a problem. How do you " tell ERC to use it"? Alex. -- http://www.emacswiki.org/alex/ There is no substitute for experience. |
|
From: Xavier M. <ze...@gn...> - 2003-09-19 23:36:03
|
Mario Lang <ml...@de...> writes: > Xavier Maillard <ze...@gn...> writes: >=20=20 > > > > I just wonder wether there were advancements on this point > > > > through catalog. > > > >=20=20 > > > > I have already done some effort to translate strings to french > > > > but AFAIC, I don't really see real progress on this point. > > > >=20=20 > > > > It is still a pain to have ERC talks in other thing but > > > > english. > > > >=20=20 > > > > May someone reports me where I should look ? > > > I dont unerstand what you are asking for. > >=20=20 > > Some times ago, someone (maybe you) introduced the zenirc catalog > > stuff for ERC. > Yes, that was actually me, during the massive rewrite phase. >=20=20 > > I can imagine that if it was added in ERC, someone got interests in > > having it and so having more translations, no ? > Sure we are interested in translations, it is just that so far, no > one has submitted anything. As already said, I'd be happy to include > such stuff if it were available. Ok. =20 > > > You will have to find willing translators to get this done. > > > I, for my part, do not see any real use in german messages, > > > so I did not work on a translation... > >=20=20 > > I personnaly do not see interest in having french messages, but as > > I did the translation, I would appreciate if I could try it without > > a pain. > So, what are your pains? Is your french translation suitable/ready > for submission? Hmm. What I mean is that the french translation I made is quite good and ready (for the basics) but I have problems to tell ERC to use it by default. I must kludge to have it started and this is why I say it is pain to have french. This is why I don't have french by default too :) zeDek =2D-=20 Microsoft isn't the answer. Microsoft is the question, and the answer is NO. |
|
From: Mario L. <ml...@de...> - 2003-09-18 11:22:54
|
Xavier Maillard <ze...@gn...> writes: >> > I just wonder wether there were advancements on this point through >> > catalog. >> > >> > I have already done some effort to translate strings to french but >> > AFAIC, I don't really see real progress on this point. >> > >> > It is still a pain to have ERC talks in other thing but english. >> > >> > May someone reports me where I should look ? >> I dont unerstand what you are asking for. > > Some times ago, someone (maybe you) introduced the zenirc catalog stuff > for ERC. Yes, that was actually me, during the massive rewrite phase. > I can imagine that if it was added in ERC, someone got interests in > having it and so having more translations, no ? Sure we are interested in translations, it is just that so far, no one has submitted anything. As already said, I'd be happy to include such stuff if it were available. >> You will have to find willing translators to get this done. >> I, for my part, do not see any real use in german messages, >> so I did not work on a translation... > > I personnaly do not see interest in having french messages, but as I > did the translation, I would appreciate if I could try it without a > pain. So, what are your pains? Is your french translation suitable/ready for submission? -- CYa, Mario | Debian Developer <URL:http://debian.org/> | Get my public key via finger ml...@db... | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44 |
|
From: Xavier M. <ze...@gn...> - 2003-09-16 21:32:24
|
Mario Lang <ml...@de...> writes: > Xavier Maillard <ze...@gn...> writes: >=20=20 > > I just wonder wether there were advancements on this point through > > catalog. > >=20=20 > > I have already done some effort to translate strings to french but > > AFAIC, I don't really see real progress on this point. > >=20=20 > > It is still a pain to have ERC talks in other thing but english. > >=20=20 > > May someone reports me where I should look ? > I dont unerstand what you are asking for. Some times ago, someone (maybe you) introduced the zenirc catalog stuff for ERC. I can imagine that if it was added in ERC, someone got interests in having it and so having more translations, no ? =20 > You will have to find willing translators to get this done. > I, for my part, do not see any real use in german messages, > so I did not work on a translation... I personnaly do not see interest in having french messages, but as I did the translation, I would appreciate if I could try it without a pain. =20=20 > You are free to contribute stuff though. Yep I know that :) Thx, zeDek =2D-=20 "There is no comparison. You run Win95 if you want to reboot a lot and not learn a DAMN thing about your computer. You run Linux if you want maximum performance, complete control, rock-solid stability, and you want to really KNOW how your computer works." |
|
From: Mario L. <ml...@de...> - 2003-09-16 11:21:39
|
Xavier Maillard <ze...@gn...> writes: > I just wonder wether there were advancements on this point through > catalog. > > I have already done some effort to translate strings to french but > AFAIC, I don't really see real progress on this point. > > It is still a pain to have ERC talks in other thing but english. > > May someone reports me where I should look ? I dont unerstand what you are asking for. You will have to find willing translators to get this done. I, for my part, do not see any real use in german messages, so I did not work on a translation... You are free to contribute stuff though. -- CYa, Mario | Debian Developer <URL:http://debian.org/> | Get my public key via finger ml...@db... | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44 |
|
From: Bruno H. <br...@ya...> - 2003-09-16 02:00:04
|
Hi I'm currently experimenting with erc and very happy with it. Occasionally though questions arise. One concerns /away and public visibility of corresponding messages. More specifically, when leaving with a message like '/away coffee' other clients like xchat issue a gone message of the kind '* nick is away: coffee'. I found out already that the back message is there and controlled by a predicate (public-away), but a superficial inspection of the erc sources gave me the impression that provisions of a gone message, which I think is the more important since I can start talking when being back but not after leaving, are missing. So - any plans for that or hints how I could implement it myself? I'm not much acquainted with the irc protocol but hopefully it shouldn't be too difficult .... (?) Thanks a lot Bruno |
|
From: Xavier M. <ze...@gn...> - 2003-09-15 23:31:38
|
Hello, I just wonder wether there were advancements on this point through catalog. I have already done some effort to translate strings to french but AFAIC, I don't really see real progress on this point. It is still a pain to have ERC talks in other thing but english. May someone reports me where I should look ? zeDek =2D-=20 alt.sex.aliens - How to make the most of your UFO abduction. |
|
From: Benjamin R. <rut...@ci...> - 2003-09-03 14:45:22
|
Mario Lang <ml...@de...> writes:
> So, if anyone here has any pending code to commit, please do so in the
> next few days. Also, if you could spend some time on trying to find and
> fix remaining bugs, that would be helpful too. I will be uploading a new
> CVS snapshot to the Debian archives next week.
Any chance that erc-cite.el could be checked in? I use it almost
daily without any problems, consider it stable, and expect that others
could benefit from it. The latest version is included below for
convenience; it actually has not changed since I last posted it in
this group's message <wc3...@ga...>.
As a reminder, you can enable this package by doing (require
'erc-cite), which then binds C-c C-a in erc-mode-map. Concurrent with
adding erc-cite.el to the repository should be removing the redundant
C-c C-a binding from erc.el (C-a runs erc-bol anyway).
Thanks, let me know of your decision to include it or not.
;; erc-cite.el -- Cite messages written by previous IRC users
;; Copyright (C) 2003 Benjamin Rutt <br...@bl...>
;; Author: Benjamin Rutt <br...@bl...>
;; Keywords: comm, convenience
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Ever have trouble knowing which IRC message is in response to which
;; previous message? I realize that there is a standard of the
;; prefixing a message with nickname: style messages, e.g. 'foo'
;; saying things in response to user 'bar' as follows:
;;
;; <foo> bar: may God have mercy on your soul.
;;
;; But that just doesn't cut it when user 'bar' has written many
;; messages previously. Exactly which message made user 'foo' so
;; upset?
;;
;; That's where this package comes in. This package allows you to
;; cite messages written by previous IRC users. To enable this
;; package, do a
;;
;; (require 'erc-cite)
;;
;; In order to cite a message written previously in an IRC channel,
;; simply move point up so that it is placed on one of the lines of
;; the previous message you want to cite, and press the key sequence
;;
;; C-c C-a
;;
;; which will place the text of that message between citation marks on
;; the current ERC prompt line, and place point at the end of the
;; prompt, allowing you to respond to that particular message, with
;; everyone in the channel knowing exactly which message you are
;; responding to.
;;
;; Here is an example of user 'bar' citing user 'foo'
;;
;; <foo> I wrote this
;; <foo> then I wrote thsi
;; <foo> and then I wrote this
;; <bar> "<foo> then I wrote thsi" <-- you made a spelling error
;;
;; Whether or not the <foo> is included in the citation can be
;; customized; see the variable `erc-cite-build-citation-function'.
(require 'erc)
(defconst erc-cite-version "$Revision: 1.0 $"
"ERC cite revision")
(defgroup erc-cite nil
"Cite messages written by previous IRC users"
:group 'erc)
(defcustom erc-cite-start "\""
"*Beginning of ERC citation prefix."
:group 'erc-cite
:type 'string)
(defcustom erc-cite-end "\" <-- "
"*End of ERC citation prefix."
:group 'erc-cite
:type 'string)
(defcustom erc-cite-build-citation-function 'erc-cite-build-citation-with-nick
"*A function that builds the citation string.
The function must take two arguments: NICK and MESSAGE.
NICK is the IRC nickname who authored the message that is being cited.
MESSAGE is the IRC message that is being cited.
The function should return a string that will be then placed in
the current ERC input line, with point placed at the end.
Two builtin functions are
`erc-cite-build-citation-with-nick' (the default) and
`erc-cite-build-citation-without-nick'.
Here is an example of a custom function, which uses the
without-nick style in one channel and the with-nick style in all
others:
(defun erc-cite-build-citation-with-nick-maybe (nick message)
(if (equal (buffer-name) \"#oneononechatting\")
(erc-cite-build-citation-without-nick nick message)
(erc-cite-build-citation-with-nick nick message)))"
:group 'erc-cite
:type 'function)
(defun erc-cite ()
"Place the cited message from the current line into the current
input line."
(interactive)
(cond
((erc-server-buffer-p) (message "erc-cite only works in channel buffers"))
((eq erc-fill-function 'erc-fill-variable) (erc-cite-erc-fill-variable))
((eq erc-fill-function 'erc-fill-static) (erc-cite-erc-fill-static))
(t (message "erc-cite is not implemented for your `erc-fill-function'"))))
(defun erc-cite-build-citation-with-nick (nick message)
(concat erc-cite-start "<" nick "> " message erc-cite-end))
(defun erc-cite-build-citation-without-nick (nick message)
(concat erc-cite-start message erc-cite-end))
(defun erc-cite-abort (orig-point)
(message "Nothing to cite")
(goto-char orig-point))
(defun erc-cite-erc-fill-variable ()
"Impementation of citing when `erc-fill-variable' is being used."
(let ((orig-point (point))
(cite-str "")
(nick nil))
;; look on this line or upwards for the start of an IRC message
(beginning-of-line)
;; rule out being on the erc-prompt line immediately.
(if (looking-at (regexp-quote erc-prompt))
(erc-cite-abort orig-point)
(while (and (not (looking-at "<.*> "))
(not (looking-at "^\\* ")) ;; /me
(not (looking-at (regexp-quote erc-notice-prefix)))
(not (eq (point) (point-min))))
(previous-line 1)
(beginning-of-line))
(if (or (looking-at "^\\* ") ;; /me
(looking-at (regexp-quote erc-notice-prefix))
(eq (point) (point-min)))
(erc-cite-abort orig-point)
(forward-char 1)
(setq nick
(buffer-substring-no-properties (point)
(progn
(while (not (looking-at "> "))
(forward-char 1))
(point))))
(forward-char 2)
(setq cite-str
(concat cite-str
(erc-trim-string
(buffer-substring-no-properties
(point) (progn (end-of-line) (point))))))
(next-line 1)
(beginning-of-line)
;; keep concatenating lines until you reach the end of the
;; message
(while (and (not (looking-at "<"))
(not (looking-at "^\\* ")) ;; /me
(not (looking-at (regexp-quote erc-prompt)))
(not (looking-at (regexp-quote erc-notice-prefix))))
(setq cite-str
(concat cite-str " "
(erc-trim-string
(buffer-substring-no-properties
(point) (progn (end-of-line) (point))))))
(next-line 1)
(beginning-of-line))
(erc-replace-current-command
(funcall erc-cite-build-citation-function nick cite-str))
;; Avoid the wretched style of "top posting". Make the new
;; content go at the end of what is being cited.
(end-of-line)))))
(defun erc-cite-erc-fill-static-left ()
(let ((beg nil)
(end nil))
(save-excursion
(beginning-of-line)
(setq beg (point))
(forward-char (1+ erc-fill-static-center))
(setq end (point))
(if (= (count-lines beg end) 1)
(buffer-substring-no-properties beg end)
nil))))
(defun erc-cite-erc-fill-static-right ()
(let ((beg nil)
(end nil))
(save-excursion
(beginning-of-line)
(forward-char (1+ erc-fill-static-center))
(setq beg (point))
(end-of-line)
(setq end (point))
(if (= (count-lines beg end) 1)
(buffer-substring-no-properties beg end)
nil))))
(defun erc-cite-erc-fill-static ()
"Impementation of citing when `erc-fill-static' is being used."
(let ((orig-point (point))
(cite-str "")
(done nil)
(not-citing nil)
(nick nil)
(left nil)
(left-notice-regexp
(concat "^ +" (regexp-quote erc-notice-prefix) "$"))
(left-me-regexp "^ +\\* $")
(left-nick-regexp "^ *<.*> $"))
;; look on this line or upwards for the start of an IRC message
(beginning-of-line)
(if (looking-at (regexp-quote erc-prompt))
(erc-cite-abort orig-point)
(setq left (erc-cite-erc-fill-static-left))
;; ignore empty lines
(if (not left)
(erc-cite-abort orig-point)
(while (not done)
(cond
;; ignore notices
((string-match left-notice-regexp left)
(setq done t
not-citing t))
;; ignore /me
((string-match left-me-regexp left)
(setq done t
not-citing t))
((string-match left-nick-regexp left)
(setq done t))
(t
(previous-line 1)
(setq left (erc-cite-erc-fill-static-left)))))
(if not-citing
(erc-cite-abort orig-point)
;; by now, point is on the first line of the cited message
(setq cite-str (concat cite-str (erc-cite-erc-fill-static-right)))
(setq nick (progn (beginning-of-line)
(while (not (looking-at "<"))
(forward-char 1))
(forward-char 1)
(buffer-substring-no-properties
(point)
(progn
(while (not (looking-at "> "))
(forward-char 1))
(point)))))
(forward-line 1)
(beginning-of-line)
;; from the first line, get all the lines of the message
(while (and (not (looking-at (regexp-quote erc-prompt)))
(setq left (erc-cite-erc-fill-static-left))
(not (string-match left-notice-regexp left))
(not (string-match left-me-regexp left))
(not (string-match left-nick-regexp left)))
(setq cite-str
(concat cite-str " " (erc-cite-erc-fill-static-right)))
(forward-line 1)
(beginning-of-line))
(erc-replace-current-command
(funcall erc-cite-build-citation-function nick cite-str))
;; Avoid the wretched style of "top posting". Make the new
;; content go at the end of what is being cited.
(end-of-line))))))
(define-key erc-mode-map "\C-c\C-a" 'erc-cite)
(provide 'erc-cite)
;;; erc-cite.el ends here
|
|
From: Mario L. <ml...@de...> - 2003-08-29 00:47:35
|
Hi. As some of you might know, Debian is planning to release Sarge as the new stable distribution around December this year. Since the Debian package of ERC was not updated since 19-01-2003 I think we should do that now so that the latest code can get into the stable release of Debian. So, if anyone here has any pending code to commit, please do so in the next few days. Also, if you could spend some time on trying to find and fix remaining bugs, that would be helpful too. I will be uploading a new CVS snapshot to the Debian archives next week. -- CYa, Mario | Debian Developer <URL:http://debian.org/> | Get my public key via finger ml...@db... | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44 |
|
From: Mario L. <ml...@de...> - 2003-08-27 13:02:28
|
Stephan Stahl <st...@is...> writes: > I wrote: > >> As the name of the defgroup is used in the whole file i would suggest >> changing >> that define-erc-module to: >> (define-erc-module timestamp stamp > > I should have checked earlier but this does not work (customizing erc-modules > complaines that it can not open the file erc-timestamp). So we should change > the second custom-group to stamp and all references to it if it is worth the > work. Done. -- CYa, Mario | Debian Developer <URL:http://debian.org/> | Get my public key via finger ml...@db... | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44 |
|
From: Stephan S. <st...@is...> - 2003-08-27 12:33:22
|
I wrote: > As the name of the defgroup is used in the whole file i would suggest > changing > that define-erc-module to: > (define-erc-module timestamp stamp I should have checked earlier but this does not work (customizing erc-modules complaines that it can not open the file erc-timestamp). So we should change the second custom-group to stamp and all references to it if it is worth the work. If you think it is worth then i will create patch? Stephan -- Stephan Stahl |
|
From: Stephan S. <st...@is...> - 2003-08-27 10:30:04
|
Hi. Currently erc-stamp.el creates two custom-groups. "erc-stamp" and "erc- timestamp". The first on comes from: (define-erc-module stamp timestamp and the second one from: (defgroup erc-timestamp nil As the name of the defgroup is used in the whole file i would suggest changing that define-erc-module to: (define-erc-module timestamp stamp which should have no user visible change and pose no problems (as far as i understud the macro). What do you think? Stephan -- Stephan Stahl |