Magnus Henoch | 3 Jan 2005 00:35
Picon
Favicon

Re: [jabber.el] External notifiers

Mario Domenech Goulart <mario <at> inf.ufrgs.br> writes:

> I noticed that in jabber-alert.el there is some code to make "bridges"
> between emacs-jabber and external programs like screen and ratpoison to
> notify users about events.  I made something similar for the Sawfish
> window manager.
>
> Since it's possible that more external notifiers interfaces can be
> implemented, what do you think about creating a directory called, say,
> "external-notifiers" and move the code related to external programs from
> jabber-alert.el to files under that directory?

I think that's a really good idea.  The ability to have external
notifiers was one of the things that made me start using jabber.el.
They should be preserved, encouraged and evolved.

While looking at your patch, I noticed that writing alert hooks
currently is far too repetitive.  It requires writing four (used to be
three) separate functions with different argument lists (and you are
consistently only interested in the last argument), all containing
exactly the same (possibly quite complicated, and possibly needing to
be changed) code, and it requires adding each function to the options
of the corresponding hook variable, so people can find it in
Customize.

It shouldn't be like that; after all, this is Lisp, not C++.  So I
wrote a macro `define-jabber-alert', which is used like this:

(define-jabber-alert sawfish 
  "Display a message through the Sawfish window manager"
(Continue reading)

Mario Domenech Goulart | 3 Jan 2005 03:04
Picon
Picon
Favicon

Re: [jabber.el] External notifiers

Hello Magnus

On Mon, 03 Jan 2005 00:35:37 +0100 Magnus Henoch <mange <at> freemail.hu> wrote:

> Mario Domenech Goulart <mario <at> inf.ufrgs.br> writes:
>
>> I noticed that in jabber-alert.el there is some code to make "bridges"
>> between emacs-jabber and external programs like screen and ratpoison to
>> notify users about events.  I made something similar for the Sawfish
>> window manager.
>>
>> Since it's possible that more external notifiers interfaces can be
>> implemented, what do you think about creating a directory called, say,
>> "external-notifiers" and move the code related to external programs from
>> jabber-alert.el to files under that directory?
>
> I think that's a really good idea.  The ability to have external
> notifiers was one of the things that made me start using jabber.el.
> They should be preserved, encouraged and evolved.
>
> While looking at your patch, I noticed that writing alert hooks
> currently is far too repetitive.  It requires writing four (used to be
> three) separate functions with different argument lists (and you are
> consistently only interested in the last argument), all containing
> exactly the same (possibly quite complicated, and possibly needing to
> be changed) code, and it requires adding each function to the options
> of the corresponding hook variable, so people can find it in
> Customize.
>
> It shouldn't be like that; after all, this is Lisp, not C++.  So I
(Continue reading)

Magnus Henoch | 3 Jan 2005 04:07
Picon
Favicon

Re: [jabber.el] External notifiers

Mario Domenech Goulart <mario <at> inf.ufrgs.br> writes:

[...]

> I also thought that functions were getting too repetitive, but since
> there was code for ratpoison and screen in that style already, I was
> afraid there was a good reason for that.

When I wrote that, I thought that maybe a certain alert function would
use the extra information passed in the other parameters, so I made
everything as general as possible.  (In my first attempt, I had every
alert function call the message constructing function itself, but I
got tired with typing, so I generated the string once and for all, and
added the proposed-alert argument.)  For instance, you might want to
treat ordinary presence and subscription requests differently, or
treat the first incoming message in a conversation differently, or
maybe your output media supports color, and you want to color it
according to certain criteria.  But it turns out that this flexibility
usually isn't needed.

> I added one more, which displays message through the xmessage program.
> I think it's kind of interesting because the notification doesn't go
> away until user presses the "ok" button.

I committed this.  It seems that if you use it for message alerts,
you'd want to set jabber-message-alert-same-buffer to nil.

This might be one of the cases where you'd want more flexibility; for
example, only messages from "important" people deserve a persistent
notification, or only the first message in a conversation, or
(Continue reading)

Mathias Dahl | 3 Jan 2005 15:51
Picon

[jabber.el] Uses for "ee" in emacs-jabber?

Hi!

Right now I found a web page about a quite cool emacs package:

http://www.jurta.org/emacs/ee/

Here is from the Introduction:

"Ee is the categorizing information manager for Emacs. It works by
collecting information from different sources and converting
information to a relational or associative database. It uses the
fields of database table records to build the category trees, which
are displayed in the Emacs view buffer. The rules for creating the
views are also specified by similar data structures and include the
rules for building category paths, sorting records and categories,
calculating the totals of category fields, filtering records, and
printing category tree and record lines."

Maybe interesting for browsing chats, contacts etc. Any other ideas?

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Mathias Dahl | 3 Jan 2005 16:13
Picon

[jabber.el] Using ee for browsing chats from emacs-jabber

Privjet Juri!

I do not know if you are aware of the Jabber client for Emacs, called
emacs-jabber, but I have a question.

Do you think it would be easy to use ee to make it possible to
browse/categorize (or whatever ee can do) the chat log that is
created? The log for all chats with all contacts are saved in the same
file and the format looks like this:

["2004-12-21T17:31:16+01:00" "out" "me" "dummy <at> jabbernet.dk" "hello there!"]
["2004-12-21T17:32:03+01:00" "out" "me" "dummy <at> jabbernet.dk" "how are you?"]
["2004-12-21T17:32:13+01:00" "out" "me" "dummy <at> jabbernet.dk" "this is
row one\nthis is row two"]

It would be cool to be able to browse the log per contact and / or date.

Yes, I was too lazy to even look at the source code of the various
packages in ee, so I understand if you are too lazy to answer... :)

Best regards,
Mathias Dahl

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Mathias Dahl | 3 Jan 2005 17:32
Picon

[jabber.el] Jabber misplaced in Customize?

Should Jabber really be a "top node" in top-level Customize? It seems
to me that it fits better under Applications -> Chat, as for example
GNUS lies under Applications -> News.

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Juri Linkov | 4 Jan 2005 08:25
Favicon
Gravatar

Re: Using ee for browsing chats from emacs-jabber

Mathias Dahl <mathias.dahl <at> gmail.com> writes:
> Do you think it would be easy to use ee to make it possible to
> browse/categorize (or whatever ee can do) the chat log that is
> created? The log for all chats with all contacts are saved in the same
> file and the format looks like this:
>
> ["2004-12-21T17:31:16+01:00" "out" "me" "dummy <at> jabbernet.dk" "hello there!"]
> ["2004-12-21T17:32:03+01:00" "out" "me" "dummy <at> jabbernet.dk" "how are you?"]
> ["2004-12-21T17:32:13+01:00" "out" "me" "dummy <at> jabbernet.dk" "this is
> row one\nthis is row two"]
>
> It would be cool to be able to browse the log per contact and / or date.
>
> Yes, I was too lazy to even look at the source code of the various
> packages in ee, so I understand if you are too lazy to answer... :)

No, I am not lazy to answer, but rather I was too lazy to add
more extensions to ee last year ;-)

Since as I see the logs are saved as Lisp data, it would be quite
straightforward to read them by ee.  However, I suspect that there
are no initial `[' or `(' and final `]' or `)' to read all vectors
as one Lisp object.  In any case, this is not a problem.

I will install emacs-jabber in the next few days and see
what I can do with it.

--

-- 
Juri Linkov
http://www.jurta.org/emacs/
(Continue reading)

Mathias Dahl | 4 Jan 2005 11:56
Picon

Re: Using ee for browsing chats from emacs-jabber

> > ["2004-12-21T17:31:16+01:00" "out" "me" "dummy <at> jabbernet.dk" "hello there!"]
> > ["2004-12-21T17:32:03+01:00" "out" "me" "dummy <at> jabbernet.dk" "how are you?"]
> > ["2004-12-21T17:32:13+01:00" "out" "me" "dummy <at> jabbernet.dk" "this is
> > row one\nthis is row two"]

> Since as I see the logs are saved as Lisp data, it would be quite
> straightforward to read them by ee.  However, I suspect that there
> are no initial `[' or `(' and final `]' or `)' to read all vectors
> as one Lisp object.  In any case, this is not a problem.

I'm not really sure what you mean by this. Maybe you thought that the
"[" and "]" that surrounds each log line was added my be just for the
post. If so, that is not the case, those "[" and "]" are really there
in the chat log file.

> I will install emacs-jabber in the next few days and see
> what I can do with it.

Спосибо! Exiting times! :)

/Mathias

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Magnus Henoch | 4 Jan 2005 17:31
Picon
Favicon

Re: Jabber misplaced in Customize?

Mathias Dahl <mathias.dahl <at> gmail.com> writes:

> Should Jabber really be a "top node" in top-level Customize? It seems
> to me that it fits better under Applications -> Chat, as for example
> GNUS lies under Applications -> News.

Indeed.  It seems nothing else creates a Chat group (ERC uses
`Processes'), so I put it under Applications.

Magnus

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Magnus Henoch | 4 Jan 2005 22:23
Picon
Favicon

Re: jabber.el 0.6.1 released

Carl Henrik Lunde <chlunde+jabber+ <at> ping.uio.no> writes:

[...]

>   * *One* way to enable/disable modes/features, like
>
>        (setq jabber-history-enabled t
>              jabber-activity-enabled t)
>
>     It should be possible to enable all modes with M-x customize.
>
>     Perhaps we should make a macro similarly to/using define-minor-mode,
>     which installs hooks and defines such variables, and could install a
>     hook which enables the mode on connection?  What does ERC do?

ERC has `define-erc-module', which is a wrapper macro around
define-minor-mode.  You can see that by hitting C-h m when you have
ERC loaded - all loaded modules show up as minor modes, whatever
buffer you're in.  If you add a symbol to erc-modules with customize,
the corresponding module will be loaded.

It seems to me that minor modes are the way to go, so jabber-history
should be changed (with care taken to preserve the previous value of
jabber-history-enabled).  Maybe add and remove the hook from
jabber-message-hooks, to save some cycles for those who don't use
history.

Does anything else need to be changed?

[...]
(Continue reading)


Gmane