From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: Writing a Lisp to show the capacity of the battery of the laptop Date: Tue, 22 Feb 2011 18:41:01 +0100 Message-ID: References: <87r5b1phrr.fsf@gmail.com> <87d3mkc8rf.fsf@eps142.cdf.udc.es> <878vx8c6q3.fsf@eps142.cdf.udc.es> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1298397195 16445 80.91.229.12 (22 Feb 2011 17:53:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Feb 2011 17:53:15 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Alberto Luaces Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 22 18:53:11 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PrwPo-000595-Qj for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 18:53:08 +0100 Original-Received: from localhost ([127.0.0.1]:39613 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrwFR-0006F7-N8 for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 12:42:05 -0500 Original-Received: from [140.186.70.92] (port=51158 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrwF5-0006BC-7t for help-gnu-emacs@gnu.org; Tue, 22 Feb 2011 12:41:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrwEk-0006Th-9E for help-gnu-emacs@gnu.org; Tue, 22 Feb 2011 12:41:25 -0500 Original-Received: from mail-gw0-f51.google.com ([74.125.83.51]:57295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrwEk-0006TW-2I for help-gnu-emacs@gnu.org; Tue, 22 Feb 2011 12:41:22 -0500 Original-Received: by gwb15 with SMTP id 15so524931gwb.38 for ; Tue, 22 Feb 2011 09:41:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=1sI8ZtRCilrMNmn0C1wZPlD93w96wAS5OVS6lPKM1gQ=; b=ZQODyMuw3ZDyr9/p/dk/3hhQtwvlauRmO7DK7EvVaEukrC+jJSmXHQ3mf+fN8rWqd5 wuSPDRsIHwQFLB/CgKOx8VTJuU/Doy4RbMQ80mCFGIYWBbMC43BVbd6TfJohwFDtza8I NVkbUizQWjNtWTK3pBNYcKD+82MHCkoSpWhkg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=p6FbKSvuiwlfe2vp6+OKLc6mUj8SAMk0pP/Oj1lPj+1C5ycjnz2WASPbIPWEXlOIS9 fqeveZRT4rNBwUy2qGKouZDqM8gf4vbzVw5agWOiZpyxixbTFPvbs8/YhqUrVBt9fTd6 qHXTM9e5n9nnUaxS6WAijNzKtXK8hfJey6IlE= Original-Received: by 10.42.240.10 with SMTP id ky10mr1877667icb.383.1298396481192; Tue, 22 Feb 2011 09:41:21 -0800 (PST) Original-Received: by 10.231.15.129 with HTTP; Tue, 22 Feb 2011 09:41:01 -0800 (PST) In-Reply-To: <878vx8c6q3.fsf@eps142.cdf.udc.es> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.51 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:79343 Archived-At: 2011/2/22 Alberto Luaces : > Deniz Dogan writes: > >> 2011/2/22 Alberto Luaces: >>> Deniz Dogan writes: >>> >>>> Your code is unorganized and buffer-centric for no reason. >>> >>> I'm also an elisp newbie and were doing the same buffer fiddling, since >>> I didn't know that `shell-command' returned a string with the output >>> until I saw your example. >>> >>> Is there any existing convention about this? I can't find that >>> information in an explicit form in that function documentation. >>> >> >> Heh, my bad, it doesn't return a string. Ignore me. > > What a pity! :( > shell-command-to-string does though! I knew it existed somewhere...! -- Deniz Dogan