From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: use linux native notifications with tea-time Date: Thu, 09 Jun 2011 23:33:06 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1307684200 29074 80.91.229.12 (10 Jun 2011 05:36:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Jun 2011 05:36:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 10 07:36:36 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 1QUuOW-0004GV-Oo for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jun 2011 07:36:32 +0200 Original-Received: from localhost ([::1]:39406 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUuOT-0004qM-T9 for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jun 2011 01:36:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUuL7-0004WU-DG for help-gnu-emacs@gnu.org; Fri, 10 Jun 2011 01:33:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUuL5-0006Tw-Mu for help-gnu-emacs@gnu.org; Fri, 10 Jun 2011 01:33:00 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:58117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUuL5-0006To-AX for help-gnu-emacs@gnu.org; Fri, 10 Jun 2011 01:32:59 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QUuL2-0003Cp-N9 for help-gnu-emacs@gnu.org; Fri, 10 Jun 2011 07:32:56 +0200 Original-Received: from c-71-237-25-24.hsd1.co.comcast.net ([71.237.25.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jun 2011 07:32:56 +0200 Original-Received: from kevin.d.rodgers by c-71-237-25-24.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jun 2011 07:32:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-25-24.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:81324 Archived-At: On 6/8/11 9:37 AM, Benjamin Slade wrote: > (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) > ) Since you don't need any shell features like indirection, calling the program directly (instead of via the shell) is simpler: no quoting, and more efficient. Whether call-process or start-process should be used in this case depends on whether the program returns immediately or not, since the output from the process isn't being used within Emacs. -- Kevin Rodgers Denver, Colorado, USA