From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: battery.el broken? Date: Sat, 05 Jun 2021 23:21:12 +0100 Message-ID: <87lf7oj6lj.fsf@tcd.ie> References: <20210605135544.0203EC207FB@raman-glaptop.localdomain> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13614"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: "T.V Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 06 00:21:56 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpefz-0003D6-Dg for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 00:21:55 +0200 Original-Received: from localhost ([::1]:45478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpefy-0005fz-D9 for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 18:21:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpefS-000500-OB for emacs-devel@gnu.org; Sat, 05 Jun 2021 18:21:22 -0400 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:36554) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpefP-0002XU-N4 for emacs-devel@gnu.org; Sat, 05 Jun 2021 18:21:22 -0400 Original-Received: by mail-wm1-x32b.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so10076642wmk.1 for ; Sat, 05 Jun 2021 15:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=bCzKhVreF53yL6zKoigsmRYwXAOyGTED3c0IbgW9X8c=; b=TQoudfGExmNgzi5NFU2pkS42Hg0PmuOHCM7ul8NHwnJ4D6Ug3drUYHqg6BlDmn8Gj4 j7h4lG6wWGMYurf7v1bhqF6cFsWp9LNqCbG5iYBQu0S4Uo9VDIYnLBRxnlvHOKly29Nx JKDF9ZMO/sOOPoU2wEN0CcTYxXQloNodW/jc3w1tIlq0L4ZRHeapBc60IoBnNoW+BpSj GxITSmowEDQwaj3bLCj0aa1nJAqGtosb8fnzM4I6ff+WzEXZuCX/HJKSIXafSpu9UPNF WrPMqvNcpKc1FyabpfVhHgw0x2fe+DYLecmIw4LziG78ddumvhtwOgqkvd6G5aBjBUlI flLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=bCzKhVreF53yL6zKoigsmRYwXAOyGTED3c0IbgW9X8c=; b=WtI3/3NjBST74hUM3vYd+C+3WxCy55yqYSbtLvvDuiMMU4R8y3hx8ndhasCFsnsV1z x7adsr5rtcd7rN4MWb60LZqtTLcmDat0qm6uI2SF+9VYzSimQqpYIGg+9WadtjqcSEJj bSy8PcfEVNLs0wfaLTD1vuneibROu7tOumR5G09Nsr/JTh/TdlsfLssj6Wna+JNjprKm /WB3TitNysZNI2Q0FLIeE9mrBeucHabCtg5yI0AerY6ajwjA8BF3BptvoBsJ3Xre6ste cS/ps6RpetrNUNm/aS8u5x/atrLWxFdb0ExBM8TLUzfDWWVKqQpu0crz41CcK5KxsHQC FqoA== X-Gm-Message-State: AOAM530J4svVcoPr8CHAeRtNc1gBB/g7BiOhfX46fV2ba47tDhkjXXMq RNLPaRazYSUMWZbO7A4i7wGTOg== X-Google-Smtp-Source: ABdhPJyhIWDkhdttZaKP/6mtEOZg8VnjjX3YMQpxDDEfokCoIFR8eU9Tl47rkoi6WqiNYS49vb4Tnw== X-Received: by 2002:a1c:ed14:: with SMTP id l20mr9690834wmh.20.1622931675764; Sat, 05 Jun 2021 15:21:15 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id f18sm9398695wmj.13.2021.06.05.15.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Jun 2021 15:21:15 -0700 (PDT) In-Reply-To: <20210605135544.0203EC207FB@raman-glaptop.localdomain> (T.V Raman's message of "Sat, 5 Jun 2021 06:55:43 -0700 (PDT)") Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=contovob@tcd.ie; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270448 Archived-At: "T.V Raman" writes: > Used to display battery percentage and time left; now says > > Power on-line, battery discharging (93% load, remaining time 0:00) The default output format of 'M-x battery' has barely changed across several Emacs versions (though different battery-status-function backends call things by different names, e.g. AC vs on-line). So I'm guessing the "broken" part is the contradiction between on-line and discharging, and the zero remaining time to full/empty. If so, please say which Emacs version you're running and what your value of battery-status-function is. If you're on Emacs 28 with battery-upower, you can see all the information returned by the system UPower daemon by evaluating: (mapcar #'battery--upower-device-properties (battery--upower-devices)) The returned alists will include relevant keys such as Online, State, TimeToEmpty, and TimeToFull, all of which are documented at https://upower.freedesktop.org/docs/Device.html. If the returned alists are internally inconsistent, then it's not Emacs' fault. If they look fine but the result of the battery-upower function disagrees with them, then there's an Emacs bug in the translation, indeed. Feel free to post the relevant data here for help with deciphering it. (Excluding the Vendor, Model, and Serial properties I guess, in case they're considered sensitive? I have no idea.) HTH, -- Basil