From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Benjamin Slade Newsgroups: gmane.emacs.help Subject: Re: use linux native notifications with tea-time Date: Wed, 8 Jun 2011 10:37:00 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1307652792 11148 80.91.229.12 (9 Jun 2011 20:53:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2011 20:53:12 +0000 (UTC) To: Dove Young , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 09 22:53:05 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QUmDu-0003C2-D7 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jun 2011 22:53:02 +0200 Original-Received: from localhost ([::1]:36313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUmDs-0006J0-VN for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jun 2011 16:53:01 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUKow-0002eL-V0 for help-gnu-emacs@gnu.org; Wed, 08 Jun 2011 11:37:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUKot-000404-QA for help-gnu-emacs@gnu.org; Wed, 08 Jun 2011 11:37:26 -0400 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:62057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUKot-0003zl-B2 for help-gnu-emacs@gnu.org; Wed, 08 Jun 2011 11:37:23 -0400 Original-Received: by vxk20 with SMTP id 20so602857vxk.0 for ; Wed, 08 Jun 2011 08:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=fLic5Fsn+0z0IQe5XEcZlEaJCeqRan18NmesbXRL8Io=; b=L1oj3eZUGRn6yIFFqoGvyHgCepgk6011Yalh+a6/UfsabpLm+PPpgRk9Xiauz/hdcg 2KBn0k/Ia8lAgbfbY1ZMNji6LackA1j4+8Tt2VOn8vHNcsrcHuUXFGbtJJrKYbcL9xA8 hVimhrdhuKlzn+vrl9AI8R35LuM9SA848ayI8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=NLNvysGMRzz26GjFrzF+P6thvSfCX4ddTiaHjcBsNIP1j2IqE2Iju14B6dOTMs68n2 WMC/yxpxyOm63T4I4TSIAHYFxooKwyDfeIoDF9OfUPWfODnKzIwo8jSfXyIBvYtwcuWM ybU5ejS+sfhfLd1P9SOoIYPq4LsyZ9TDBI1aI= Original-Received: by 10.220.215.138 with SMTP id he10mr1622998vcb.216.1307547440065; Wed, 08 Jun 2011 08:37:20 -0700 (PDT) Original-Received: by 10.220.193.72 with HTTP; Wed, 8 Jun 2011 08:37:00 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: n99wBuysYy7BB_Ss-PRupf6h5DU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 X-Mailman-Approved-At: Thu, 09 Jun 2011 16:47:28 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81317 Archived-At: Thanks Dove & Tassilo, I actually got it to work by redefining the "show-notification" function as follows: (defun show-notification (notification) "Show notification. Use notify-send." (start-process "tea-time-notify-notification" nil "notify-send" "-i" (expand-file-name "~/path/to/your/icon/YourIconName.png") "Emacs Tea Timer" notification) ) Tassilo - no, I'm still using 23.2.1, but I'll keep your suggestions in mind for the future. cheers, --Ben On 8 June 2011 09:42, Dove Young wrote: > In your function, the actual command send to shell is 'notify-send Time i= s > up! 1 minutes' > > dove@bash-4.2$ notify-send Time is up! 1 minutes > Invalid number of options. > > You should modify your function in this way, quote notification string > before send it to your shell > > (defun show-notification (notification) > =C2=A0(shell-command (format "notify-send '%s'" notification) ) > ) > > > 2011/6/7 Benjamin Slade >> >> Hi, >> >> I'm trying to set up tea-time.el to use native linux notification >> (through notify-send). >> >> The current "notification function" in tea-time.el is: >> >> ------------ >> (defun show-notification (notification) >> =C2=A0"Show notification. Use mumbles." >> =C2=A0(if (program-exists "mumbles-send") >> =C2=A0 =C2=A0(start-process "tea-time-mumble-notification" nil "mumbles-= send" >> notification) >> =C2=A0(message notification) >> =C2=A0)) >> --------------- >> >> >> >> What would be the most straightforward way of using _notify-send_ in >> this function? >> >> (I tried: >> >> --- >> (defun show-notification (notification) >> =C2=A0(shell-command (concat "notify-send " notification) >> )) >> --- >> >> but I get an "Invalid number of options" error.) >> >> thanks, >> =C2=A0--Ben >> >> ------------------------------------------------------------------------= ----------------------------- >> Benjamin Slade >> Dept. of Linguistics >> University of Illinois at Urbana-Champaign >> [ http://www.jnanam.net/slade/ ] >> >> St=C3=A6fcr=C3=A6ft & Vy=C4=81kara=E1=B9=87a (lingblog) - http://staefcr= aeft.blogspot.com >> The Babbage Files (techblog) - http://babbagefiles.blogspot.com >> >> >> ------------------------------------------------------------------------= ----------------------------- >> =C2=A0 =E0=A4=AA=E0=A4=B0=E0=A5=8B =E0=A4=BD=E0=A4=95=E0=A5=8D=E0=A4=B7= =E0=A5=91=E0=A4=95=E0=A4=BE=E0=A4=AE=E0=A4=BE =E0=A4=B9=E0=A4=BF =E0=A4=A6= =E0=A5=87=E0=A4=B5=E0=A4=BE=E0=A4=83 >> =C2=A0 =C2=A0 'The gods love the obscure.' (=C5=9Aatapathabr=C4=81ma=E1= =B9=87a 6.1.1.2) >> > > > > -- > M-x Thinks > > --=20 ---------------------------------------------------------------------------= -------------------------- Benjamin Slade Dept. of Linguistics University of Illinois at Urbana-Champaign [ http://www.jnanam.net/slade/ ] St=C3=A6fcr=C3=A6ft & Vy=C4=81kara=E1=B9=87a (lingblog) - http://staefcraef= t.blogspot.com The Babbage Files (techblog) - http://babbagefiles.blogspot.com ---------------------------------------------------------------------------= -------------------------- =C2=A0 =E0=A4=AA=E0=A4=B0=E0=A5=8B =E0=A4=BD=E0=A4=95=E0=A5=8D=E0=A4=B7=E0= =A5=91=E0=A4=95=E0=A4=BE=E0=A4=AE=E0=A4=BE =E0=A4=B9=E0=A4=BF =E0=A4=A6=E0= =A5=87=E0=A4=B5=E0=A4=BE=E0=A4=83 =C2=A0 =C2=A0 'The gods love the obscure.' (=C5=9Aatapathabr=C4=81ma=E1=B9= =87a 6.1.1.2)