From: Kirill A. K. <ca...@us...> - 2008-02-17 18:09:35
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8345 Modified Files: NEWS jabber-activity.el jabber-alert.el jabber.texi Added Files: jabber-osd.el Log Message: Changes from http://git.altlinux.org/people/evg/packages/emacs-jabber.git by Evgenii Terechkov Index: jabber-activity.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-activity.el,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- jabber-activity.el 26 Nov 2007 01:05:58 -0000 1.31 +++ jabber-activity.el 17 Feb 2008 18:09:26 -0000 1.32 @@ -315,6 +315,8 @@ (switch-to-buffer jabber-activity-last-buffer)) (message "No new activity")))) +(defvar jabber-activity-idle-timer nil "Idle timer used for activity cleaning") + ;;;###autoload (define-minor-mode jabber-activity-mode "Toggle display of activity in hidden jabber buffers in the mode line. @@ -337,6 +339,7 @@ 'jabber-activity-add-muc) (add-hook 'jabber-presence-hooks 'jabber-activity-presence) + (setq jabber-activity-idle-timer (run-with-idle-timer 2 t 'jabber-activity-clean)) ;; XXX: reactivate ;; (add-hook 'jabber-post-connect-hooks ;; 'jabber-activity-make-name-alist) @@ -372,6 +375,7 @@ 'jabber-activity-add-muc) (remove-hook 'jabber-presence-hooks 'jabber-activity-presence) + (ignore-errors (cancel-timer jabber-activity-idle-timer)) ;; XXX: reactivate ;; (remove-hook 'jabber-post-connect-hooks ;; 'jabber-activity-make-name-alist) Index: NEWS =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/NEWS,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- NEWS 4 Feb 2008 16:54:16 -0000 1.64 +++ NEWS 17 Feb 2008 18:09:26 -0000 1.65 @@ -2,6 +2,14 @@ * New features in jabber.el 0.8 +** OSD alerts (message, MUC, MUC-personal) + +** Family of personal MUC alerts added +See section "Standard alerts" in manual. + +** MUC nicks completion +See sectin "Groupchat" in manual. + ** Support for multiple accounts See section "Account settings" in manual. Index: jabber.texi =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber.texi,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- jabber.texi 11 Feb 2008 09:47:21 -0000 1.81 +++ jabber.texi 17 Feb 2008 18:09:26 -0000 1.82 @@ -322,6 +322,14 @@ roster buffer. You can also type the commands directly, as will be shown here. +Also, to save from repeating unnesesary typing you can press @kbd{Tab} +key to complete nick of groupchat member, you a talking with. You can +customize your form of personal talking in MUC +(@code{jabber-muc-completion-delimiter}) and form of personal talking +to you (@code{jabber-muc-looks-personaling-symbols}) - see +``jabber-chat'' customization group. Defaults are sane, so unlikely +you could change this, but... it is Emacs! + @findex jabber-groupchat-join @cindex Joining a groupchat @cindex Changing nickname @@ -1533,6 +1541,12 @@ scroll down, and sometimes not. These functions should do what you mean; if they don't, it's a bug. +Also, in MUC you can use family of so-called ``personal'' alerts. +Their like other MUC alerts, but fires only if incoming message +addresed directly to you. One example of such alert is +@code{jabber-muc-echo-personal}, which show MUC message only if it +addresed to you. + Some of these functions are in the @file{jabber-alert.el} file, and the others are in their own files. You can use them as templates or inspiration for your own alerts. --- NEW FILE: jabber-osd.el --- ;;; jabber-osd.el --- OSD support for jabber.el ;; Copyright (C) 2008 - Terechkov Evgenii - ev...@al... ;; This file is a part of jabber.el. ;; This program 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 program 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. (condition-case e (progn ;; Most people don't have osd.el, so this will often fail (require 'osd) (define-jabber-alert osd "Display a message in osd" 'osd-show-string) (define-personal-jabber-alert jabber-muc-osd) ) (error nil)) (provide 'jabber-osd) Index: jabber-alert.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-alert.el,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- jabber-alert.el 7 May 2007 02:05:12 -0000 1.32 +++ jabber-alert.el 17 Feb 2008 18:09:26 -0000 1.33 @@ -21,6 +21,7 @@ (require 'jabber-util) +(require 'jabber-muc-nick-completion) ;jabber-muc-looks-like-personal-p needs for define-personal-jabber-alert (require 'cl) (defgroup jabber-alerts nil "auditory and visual alerts for jabber events" @@ -282,6 +283,7 @@ (require 'jabber-festival) (require 'jabber-xmessage) (require 'jabber-wmii) +(require 'jabber-osd) ;; Message alert hooks (defun jabber-message-default-message (from buffer text) @@ -460,6 +462,24 @@ (when proposed-alert (switch-to-buffer buffer))) +;;; Personal alert hooks +(defmacro define-personal-jabber-alert (name) + "From ALERT function, make ALERT-personal function. Makes sence only for MUC." + (let ((sn (symbol-name name))) + (let ((func (intern (format "%s-personal" sn)))) + `(progn + (defun ,func (nick group buffer text proposed-alert) + (if (jabber-muc-looks-like-personal-p text group) + (,name nick group buffer text proposed-alert))) + (pushnew (quote ,func) (get 'jabber-alert-muc-hooks 'custom-options))))) + ) + +(define-personal-jabber-alert jabber-muc-beep) +(define-personal-jabber-alert jabber-muc-wave) +(define-personal-jabber-alert jabber-muc-echo) +(define-personal-jabber-alert jabber-muc-switch) +(define-personal-jabber-alert jabber-muc-display) + (provide 'jabber-alert) ;;; arch-tag: 725bd73e-c613-4fdc-a11d-3392a7598d4f |