From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: lg.zevlg@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#39491: 28.0.50; two bugs in battery-upower Date: Sat, 8 Feb 2020 12:10:46 +0400 Message-ID: <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> References: <83mu9tedsh.fsf@gnu.org> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2358"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39491@debbugs.gnu.org, rms@gnu.org, Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 08 09:11:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1j0LCr-0000W9-I3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 09:11:13 +0100 Original-Received: from localhost ([::1]:38750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0LCq-0005Lk-Gq for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 03:11:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49237) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0LCi-0005LR-AO for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 03:11:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0LCg-0005YD-G2 for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 03:11:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0LCg-0005Xi-Ca for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 03:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j0LCg-0001RO-28 for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 03:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: lg.zevlg@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Feb 2020 08:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39491 X-GNU-PR-Package: emacs Original-Received: via spool by 39491-submit@debbugs.gnu.org id=B39491.15811494565526 (code B ref 39491); Sat, 08 Feb 2020 08:11:02 +0000 Original-Received: (at 39491) by debbugs.gnu.org; 8 Feb 2020 08:10:56 +0000 Original-Received: from localhost ([127.0.0.1]:50580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0LCa-0001R4-3i for submit@debbugs.gnu.org; Sat, 08 Feb 2020 03:10:56 -0500 Original-Received: from mail-lf1-f45.google.com ([209.85.167.45]:44809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0LCY-0001Qr-B5 for 39491@debbugs.gnu.org; Sat, 08 Feb 2020 03:10:54 -0500 Original-Received: by mail-lf1-f45.google.com with SMTP id v201so877018lfa.11 for <39491@debbugs.gnu.org>; Sat, 08 Feb 2020 00:10:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=fW4zy5lDz6+VT99UyeCqmvA95hOKYSCt8GrHVaRkfp0=; b=K5FkHoaFHr6iXdoV1tT9Ya5Gl8jfM2oCKBbDIIHv8XC1dt68pwHK38e6Gw41/iLOhC XMMvTJOHXbD02BiLhe/azXgoh11tSPg0mU8T1bIpB9Mbi76b5ZCOPpoHhY26B543+tw0 X1Ozolm7yjv4CVGAvnV+5OUPDRItqmnw4e/gCJ5oJjibFJpoE1zvzfDRDaS66+ahQuxx IwFLipy5MSfp4BvVfdPgqY+JNPRkHU6F772CXNTJUjBBnVxpC24xi+znwGEq3R7ABA7n yOzec4HHrE4eCNmZQB01rGqwJpkA2gBHvhtYrOV6XfU0OrEjxQYHVafEVXN5HJAePV4y Neew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=fW4zy5lDz6+VT99UyeCqmvA95hOKYSCt8GrHVaRkfp0=; b=tJ/Q4De0OPf2b2fxsMKcEudIk7Kl8b6LT4aNjv59OI47MtFGzvBp3+Fcy12h2XiZdD tDRRAceTTttSgxMoYzioB+UogYbwM/j38VCB+sQxMx/hA5ufiy9DcOUKYwE/VPpAJg4l GUSIBhGQH/r3PzTM8gpxGTDM8czsqQjDvWEdMeGv5z0lkys9sdOZIrlwT7dOi6TCa7h+ 7m8M8wtJmcnzB486mSM7UduUHrROiElA3c1QL6Vf5vUlRHEGjRfsinVkK+U5u1N6QXkS 2ZDl/L+GxskF1sNOIraV4thNUWq5u/B73TAg+8/oREfyXgcJumi7m/EhWL5YwZrUL30E K7mA== X-Gm-Message-State: APjAAAXLOC7qiYFJDnrcSp4Z8C3WEtJ1l2frASuCdQEYwRh2oqis3jyq D/YT+5y+99/0JiflETPt08E= X-Google-Smtp-Source: APXvYqzq0QZ43vmQhSHL3421TfsaKvlvzDBPlP6QWMlqm/DP8UszUALMXiqIunq7BRPtvIcMPStcOQ== X-Received: by 2002:ac2:42ca:: with SMTP id n10mr1502421lfl.215.1581149448349; Sat, 08 Feb 2020 00:10:48 -0800 (PST) Original-Received: from [192.168.1.21] (5f44a299.dynamic.mv.ru. [95.68.162.153]) by smtp.gmail.com with ESMTPSA id o69sm2238919lff.14.2020.02.08.00.10.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 Feb 2020 00:10:47 -0800 (PST) In-Reply-To: <83mu9tedsh.fsf@gnu.org> X-Mailer: iPad Mail (17D50) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175775 Archived-At: > 8 =D1=84=D0=B5=D0=B2=D1=80. 2020 =D0=B3., =D0=B2 11:31, Eli Zaretskii =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 > =EF=BB=BF >>=20 >> From: Richard Stallman >> Date: Fri, 07 Feb 2020 15:14:57 -0500 >>=20 >>=20 >> battery-upower crashes on my laptop because there is no BatteryLevel prop= erty. >> This code >>=20 >> (cons ?b (cond ((=3D level 3) "-") >> ((=3D level 4) "!") >> (online-p "+") >> (t ""))) >>=20 >> needs to handle nil. I don't know what value it should return for that c= ase. >>=20 If level is unavailable and AC is off-line/unknown, then it should be empty s= tring I think. User could see the battery level is low/critical by percenta= ge >> However, that function has a design flaw: it reports on just the first >> battery in the list. battery-upower-device-list correctly returns a >> list with an element for each battery, but battery-upower finds only one >> of them (the first one in the list) and ignores the others. >>=20 >> The old code handle all the batteries and added the energy quantities >> so as to report accurately the total power available and overall >> fraction of charge. I wrote that code myself, around 10 years ago. >>=20 >> Please restore the lost functionality. >=20 > Evgeny, could you please look into fixing this? >=20 OK, we should generalize multi-battery code then, so each status func won=E2= =80=99t reimplement multi battery handling. I=E2=80=99ll look at it tomorrow > TIA