From unknown Thu Sep 11 12:42:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#39491 <39491@debbugs.gnu.org> To: bug#39491 <39491@debbugs.gnu.org> Subject: Status: 28.0.50; two bugs in battery-upower Reply-To: bug#39491 <39491@debbugs.gnu.org> Date: Thu, 11 Sep 2025 19:42:04 +0000 retitle 39491 28.0.50; two bugs in battery-upower reassign 39491 emacs submitter 39491 rms@gnu.org severity 39491 normal tag 39491 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 15:15:03 2020 Received: (at submit) by debbugs.gnu.org; 7 Feb 2020 20:15:03 +0000 Received: from localhost ([127.0.0.1]:50286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0A1n-0005WE-C6 for submit@debbugs.gnu.org; Fri, 07 Feb 2020 15:15:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:49802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0A1l-0005VQ-29 for submit@debbugs.gnu.org; Fri, 07 Feb 2020 15:15:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53971) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0A1j-0004dj-BF for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 15:15:00 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j0A1j-0004m8-71 for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 15:14:59 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1j0A1h-0000y8-MG; Fri, 07 Feb 2020 15:14:57 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: bug-gnu-emacs@gnu.org Subject: 28.0.50; two bugs in battery-upower Message-Id: Date: Fri, 07 Feb 2020 15:14:57 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) battery-upower crashes on my laptop because there is no BatteryLevel property. This code (cons ?b (cond ((= level 3) "-") ((= level 4) "!") (online-p "+") (t ""))) needs to handle nil. I don't know what value it should return for that case. 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. 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. Please restore the lost functionality. In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.30, cairo version 1.14.6) of 2020-02-06 built on softly Repository revision: c4be80112556e06bd7e92138e44051cc8c62e709 Repository branch: master System Description: Trisquel GNU/Linux Flidas (8.0) Recent messages: (("NativePath" . "BAT0") ("Vendor" . "SANYO") ("Model" . "42T4832") ("Serial" . "19849") ("UpdateTime" . 1581079789) ("Type" . 2) ("PowerSupply" . t) ("HasHistory" . t) ("HasStatistics" . t) ("Online") ("Energy" . 35.21) ("EnergyEmpty" . 0.0) ("EnergyFull" . 35.21) ("EnergyFullDesign" . 43.29) ("EnergyRate" . 2.237) ("Voltage" . 12.504) ("Luminosity" . 0.0) ("TimeToEmpty" . 0) ("TimeToFull" . 0) ("Percentage" . 100.0) ("Temperature" . 0.0) ("IsPresent" . t) ("State" . 4) ("IsRechargeable" . t) ("Capacity" . 81.33518133518135) ("Technology" . 1) ("WarningLevel" . 1) ("IconName" . "battery-full-charged-symbolic")) Back to top level battery-upower Saving file /home/rms/emacs-git/build-feb-6/lisp/battery.el... Wrote /home/rms/emacs-git/build-feb-6/lisp/battery.el Quit Power on-line, battery fully-charged (100% load, remaining time 0:00) Mark set [2 times] (("line_power_AC" . :line-power) ("battery_BAT0" . :battery) ("battery_BAT1" . :battery)) completing-read-default: Command attempted to use minibuffer while in minibuffer Quit Configured using: 'configure 'CFLAGS=-g -O0' --with-gnutls=no' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM MODULES THREADS PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: bug-reference-prog-mode: t gpm-mouse-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow mailalias emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch multi-isearch vc-git diff-mode easy-mmode bug-reference help-fns radix-tree cl-print debug backtrace help-mode find-func battery dbus xml t-mouse term/linux view derived paren cus-start cus-load advice finder-inf package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 84673 5995) (symbols 48 9669 1) (strings 32 27252 1051) (string-bytes 1 856458) (vectors 16 15529) (vector-slots 8 554003 72566) (floats 8 45 242) (intervals 56 545 268) (buffers 1000 12) (heap 1024 9701 932)) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 08 02:31:29 2020 Received: (at 39491) by debbugs.gnu.org; 8 Feb 2020 07:31:30 +0000 Received: from localhost ([127.0.0.1]:50571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0KaP-0000YA-O7 for submit@debbugs.gnu.org; Sat, 08 Feb 2020 02:31:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0KaN-0000Xx-GQ for 39491@debbugs.gnu.org; Sat, 08 Feb 2020 02:31:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j0KaI-0004oX-2K; Sat, 08 Feb 2020 02:31:22 -0500 Received: from [176.228.60.248] (port=3500 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j0KaA-0006Cm-2e; Sat, 08 Feb 2020 02:31:14 -0500 Date: Sat, 08 Feb 2020 09:30:54 +0200 Message-Id: <83mu9tedsh.fsf@gnu.org> From: Eli Zaretskii To: Evgeny Zajcev In-reply-to: (message from Richard Stallman on Fri, 07 Feb 2020 15:14:57 -0500) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, rms@gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Richard Stallman > Date: Fri, 07 Feb 2020 15:14:57 -0500 > > > battery-upower crashes on my laptop because there is no BatteryLevel property. > This code > > (cons ?b (cond ((= level 3) "-") > ((= level 4) "!") > (online-p "+") > (t ""))) > > needs to handle nil. I don't know what value it should return for that case. > > 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. > > 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. > > Please restore the lost functionality. Evgeny, could you please look into fixing this? TIA From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 08 03:10:56 2020 Received: (at 39491) by debbugs.gnu.org; 8 Feb 2020 08:10:56 +0000 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 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 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) 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) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: lg.zevlg@gmail.com Mime-Version: 1.0 (1.0) Subject: Re: 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> In-Reply-To: <83mu9tedsh.fsf@gnu.org> To: Eli Zaretskii X-Mailer: iPad Mail (17D50) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, rms@gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 15:58:23 2020 Received: (at control) by debbugs.gnu.org; 26 Feb 2020 20:58:23 +0000 Received: from localhost ([127.0.0.1]:57814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j73l9-0006cb-OA for submit@debbugs.gnu.org; Wed, 26 Feb 2020 15:58:23 -0500 Received: from mail-qv1-f49.google.com ([209.85.219.49]:35912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j73l8-0006cQ-Sy for control@debbugs.gnu.org; Wed, 26 Feb 2020 15:58:23 -0500 Received: by mail-qv1-f49.google.com with SMTP id ff2so492077qvb.3 for ; Wed, 26 Feb 2020 12:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=tyq3xcJ4AdXMm+coj7Hlv4qduF+62GPeUKyFgJbFGno=; b=Hfn9cASPRTsFvet0jfmUAOJuwP6Sw2LWpopXjWxurRe7PZkGlhS+NV4wfhNhG3a11A /ipozoSxa2wLXmbSl8mMCFaJLxL21SKaAIaVvJstb1YxOxFg8Cu/MPKgDaGgiOMqtVcy Z8xLvYdiKTImU0U2eRNRIq1q0f7bQbGxmtnYSSPjegY7RdHj2V0I8MQ0SFqqawiy9t32 gpi/Q0gJbiGwP7Ig7OUX7TGRfSxedauhGFDdME1WUP5QoiYrY3r5ETh4mpVK4Khc6oKp s4B1RazqhF+cawZSXrPfu2WmGZJL0Q2prPYNQ9ecfxfsJpbr4hcqXL2/gB1PXDERbsaS uHxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=tyq3xcJ4AdXMm+coj7Hlv4qduF+62GPeUKyFgJbFGno=; b=LYf52y5npnovFeaU+I8PvI2ei5wO8QKyVkLmyYe7vzlEVo/WL8QsbByuXeyMFTw/lv HQ8Ub9qhr+9IDY1koucs3ocKI0zM/kF3H3CQ/eYOoCsyWE36O+1nWzKD05oFyAPlp/Q5 n2nRLjDGyQBi75kBPUd+VW7UPjegwwHeOp2GiMLjRAjVNtmcOVQRCH8+2OeuXf6eH4/4 t/UR8BfuUSBC8BXpRfFg4Ach1tLZuUy2oeUyzZ+limMHlW04kUs/fQTtRcPOltcyzk/j l06/arej7Z5HO8zXZk7PimoiBGB50UZT68ku40qak9F3VFQFMK9vs/VU7m5nPQfGEMUh cmFw== X-Gm-Message-State: APjAAAV8LtZtMZyiV1HLXufunIslDK5J3heZDqhpLRgjv4EkHCX3tlwr C3eVFhaV/lUEkp9BkFRliOySsJ3oNFE= X-Google-Smtp-Source: APXvYqw+bBZ26RtmMT2KGlXU+nLJuNYZ93Ht2mdE0wpn0WZg5q3OZbP2GspfDp2Z8EdMEUy9BzY5zg== X-Received: by 2002:ad4:496f:: with SMTP id p15mr984144qvy.191.1582750696996; Wed, 26 Feb 2020 12:58:16 -0800 (PST) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id f128sm1827503qke.54.2020.02.26.12.58.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Feb 2020 12:58:16 -0800 (PST) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #39202 Date: Wed, 26 Feb 2020 15:58:15 -0500 Message-ID: <85blpl9ic8.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) # regression in battery.el block 39202 by 39491 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 06:45:45 2020 Received: (at 39491) by debbugs.gnu.org; 21 Mar 2020 10:45:45 +0000 Received: from localhost ([127.0.0.1]:45978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFbdR-0000CR-G7 for submit@debbugs.gnu.org; Sat, 21 Mar 2020 06:45:45 -0400 Received: from mailrelay110.isp.belgacom.be ([195.238.20.137]:16092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFbdP-0000CD-5v for 39491@debbugs.gnu.org; Sat, 21 Mar 2020 06:45:43 -0400 IronPort-SDR: m+kou7rAVUavr7d7XAFlYDuDgK4AsLxhanh+QTVZSpFyHe1nf+yXsyFzi5CGDFqoBrAjgpdAtb 2ASNf4mCLKtPoXoMzWgfH1wLM1OF17u+Eujf0xAekgiVUEVgK2bUansg1isW9929TW7O1BqWCM 3fDtWLsVblMarNWX8e6ovVm2efSrb4Tvn94fxqcB+J5Sk0PkuvbablEPbFiJiqqtmuXQ5T3niK jlhnkYfwQFMacnIBgOPWQQpiNaUPZMt0xP4k2JyO51EDtbJcV6/H88nfus2HjDe/FbLE49g/W0 NF8= X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AaNnBdxcBmTEw3AojoY3BElx2lGMj4u6mDksu8p?= =?us-ascii?q?Mizoh2WeGdxc26bRyN2/xhgRfzUJnB7Loc0qyK6vymADBbqs/R+Fk5M7VyFD?= =?us-ascii?q?Y9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQk?= =?us-ascii?q?a3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjeu8UMnIdvJag8xh?= =?us-ascii?q?TUrnZLZu9b2X5mKVWPkhnz4cu94IRt+DlKtfI78M5AX6T6f6AmQrFdET8rLW?= =?us-ascii?q?M76tD1uBfaVQeA6WcSXWsQkhpTHgjK9wr6UYvrsiv7reVyxi+XNtDrQL8uWD?= =?us-ascii?q?Si66BrSAL0iCoCKjU0/n3bhtB2galGux+quQBxzJDIb4GULPp+f73SfdUGRW?= =?us-ascii?q?paQ81dUzVNDp6gY4cTCuYMO/tToYvgqFsUtRawBReiCv7txT9GiHD406403O?= =?us-ascii?q?s9Hg/JxwEgA8sOvW7IoNnpLqofU+a4x7TIwzXZaPNW3C/w5pDJch89pvGMWa?= =?us-ascii?q?h/cdHMwkczFgPKklWQppb/PzyIy+8AtGia7+19VeKphG4npRtxoj+gxso3j4?= =?us-ascii?q?nGmIcVxUva+iVj24Y5P9O4SFV1YdK+F5tQrS6aOpJwT8g/TW9ovyM6xacHuZ?= =?us-ascii?q?69ZCUKx5InxwPFZ/yAaYiI7RTuX/uSLzdgnH9oe6+ziwys/UWv1+HwTNS43V?= =?us-ascii?q?VLoyZfndTAqHYA3AHJ5MedUPty5EKh1C6K1wDU9+5LP1g5lbHeK5492r4wkY?= =?us-ascii?q?cTsVjbEi/2hkr2iKiWe105+uiz9evneKzqqIGcN491jAH+Mb4gldaiDughLA?= =?us-ascii?q?YDUHSX9fik2L3i+032XqlKg+U1n6XEqpzWO8sWqrOjDwNI0Ysu6gyzAji43N?= =?us-ascii?q?gAmHkINlNFeBaJj4jzPFHOJej1DPe4g1SxljdryP7GPqfmApXCNXXDlanufb?= =?us-ascii?q?Nm5EFC0goz1spT55xPCrEPOv7zXVXxtNPAAh8jLwO02/rnCMl61o4GWWOPBb?= =?us-ascii?q?KZMKXdsV+G/OIvJOaMaZQQuDnjLvgq/ODhjWUimVMHc6mpxpUXZGq/HvR8LE?= =?us-ascii?q?WTeWDsjcsZEWcWogo+S/TniFiFUT5VYXayXrwz5isgBYKnF4fDQZqhgKGE3C?= =?us-ascii?q?e8GJ1WenpGBU6WHnfsbYmLR+0DYjqIIsB9ijwESaShS4g52BG0sQ/60KFqLu?= =?us-ascii?q?XS+i0Fr57j08J15+LLnxEo6TN0F9id032KT2xskG4FQzA70aRirUFm11iMz7?= =?us-ascii?q?N3jOdFFdxc/PNFSAg6NZjBz+BgDNDyQA3BdM+TSFm6WtWmHS0xTtUpztAQZ0?= =?us-ascii?q?Z9GtSjgwvM3yqsHr8ZjbuLBIY78qjExXj+O959y2ra1Kkml1QmRsRPOXenh6?= =?us-ascii?q?Fh6QjTA4HJnl6Wl6avb6sc3SrN+H2fwmqJuUELGDJ3BKHKG2ISeE/Zhdv870?= =?us-ascii?q?LGCbSpDOcJKAxEnOiDIaxOY8aht1RNRP75NJyKcmWsnWi+HxGH7raBaYDnYX?= =?us-ascii?q?5b0j7TTk8enFZArj69KQEiC3L58CrlBzt0GAeqOhu0/A=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CMAAAV73Ve/yq68VFmHQEBAQkBEQU?= =?us-ascii?q?FAYFnCAELAYIoLT9UIRIqhBiIImCGTgkFAYEzBIlqDo9SgXsJAQEBAQEBAQE?= =?us-ascii?q?BKwkBAgQBAYRFAoIhJzQJDgIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKhFE?= =?us-ascii?q?hAQMBAQUKATcMgjspAYJ/AQQBIzMjBQsIAxoCBSECAg8BBA1PH4MIgksDCQU?= =?us-ascii?q?kC6t9gTKIJA2CGgaBDioBjEh5gQeBR4JePoIbSQQagQZDTYJEgl4EsAhEgka?= =?us-ascii?q?HXopshFmbWJgXgjeSJzmBWDMaMIMvUCWXJIVCQzACAYEeCI1rAQE?= X-IPAS-Result: =?us-ascii?q?A2CMAAAV73Ve/yq68VFmHQEBAQkBEQUFAYFnCAELAYIoL?= =?us-ascii?q?T9UIRIqhBiIImCGTgkFAYEzBIlqDo9SgXsJAQEBAQEBAQEBKwkBAgQBAYRFA?= =?us-ascii?q?oIhJzQJDgIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKhFEhAQMBAQUKATcMg?= =?us-ascii?q?jspAYJ/AQQBIzMjBQsIAxoCBSECAg8BBA1PH4MIgksDCQUkC6t9gTKIJA2CG?= =?us-ascii?q?gaBDioBjEh5gQeBR4JePoIbSQQagQZDTYJEgl4EsAhEgkaHXopshFmbWJgXg?= =?us-ascii?q?jeSJzmBWDMaMIMvUCWXJIVCQzACAYEeCI1rAQE?= Received: from 42.186-241-81.adsl-dyn.isp.belgacom.be (HELO user-ThinkPad-T400) ([81.241.186.42]) by relay.skynet.be with ESMTP; 21 Mar 2020 11:45:37 +0100 From: Nicolas Richard To: lg.zevlg@gmail.com Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower In-Reply-To: <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> (lg zevlg's message of "Sat, 8 Feb 2020 12:10:46 +0400") References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) Date: Sat, 21 Mar 2020 11:45:36 +0100 Message-ID: <87fte2m1f3.fsf@members.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, Eli Zaretskii , rms@gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) (I'm sorry if this comes to you as a duplicate, I think I sent it by error to the wrong set of people) lg.zevlg@gmail.com writes: > If level is unavailable and AC is off-line/unknown, then it should be emp= ty string I think. User could see the battery level is low/critical by per= centage I committed a oneliner doing that, pushed as fix/bug-39491 See: https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=3Dfix/bug-39491 It's been a long time since I didn't commit to emacs, can you check if it's OK to merge ? I'm aware that it is not a full fix because it doesn't address the following : > OK, we should generalize multi-battery code then, so each status func > won=E2=80=99t reimplement multi battery handling. but at least it stops the error. --=20 Nicolas From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 26 10:47:42 2020 Received: (at 39491) by debbugs.gnu.org; 26 Apr 2020 14:47:42 +0000 Received: from localhost ([127.0.0.1]:33891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSiZK-0001UF-0X for submit@debbugs.gnu.org; Sun, 26 Apr 2020 10:47:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSiZJ-0001RI-Du for 39491@debbugs.gnu.org; Sun, 26 Apr 2020 10:47:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44030) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSiZD-0001tx-MJ; Sun, 26 Apr 2020 10:47:35 -0400 Received: from [176.228.60.248] (port=2402 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jSiZ6-0001do-4e; Sun, 26 Apr 2020 10:47:28 -0400 Date: Sun, 26 Apr 2020 17:47:21 +0300 Message-Id: <83wo625mo6.fsf@gnu.org> From: Eli Zaretskii To: lg.zevlg@gmail.com In-Reply-To: <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> (lg.zevlg@gmail.com) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, rms@gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: lg.zevlg@gmail.com > Date: Sat, 8 Feb 2020 12:10:46 +0400 > Cc: 39491@debbugs.gnu.org, rms@gnu.org, > Stefan Monnier > > >> 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. > >> > >> 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. > >> > >> Please restore the lost functionality. > > > > Evgeny, could you please look into fixing this? > > > > OK, we should generalize multi-battery code then, so each status func won’t reimplement multi battery handling. > > I’ll look at it tomorrow Evgeny, any progress in fixing this? TIA From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 26 11:44:28 2020 Received: (at 39491) by debbugs.gnu.org; 26 Apr 2020 15:44:28 +0000 Received: from localhost ([127.0.0.1]:33942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSjSG-0002s3-HZ for submit@debbugs.gnu.org; Sun, 26 Apr 2020 11:44:28 -0400 Received: from mail-lf1-f51.google.com ([209.85.167.51]:45431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSjSE-0002rp-5Z for 39491@debbugs.gnu.org; Sun, 26 Apr 2020 11:44:26 -0400 Received: by mail-lf1-f51.google.com with SMTP id f8so11701226lfe.12 for <39491@debbugs.gnu.org>; Sun, 26 Apr 2020 08:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dMtLbfHNoYFBW7IwVirXM39gdz52ixZa35BFam0a0GY=; b=DAk5QcGYhHV+rlNWah92LiVaxnbVYe6Ye+1C4TH6uCziRnH+Gkb4U+bFuU4QOHW4JD DsxeABeaHztjqKYs04Km2tnOpB49LFaHQGgBr/NZJsIKoknLcvU1HImz0k7uQTE6KTSB gZUpEAKmqMYaGHXeIk5UbpJjJJoJGAMf052VtkSR5bcVEVzj72stds9UeozxvkfZXgc3 Ou0OugGGvedv1QcCpyQqN8EPhIXbOlHlcA+Wqy39hBe8f4UAyi90O2CnOYwXBjUZMyRD GcLYDPnEh9TxGlEvt8F2FWk/t8+JX0WeC51VpH7jhWKeBnqzxfH1h0RXBgZh/88REoQg +Hww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dMtLbfHNoYFBW7IwVirXM39gdz52ixZa35BFam0a0GY=; b=uOucfFqVTzRrsugEoWjdydTzRdznCIO8iifRiR5N8W01Da4j2vTpTef8cuYsKAzuFa gS0Rg4tevyt8Hmgn1IQWiOK0Z2ZZow7zSB2ZJeshIlZVVFsLOIFpWUFreuArfF8koKYQ jmGNkdsyqE0yYTR4nrX2EXhhRkjHSXr9TqpfPIR2uhho0LiliF4vhRvS8GXJDqpbxBdn fAVWaW1eT4/h9L3ABJI4UIv6hAGJume/5zLs/ZjXWunyKVSFcNZ1enaClLOJ0/994uQP MJi4VZzzQzFPsOVIqUDSDjzazi6jvlyFtgELMAS8Zq2CsKm+Mn4LNKq8F+L+ffi5Nk7B zuRw== X-Gm-Message-State: AGi0PuYqzmHhe25D+4HNG7M7VQo7vWaQeuCHDtVDJ6VskUuN1PrQ6nxh Ym2SdezRFvcAZn9PLUbqzDn5fDQGzmz+qntCUo8= X-Google-Smtp-Source: APiQypKyqQoKQHwzAa4n0+p6eDTRtfViyLPI8vA9fuym7TxHXEHJb8FFzejKQchihwFamahKnjlnKnbbVWouhU+srwE= X-Received: by 2002:a05:6512:308e:: with SMTP id z14mr12873640lfd.110.1587915860041; Sun, 26 Apr 2020 08:44:20 -0700 (PDT) MIME-Version: 1.0 References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> In-Reply-To: <83wo625mo6.fsf@gnu.org> From: Evgeny Zajcev Date: Sun, 26 Apr 2020 18:44:09 +0300 Message-ID: Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000c5657505a43378ef" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, rms@gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000c5657505a43378ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D0=B2=D1=81, 26 =D0=B0=D0=BF=D1=80. 2020 =D0=B3. =D0=B2 17:47, Eli Zaretsk= ii : > > From: lg.zevlg@gmail.com > > Date: Sat, 8 Feb 2020 12:10:46 +0400 > > Cc: 39491@debbugs.gnu.org, rms@gnu.org, > > Stefan Monnier > > > > >> However, that function has a design flaw: it reports on just the fir= st > > >> 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. > > >> > > >> The old code handle all the batteries and added the energy quantitie= s > > >> so as to report accurately the total power available and overall > > >> fraction of charge. I wrote that code myself, around 10 years ago. > > >> > > >> Please restore the lost functionality. > > > > > > Evgeny, could you please look into fixing this? > > > > > > > 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 > > Evgeny, any progress in fixing this? > Sorry for the delay, I have some progress, but not yet ready. I'm pretty busy these days because I'm working for large company that provides video-streaming service and we experiencing extreme rise in number of the active users and everybody wants to watch something all the day :) --=20 lg --000000000000c5657505a43378ef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
=D0=B2=D1=81, 26 =D0=B0=D0=BF=D1=80. = 2020 =D0=B3. =D0=B2 17:47, Eli Zaretskii <eliz@gnu.org>:
> From: = lg.zevlg@gmail.com
> Date: Sat, 8 Feb 2020 12:10:46 +0400
> Cc: 39491@d= ebbugs.gnu.org, rms@gn= u.org,
>=C2=A0 Stefan Monnier <monnier@iro.umontreal.ca>
>
> >> However, that function has a design flaw: it reports on just = the first
> >> battery in the list.=C2=A0 battery-upower-device-list correct= ly returns a
> >> list with an element for each battery, but battery-upower fin= ds only one
> >> of them (the first one in the list) and ignores the others. > >>
> >> The old code handle all the batteries and added the energy qu= antities
> >> so as to report accurately the total power available and over= all
> >> fraction of charge.=C2=A0 I wrote that code myself, around 10= years ago.
> >>
> >> Please restore the lost functionality.
> >
> > Evgeny, could you please look into fixing this?
> >
>
> 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

Evgeny, any progress in fixing this?

So= rry for the delay, I have some progress, but not yet ready.=C2=A0 I'm p= retty busy these days because I'm working for large company that provid= es video-streaming service and we experiencing extreme rise in number of th= e active users and everybody wants to watch something all the day :)

--
lg
--000000000000c5657505a43378ef-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 26 12:54:30 2020 Received: (at 39491) by debbugs.gnu.org; 26 Apr 2020 16:54:30 +0000 Received: from localhost ([127.0.0.1]:34773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSkY1-0005aK-9R for submit@debbugs.gnu.org; Sun, 26 Apr 2020 12:54:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSkXq-0005Zx-Eu for 39491@debbugs.gnu.org; Sun, 26 Apr 2020 12:54:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46774) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSkXh-0000Dq-OT; Sun, 26 Apr 2020 12:54:12 -0400 Received: from [176.228.60.248] (port=2204 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jSkXQ-00036x-2B; Sun, 26 Apr 2020 12:53:53 -0400 Date: Sun, 26 Apr 2020 19:53:45 +0300 Message-Id: <83mu6y5gti.fsf@gnu.org> From: Eli Zaretskii To: Evgeny Zajcev In-Reply-To: (message from Evgeny Zajcev on Sun, 26 Apr 2020 18:44:09 +0300) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, rms@gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Evgeny Zajcev > Date: Sun, 26 Apr 2020 18:44:09 +0300 > Cc: 39491@debbugs.gnu.org, rms@gnu.org, > Stefan Monnier > > Evgeny, any progress in fixing this? > > Sorry for the delay, I have some progress, but not yet ready. I'm pretty busy these days because I'm working > for large company that provides video-streaming service and we experiencing extreme rise in number of the > active users and everybody wants to watch something all the day :) Thanks, just please don't forget this issue. From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 12:24:05 2020 Received: (at 39491) by debbugs.gnu.org; 26 May 2020 16:24:05 +0000 Received: from localhost ([127.0.0.1]:46262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdcN2-0006pf-55 for submit@debbugs.gnu.org; Tue, 26 May 2020 12:24:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdcMp-0006p1-AY for 39491@debbugs.gnu.org; Tue, 26 May 2020 12:24:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47370) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdcMj-0000mN-Pv; Tue, 26 May 2020 12:23:45 -0400 Received: from [176.228.60.248] (port=2432 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdcMb-0001iq-Iv; Tue, 26 May 2020 12:23:38 -0400 Date: Tue, 26 May 2020 19:23:24 +0300 Message-Id: <83y2peu0lf.fsf@gnu.org> From: Eli Zaretskii To: lg.zevlg@gmail.com In-Reply-To: <83mu6y5gti.fsf@gnu.org> (message from Eli Zaretskii on Sun, 26 Apr 2020 19:53:45 +0300) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, rms@gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 26 Apr 2020 19:53:45 +0300 > From: Eli Zaretskii > Cc: 39491@debbugs.gnu.org, rms@gnu.org, monnier@iro.umontreal.ca > > > From: Evgeny Zajcev > > Date: Sun, 26 Apr 2020 18:44:09 +0300 > > Cc: 39491@debbugs.gnu.org, rms@gnu.org, > > Stefan Monnier > > > > Evgeny, any progress in fixing this? > > > > Sorry for the delay, I have some progress, but not yet ready. I'm pretty busy these days because I'm working > > for large company that provides video-streaming service and we experiencing extreme rise in number of the > > active users and everybody wants to watch something all the day :) > > Thanks, just please don't forget this issue. Ping! Any news on this one? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 12:42:49 2020 Received: (at 39491) by debbugs.gnu.org; 26 May 2020 16:42:49 +0000 Received: from localhost ([127.0.0.1]:46294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdcfA-0007HZ-TT for submit@debbugs.gnu.org; Tue, 26 May 2020 12:42:49 -0400 Received: from mail-lf1-f52.google.com ([209.85.167.52]:34024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdcf8-0007HN-LJ for 39491@debbugs.gnu.org; Tue, 26 May 2020 12:42:47 -0400 Received: by mail-lf1-f52.google.com with SMTP id e125so12723036lfd.1 for <39491@debbugs.gnu.org>; Tue, 26 May 2020 09:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GF3qzFTrC5/utFPUgoMDKI0fCnunZp3ZWliwwR8xEl8=; b=PYQFW0BoeV1jzRmr1LOULsPAzx4q9fjk/eM7wlCFNLnabxajYsz2ns0Mqouiqknkh0 KIwbFAzYCSFM7h1WKtSaqBM2eBimALzjCC3pi719f/eT5LVWA96hXDf/2HYPnqfyV1s5 hGTc03BIkrSjlomNt+BIZ3XNnlTVbHjq++uRpEofdyL295HafXVrCHnfiULG8igJ8eRJ lmqK0BtvxSkwL6ddufgBYE0gstvYI9lgoVJPG32t0ryBZDdKf5/WG8kB8sMqrzyd5oQz N9Xy4CvntaOMVxMaxllaqU+cS3t2wOJ53IjZnTSZtdeWt+/ndGUtrn9Bl9trABHnYH6q H2WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GF3qzFTrC5/utFPUgoMDKI0fCnunZp3ZWliwwR8xEl8=; b=PxePatcwvIXjViAlu+wwUXny02dcbNPiGnJPE6l5AQ9QrxZ7DUnscElIGCAvgQiAg6 vxk46h34NuyiotbSSVHPdL0N1TsLPqFcr4b53XjKb+ZrdsactLX709YiKCBLfewIuYD+ 0ATjJ1TunrdLN85rTD3hkOVcBfnTMaxI+cFkd0vCZ+EEK2bfuD/awuxgk9ryOu5es025 vt6z1UWV9xsEkctO1rc+7LBAryU3jYbo0hlqSdAtuYFXb2O/+EM9uDQZ32j3PR/Go/L/ JP8r5YWCrZ0T5fzNarC4z0OczpLdrPDq3CR0wTNyLWbb2heN00GyIdcZ9ClVALVkmMRz WcKg== X-Gm-Message-State: AOAM5314SWeyVV5E+FziTicaEBm/M8KqwP6zeSSUYX9D8pAqlWWrYrOL cst/FFcYW74mTEoEYnlzxzXsz49VHB5eupyAZio= X-Google-Smtp-Source: ABdhPJzoLUZAeekBDOWYKhGIQvD0l0Ha/vHq0gl+Vawh2MyYhYj2m+YDMeRKftOhNBUv1K8S7YZq4thHSno+x+OKUME= X-Received: by 2002:a05:6512:3082:: with SMTP id z2mr947589lfd.32.1590511360494; Tue, 26 May 2020 09:42:40 -0700 (PDT) MIME-Version: 1.0 References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> In-Reply-To: <83y2peu0lf.fsf@gnu.org> From: Evgeny Zajcev Date: Tue, 26 May 2020 19:42:29 +0300 Message-ID: Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000a753b505a68fc8e6" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, rms@gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000a753b505a68fc8e6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D0=B2=D1=82, 26 =D0=BC=D0=B0=D1=8F 2020 =D0=B3. =D0=B2 19:23, Eli Zaretski= i : > > Date: Sun, 26 Apr 2020 19:53:45 +0300 > > From: Eli Zaretskii > > Cc: 39491@debbugs.gnu.org, rms@gnu.org, monnier@iro.umontreal.ca > > > > > From: Evgeny Zajcev > > > Date: Sun, 26 Apr 2020 18:44:09 +0300 > > > Cc: 39491@debbugs.gnu.org, rms@gnu.org, > > > Stefan Monnier > > > > > > Evgeny, any progress in fixing this? > > > > > > Sorry for the delay, I have some progress, but not yet ready. I'm > pretty busy these days because I'm working > > > for large company that provides video-streaming service and we > experiencing extreme rise in number of the > > > active users and everybody wants to watch something all the day :) > > > > Thanks, just please don't forget this issue. > > Ping! Any news on this one? > > I will get spare time very soon, and will come back to this. I did not forget about it :) --=20 lg --000000000000a753b505a68fc8e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
=D0=B2=D1=82, 26 =D0=BC=D0=B0=D1=8F 2= 020 =D0=B3. =D0=B2 19:23, Eli Zaretskii <eliz@gnu.org>:
> Date: Sun, 26 Apr 2020 19:53:45 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 39491@d= ebbugs.gnu.org, rms@gn= u.org, mo= nnier@iro.umontreal.ca
>
> > From: Evgeny Zajcev <lg.zevlg@gmail.com>
> > Date: Sun, 26 Apr 2020 18:44:09 +0300
> > Cc: 39= 491@debbugs.gnu.org, r= ms@gnu.org,
> >=C2=A0 =C2=A0 =C2=A0Stefan Monnier <monnier@iro.umontreal.ca>
> >
> >=C2=A0 Evgeny, any progress in fixing this?
> >
> > Sorry for the delay, I have some progress, but not yet ready.=C2= =A0 I'm pretty busy these days because I'm working
> > for large company that provides video-streaming service and we ex= periencing extreme rise in number of the
> > active users and everybody wants to watch something all the day := )
>
> Thanks, just please don't forget this issue.

Ping!=C2=A0 Any news on this one?


I will get spare time very soon, and w= ill come back to this. I did not forget about it :)

-- <= br>
lg
--000000000000a753b505a68fc8e6-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 12:46:33 2020 Received: (at 39491) by debbugs.gnu.org; 26 May 2020 16:46:33 +0000 Received: from localhost ([127.0.0.1]:46298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdciY-0007NK-Fu for submit@debbugs.gnu.org; Tue, 26 May 2020 12:46:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdciX-0007N7-97 for 39491@debbugs.gnu.org; Tue, 26 May 2020 12:46:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47874) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdciR-0005MH-As; Tue, 26 May 2020 12:46:11 -0400 Received: from [176.228.60.248] (port=3815 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdciK-0004qr-3m; Tue, 26 May 2020 12:46:04 -0400 Date: Tue, 26 May 2020 19:45:49 +0300 Message-Id: <83sgfmtzk2.fsf@gnu.org> From: Eli Zaretskii To: Evgeny Zajcev In-Reply-To: (message from Evgeny Zajcev on Tue, 26 May 2020 19:42:29 +0300) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, rms@gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Evgeny Zajcev > Date: Tue, 26 May 2020 19:42:29 +0300 > Cc: 39491@debbugs.gnu.org, rms@gnu.org, > Stefan Monnier > > I will get spare time very soon, and will come back to this. I did not forget about it :) Thanks! From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 13:42:35 2020 Received: (at 39491) by debbugs.gnu.org; 26 May 2020 17:42:35 +0000 Received: from localhost ([127.0.0.1]:46324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jddb1-0000Db-E2 for submit@debbugs.gnu.org; Tue, 26 May 2020 13:42:35 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jddaz-0000DO-8S for 39491@debbugs.gnu.org; Tue, 26 May 2020 13:42:34 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C94B010093D; Tue, 26 May 2020 13:42:27 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1B4D010083A; Tue, 26 May 2020 13:42:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1590514946; bh=8w60bTRNBVzejL6oDHjJ0iWCZ5F9TY0xiiSZwRe/fXY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Fthkh2gO85YyD/SusS95W7RzL3AmCxNkNNQLU/eP3qeX9+Hy/3owEZjZUdkr/O9u8 pSZgndW4FpVBFizx9mTY91xI1MPIPplChZQx5PwJPq41lnkgTaafIO+WNYAz9ipRHn QZCsYXYmVvxRpXOjM0o7nSeWvESmPKrZtN1kV6Ya1URUKizxrBxBZmwVDSWBrHyDjP oRc3IJGxrwWTxaQ8UeZwJ8wF8JUypAT4ghDRWY7S3IgM/7SDIGmEN/pUtgC+Dd8gXc mJ5jkyTbD9AuK8vgznxZgtBZmeemyOIQBirF+q58PM3hoe3N76YlbtoOFmmvjzsVCC oMRKj6acZ/b2w== Received: from milanesa (unknown [216.154.27.250]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CA24F1201F1; Tue, 26 May 2020 13:42:25 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower Message-ID: References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> <83sgfmtzk2.fsf@gnu.org> Date: Tue, 26 May 2020 13:42:25 -0400 In-Reply-To: <83sgfmtzk2.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 26 May 2020 19:45:49 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.086 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, Evgeny Zajcev , rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I will get spare time very soon, and will come back to this. I did not forget about it :) > Thanks! How 'bout we revert to the /sys backend as default, in the mean time? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 13:48:05 2020 Received: (at 39491) by debbugs.gnu.org; 26 May 2020 17:48:05 +0000 Received: from localhost ([127.0.0.1]:46332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jddgL-0000ML-AB for submit@debbugs.gnu.org; Tue, 26 May 2020 13:48:05 -0400 Received: from mail-lj1-f171.google.com ([209.85.208.171]:38702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jddgJ-0000Lo-H6 for 39491@debbugs.gnu.org; Tue, 26 May 2020 13:48:03 -0400 Received: by mail-lj1-f171.google.com with SMTP id m18so25594898ljo.5 for <39491@debbugs.gnu.org>; Tue, 26 May 2020 10:48:03 -0700 (PDT) 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=vQUglRmi1va46GvWq2KaoPEyLhvcrTz8C0EZ6eMgkxI=; b=ohKmFt8pfPtExnb/VGKvdhoQXytQPVNKcZCRMg6Y+2OCdeDOBo2XeM4pCjD39frlfB /KbgjjszFqmAxYhkNT8KdakSbnn4Q/aPjnSGnr4yU7pPJ9I15YDhFOsuQc1aVbCcvuYV s4zFjYdJ8j/yjKQ1tm9CzrTLTaoRJzUSnNjdMZ1BIMJTdw6Fu9KXcaHWiSdD44jLZSYy jtMAly45YEnZqnD/o30J8o9VBYA5gxVEt87Itla1Kg0BOqhWoGBJvTbwy34v6VJ8VCeI kKYOX6wHT7GHDVwA//iD7zn3dM0fhTsKvUaCOitgrnltZGpM3QyWRFErA2vbX3S6WGe/ GWcQ== 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=vQUglRmi1va46GvWq2KaoPEyLhvcrTz8C0EZ6eMgkxI=; b=J5F1+arvPYlCLPI3jMHJBQbewhSa6NrOVYkt6mImok3r0UYcCENwJzPNDO1a5mHWPS kLZvDNStWlfGy4bCkDBdzJOXAs9Az2PFYbI1S6gacIWol5gAgavGJ3yT4Tnydw1+5+l+ IIebB7gvF8Uhk4PsbBCVmyVVqY4g0mrRtS/A3ZMTTrXOL4vqMTqK267p7c4SYzzKl7KZ 6sioK8pd6AGsN1rPgiEh9e9E4GyQBbe5o0H5hcJ4pzptVym8UvdP/t715Kv/Ly4KaXry hlYmFKadUTkv3EVeoXYfHOrnJMoeB9t132YkSiMaViSBZF3iKJqMimJy5kFnFVRj1EEH gxIw== X-Gm-Message-State: AOAM5333ue1EhywszKUyKhZuQlwCdiAuEgVYVwVbplpJ2JKJzj3Fp6el OWg5DzRcXcUsBQzV5ZDNfWE= X-Google-Smtp-Source: ABdhPJyP14V68wSBj4T55yAMtR/WN6C0uaXzvpZ8G3GQ0PQM2XLOVss7QCdI4YcAejBuQRxgExWFDg== X-Received: by 2002:a2e:9252:: with SMTP id v18mr1134572ljg.337.1590515277404; Tue, 26 May 2020 10:47:57 -0700 (PDT) Received: from [192.168.1.94] (95-24-153-168.broadband.corbina.ru. [95.24.153.168]) by smtp.gmail.com with ESMTPSA id h2sm107566ljb.45.2020.05.26.10.47.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 May 2020 10:47:56 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: lg.zevlg@gmail.com Mime-Version: 1.0 (1.0) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower Date: Tue, 26 May 2020 20:47:55 +0300 Message-Id: <8E3D6E2C-FA77-446E-8E31-354E64F8FAD9@gmail.com> References: In-Reply-To: To: Stefan Monnier X-Mailer: iPad Mail (17E262) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, Eli Zaretskii , rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 26 =D0=BC=D0=B0=D1=8F 2020 =D0=B3., =D0=B2 20:42, Stefan Monnier =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 > =EF=BB=BF >>=20 >>> I will get spare time very soon, and will come back to this. I did not f= orget about it :) >> Thanks! >=20 > How 'bout we revert to the /sys backend as default, in the mean time? Multiple batteries setup is so popular in Emacs world? We can detect multip= le batteries and fallback to backend supporting them From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 23:19:36 2020 Received: (at 39491) by debbugs.gnu.org; 27 May 2020 03:19:37 +0000 Received: from localhost ([127.0.0.1]:47769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdmbQ-0005zv-JO for submit@debbugs.gnu.org; Tue, 26 May 2020 23:19:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdmbO-0005zh-5P for 39491@debbugs.gnu.org; Tue, 26 May 2020 23:19:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58478) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdmbI-0001Md-FJ; Tue, 26 May 2020 23:19:28 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jdmbG-0006n1-5l; Tue, 26 May 2020 23:19:26 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: lg.zevlg@gmail.com In-Reply-To: <8E3D6E2C-FA77-446E-8E31-354E64F8FAD9@gmail.com> (lg.zevlg@gmail.com) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <8E3D6E2C-FA77-446E-8E31-354E64F8FAD9@gmail.com> Message-Id: Date: Tue, 26 May 2020 23:19:26 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] We can detect multiple batteries and fallback to backend supporting them 1. "Backend" is a general term. What is this backend? 2. Does it support multiple batteries well? 3. How can I test that it works? What commands should I use? -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 23:19:40 2020 Received: (at 39491) by debbugs.gnu.org; 27 May 2020 03:19:40 +0000 Received: from localhost ([127.0.0.1]:47772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdmbT-00060A-Sm for submit@debbugs.gnu.org; Tue, 26 May 2020 23:19:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdmbS-0005zm-1M for 39491@debbugs.gnu.org; Tue, 26 May 2020 23:19:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58489) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdmbM-0001ON-Qr; Tue, 26 May 2020 23:19:32 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jdmbJ-0006nR-H5; Tue, 26 May 2020 23:19:29 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Tue, 26 May 2020 13:42:25 -0400) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> <83sgfmtzk2.fsf@gnu.org> Message-Id: Date: Tue, 26 May 2020 23:19:29 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, eliz@gnu.org, lg.zevlg@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > How 'bout we revert to the /sys backend as default, in the mean time? Is that the same code in battery.el that was running last year? If so, it did the job. Or is it something different? -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Wed May 27 09:59:26 2020 Received: (at 39491) by debbugs.gnu.org; 27 May 2020 13:59:26 +0000 Received: from localhost ([127.0.0.1]:49690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdwac-0007JD-JC for submit@debbugs.gnu.org; Wed, 27 May 2020 09:59:26 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdwaa-0007Ix-Oq for 39491@debbugs.gnu.org; Wed, 27 May 2020 09:59:24 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0B5D8440A97; Wed, 27 May 2020 09:59:19 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8BA614407C8; Wed, 27 May 2020 09:59:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1590587957; bh=PCzCc8IRX1Q6LZGfLsUbB2Un4eQHYJ+JlwyOieVClVE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=LX9+2NRKVm5UogEFse5Iz+HQlC5CQBVtQXnfLiqU/0HmcIQhAGAFhnYztVtrx2Ltm fjuowMfRohW21r6ZwwOOEjuH/njkFyQzAdgSxccXyvc/xrk9vgK/4XilI0TOug27Yn Tfda3KN6JvXW6Wc4UZW3rYrVxnL1kFCOLkipJnFLtBLHtPJdNmob+GojcCqTRxxd0I mW/dr8XqHGgF7FOAd+wjDo+3dVzYtrG6+C+cKtzypL0ghoWZ0C4MEKY4qGxkQP6n3R exqVDOZZ/cIq7whWioJKy9waixw0dLfcHuNU4rS31GDKSHFj5ptK4MKCiBQetFUGsQ ksEdraoWSpSGw== Received: from milanesa (unknown [216.154.27.250]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4E718120622; Wed, 27 May 2020 09:59:17 -0400 (EDT) From: Stefan Monnier To: Richard Stallman Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower Message-ID: References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> <83sgfmtzk2.fsf@gnu.org> Date: Wed, 27 May 2020 09:59:16 -0400 In-Reply-To: (Richard Stallman's message of "Tue, 26 May 2020 23:19:29 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.096 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, eliz@gnu.org, lg.zevlg@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > How 'bout we revert to the /sys backend as default, in the mean time? > Is that the same code in battery.el that was running last year? Yes. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed May 27 23:15:55 2020 Received: (at 39491) by debbugs.gnu.org; 28 May 2020 03:15:55 +0000 Received: from localhost ([127.0.0.1]:50500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1je91A-00063B-Fr for submit@debbugs.gnu.org; Wed, 27 May 2020 23:15:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1je919-00062z-Me for 39491@debbugs.gnu.org; Wed, 27 May 2020 23:15:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51790) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1je914-00008l-F0; Wed, 27 May 2020 23:15:34 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1je910-00037h-Um; Wed, 27 May 2020 23:15:33 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Wed, 27 May 2020 09:59:16 -0400) Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> <83sgfmtzk2.fsf@gnu.org> Message-Id: Date: Wed, 27 May 2020 23:15:30 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, lg.zevlg@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Is that the same code in battery.el that was running last year? > Yes. In that case, it fixes the regression that is a problem for me. I hope the new code will eventually work, but in the mean time, let's move back to the code that does work. -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 11 11:58:42 2020 Received: (at 39491) by debbugs.gnu.org; 11 Jun 2020 15:58:42 +0000 Received: from localhost ([127.0.0.1]:37834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjPbF-0006Xs-AG for submit@debbugs.gnu.org; Thu, 11 Jun 2020 11:58:42 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:54147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjPbD-0006XX-4J for 39491@debbugs.gnu.org; Thu, 11 Jun 2020 11:58:40 -0400 Received: by mail-wm1-f50.google.com with SMTP id l26so5435734wme.3 for <39491@debbugs.gnu.org>; Thu, 11 Jun 2020 08:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=gdCkRzVhEm+9akGRlyeLEXD0GWdo4wbKloVc8RVRHEY=; b=CVGHpiF4Z//2V1h03FuQd3VCOmf5iqBQvHDI6ZuY79LNvoE5+YXH0XwA0b4UXSqc+n V/FTJGfVKX5LzDWQvkr1c4RcLBYqTWCuuHB31kYuuoiMgpaho34xP1ZV0k8bfMP/sYRa tZg8poX5UokPZU9CQZBgaAIsCSxxDxmusZQmcD2LUdPHiX9JENVUo90/WiLxkMavjB2a +yyNxxxGZf/gHRz/7oAhNviLMMfE5qXuEZ9BfFk91MrbeIrHpoMlstaXsPXohrngi0WI L4H6G5nuc447UVM8NPc15Qf/y8EPImrrA8AgCAArFXWKO7wds4tn4J7ow0u0cXlwYeI2 CMfw== 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=gdCkRzVhEm+9akGRlyeLEXD0GWdo4wbKloVc8RVRHEY=; b=sUTwRxhdJfQIYS1TKyz7vRUmmdaAc3tYfGHJ37P8XLQ15ydkNLdN1pelCLjsK3ryY0 DA+V4BouHy+du0OTSDAAV3OXMC3Y1Y1KIbpni8YHNsatU3wWgo2mienBeFee3vJEgDEa 9j+1jTNXyzpWCB6y1ah5zKRl9FR1QJ14POrnQakLtAgigP6jRm7c22h4WkSHW4r+0hQs q5fL+cSO0sd8VJ/nlnJBqDNzISMRq6t+pm/81aSwOF+7d/8VriewVg/NTdCSsCdbkOAw XOK8xLq28nGm9H28yiJ60VTs0Wh8P3d0wBcEIvhiYLFjdJ48QflI9xm2QuUbxeEoFJ5c NZ8Q== X-Gm-Message-State: AOAM532feNLuyXLunW4MLxe44kYR/ESOm/JZ8mmOvv3+BJ9fQENZfKjo bP5YXb1eMASMaCLPut9TH1XCaQ== X-Google-Smtp-Source: ABdhPJwkPblNIS8OMJ/V7RAv8OUqXcIC8vC9xH2XHjfep6RPnnSQTcc2ekxiM0S4rJxAWoC9l2YX6A== X-Received: by 2002:a1c:c302:: with SMTP id t2mr8568697wmf.72.1591891113064; Thu, 11 Jun 2020 08:58:33 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id s5sm4562939wme.37.2020.06.11.08.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 08:58:32 -0700 (PDT) From: "Basil L. Contovounesios" To: Richard Stallman Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> <83sgfmtzk2.fsf@gnu.org> Date: Thu, 11 Jun 2020 16:58:30 +0100 In-Reply-To: (Richard Stallman's message of "Wed, 27 May 2020 23:15:30 -0400") Message-ID: <87ftb1zja1.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, lg.zevlg@gmail.com, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain tags 39491 + patch quit Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > > Is that the same code in battery.el that was running last year? > > > Yes. > > In that case, it fixes the regression that is a problem for me. > > I hope the new code will eventually work, but in the mean time, > let's move back to the code that does work. The attached patch fixes this regression and adds support for both multiple power sources and D-Bus status change notifications in battery-upower. In a separate patch in bug#41808 I reorder the battery status backends in order of increasing obsolescence on GNU/Linux: sysfs, ACPI, then APM. WDYT? Thanks, -- Basil --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Improve-battery.el-UPower-support.patch >From deafb5e9b2b9dcc50c0e543a4dfd82b0fe49a63a Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Thu, 11 Jun 2020 13:49:31 +0100 Subject: [PATCH] Improve battery.el UPower support For discussion, see the following threads: https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00843.html https://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00042.html https://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00282.html * etc/NEWS: Announce that battery-upower is enabled by default. * lisp/battery.el (battery-upower-device): Accept both battery and line power device names, or a list thereof (bug#39491). (battery-upower-line-power-device): Remove user option; superseded by battery-upower-device. (battery-upower-subscribe): New user option. (battery-status-function): Check whether a UPower service is provided without activating it. (display-battery-mode): Subscribe to UPower signals when using battery-upower. (battery-upower): Merge data from multiple power sources. Calculate terse battery status %b based on average battery load percentage rather than coarse and often missing BatteryLevel (bug#39491). Add support for average temperature %d. (battery-upower-dbus-service) (battery-upower-dbus-interface) (battery-upower-dbus-path) (battery-upower-dbus-device-interface) (battery-upower-dbus-device-path) (battery-upower-device-all-properties): Rename to... (battery-upower-service) (battery-upower-interface) (battery-upower-path) (battery-upower-device-interface) (battery-upower-device-path) (battery--upower-device-properties): ...these, respectively. (battery-upower-device-list): Rename to... (battery--upower-devices) ...this. Return a flat list of device names determined by battery-upower-device. (battery-upower-types, battery-upower-states) (battery-upower-device-property, battery-upower-device-autodetect): Remove. (battery--upower-signals): New variable. (battery--upower-signal-handler, battery--upower-props-changed) (battery--upower-unsubscribe, battery--upower-subsribe) (battery--upower-state): New functions. * test/lisp/battery-tests.el (battery-upower-state) (battery-upower-state-unknown): New tests. --- etc/NEWS | 12 ++ lisp/battery.el | 282 +++++++++++++++++++++++-------------- test/lisp/battery-tests.el | 63 +++++++++ 3 files changed, 252 insertions(+), 105 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index b0c523672e..28617227cc 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -451,6 +451,18 @@ https://www.w3.org/TR/xml/#charsets). Now it rejects such strings. ** The metamail.el library is now marked obsolete. +** battery.el + +--- +*** UPower is now the default battery status backend when available. +UPower support via the function 'battery-upower' was added in Emacs +26.1, but was disabled by default. It is now the default value of +'battery-status-function' when the system provides a UPower D-Bus +service. The user options 'battery-upower-device' and +'battery-upower-subscribe' control which power sources to query and +whether to respond to status change notifications in addition to +polling, respectively. + * New Modes and Packages in Emacs 28.1 diff --git a/lisp/battery.el b/lisp/battery.el index b8855a8ce3..c663195ab0 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -44,21 +44,40 @@ battery :group 'hardware) (defcustom battery-upower-device nil - "UPower device of the `:battery' type. -Use `battery-upower-device-list' to list all available UPower devices. -If set to nil, then autodetect `:battery' device." - :version "28.1" - :type '(choice string (const :tag "Autodetect" nil))) + "Preferred UPower device name(s). +When `battery-status-function' is set to `battery-upower', this +user option specifies which power sources to query for status +information and merge into a single report. -(defcustom battery-upower-line-power-device nil - "UPower device of the `:line-power' type. -Use `battery-upower-device-list' to list all available UPower devices. -If set to nil, then autodetect `:battery' device." +When nil (the default), `battery-upower' queries all present +battery and line power devices as determined by the UPower +EnumerateDevices method. A string or a nonempty list of strings +names particular devices to query instead. UPower battery and +line power device names typically follow the patterns +\"battery_BATN\" and \"line_power_ACN\", respectively, with N +starting at 0 when present. Device names should not include the +leading D-Bus path \"/org/freedesktop/UPower/devices/\"." :version "28.1" - :type '(choice string (const :tag "Autodetect" nil))) + :type '(choice (const :tag "Autodetect all devices" nil) + (string :tag "Device") + (repeat :tag "Devices" string))) -(defconst battery-upower-dbus-service "org.freedesktop.UPower" - "Well-known UPower service name for the D-Bus system.") +(defcustom battery-upower-subscribe t + "Whether to subscribe to UPower device change signals. +When nil, battery status information is polled every +`battery-update-interval' seconds. When non-nil (the default), +the battery status is also updated whenever a power source is +added or removed, or when the system starts or stops running on +battery power. + +This only takes effect when `battery-status-function' is set to +`battery-upower' before enabling `display-battery-mode'." + :version "28.1" + :type 'boolean) + +(defconst battery-upower-service "org.freedesktop.UPower" + "Well-known name of the UPower D-Bus service. +See URL `https://upower.freedesktop.org/docs/ref-dbus.html'.") (defun battery--find-linux-sysfs-batteries () (let ((dirs nil)) @@ -70,7 +89,7 @@ battery--find-linux-sysfs-batteries (nreverse dirs))) (defcustom battery-status-function - (cond ((dbus-ping :system battery-upower-dbus-service) + (cond ((member battery-upower-service (dbus-list-activatable-names)) #'battery-upower) ((and (eq system-type 'gnu/linux) (file-readable-p "/proc/apm")) @@ -196,11 +215,15 @@ display-battery-mode (setq battery-mode-line-string "") (or global-mode-string (setq global-mode-string '(""))) (and battery-update-timer (cancel-timer battery-update-timer)) + (battery--upower-unsubscribe) (if (and battery-status-function battery-mode-line-format) (if (not display-battery-mode) (setq global-mode-string (delq 'battery-mode-line-string global-mode-string)) (add-to-list 'global-mode-string 'battery-mode-line-string t) + (and (eq battery-status-function #'battery-upower) + battery-upower-subscribe + (battery--upower-subsribe)) (setq battery-update-timer (run-at-time nil battery-update-interval 'battery-update-handler)) (battery-update)) @@ -555,123 +578,172 @@ battery-linux-sysfs (t "N/A")))))) -;;; `upowerd' interface. -(defconst battery-upower-dbus-interface "org.freedesktop.UPower" - "The interface to UPower. -See URL `https://upower.freedesktop.org/docs/'.") +;;; UPower interface. -(defconst battery-upower-dbus-path "/org/freedesktop/UPower" - "D-Bus path to talk to UPower service.") +(defconst battery-upower-interface "org.freedesktop.UPower" + "Name of the UPower D-Bus interface. +See URL `https://upower.freedesktop.org/docs/UPower.html'.") -(defconst battery-upower-dbus-device-interface - (concat battery-upower-dbus-interface ".Device") - "The Device interface of the UPower. +(defconst battery-upower-path "/org/freedesktop/UPower" + "D-Bus object providing `battery-upower-interface'.") + +(defconst battery-upower-device-interface "org.freedesktop.UPower.Device" + "Name of the UPower Device D-Bus interface. See URL `https://upower.freedesktop.org/docs/Device.html'.") -(defconst battery-upower-dbus-device-path - (concat battery-upower-dbus-path "/devices") - "D-Bus path to talk to devices part of the UPower service.") +(defconst battery-upower-device-path "/org/freedesktop/UPower/devices" + "D-Bus object providing `battery-upower-device-interface'.") -(defconst battery-upower-types - '((0 . :unknown) (1 . :line-power) (2 . :battery) - (3 . :ups) (4 . :monitor) (5 . :mouse) - (6 . :keyboard) (7 . :pda) (8 . :phone)) - "Type of the device.") +(defvar battery--upower-signals nil + "Handles for UPower signal subscriptions.") -(defconst battery-upower-states - '((0 . "unknown") (1 . "charging") (2 . "discharging") - (3 . "empty") (4 . "fully-charged") (5 . "pending-charge") - (6 . "pending-discharge")) - "Alist of battery power states. -Only valid for `:battery' devices.") +(defun battery--upower-signal-handler (&rest _) + "Update battery status on receiving a UPower D-Bus signal." + (timer-event-handler battery-update-timer)) -(defun battery-upower-device-property (device property) - "Get value of the single PROPERTY for the UPower DEVICE." - (dbus-get-property - :system battery-upower-dbus-service - (expand-file-name device battery-upower-dbus-device-path) - battery-upower-dbus-device-interface - property)) +(defun battery--upower-props-changed (_interface changed _invalidated) + "Update status when system starts/stops running on battery. +Intended as a UPower PropertiesChanged signal handler." + (when (assoc "OnBattery" changed) + (battery--upower-signal-handler))) -(defun battery-upower-device-all-properties (device) +(defun battery--upower-unsubscribe () + "Unsubscribe from UPower device change signals." + (mapc #'dbus-unregister-object battery--upower-signals) + (setq battery--upower-signals ())) + +(defun battery--upower-subsribe () + "Subscribe to UPower device change signals." + (push (dbus-register-signal :system battery-upower-service + battery-upower-path + dbus-interface-properties + "PropertiesChanged" + #'battery--upower-props-changed) + battery--upower-signals) + (dolist (method '("DeviceAdded" "DeviceRemoved")) + (push (dbus-register-signal :system battery-upower-service + battery-upower-path + battery-upower-interface + method #'battery--upower-signal-handler) + battery--upower-signals))) + +(defun battery--upower-device-properties (device) "Return value for all available properties for the UPower DEVICE." (dbus-get-all-properties - :system battery-upower-dbus-service - (expand-file-name device battery-upower-dbus-device-path) - battery-upower-dbus-device-interface)) + :system battery-upower-service + (expand-file-name device battery-upower-device-path) + battery-upower-device-interface)) -(defun battery-upower-device-list () - "Return list of all available UPower devices. -Each element is the cons cell in form: (DEVICE . DEVICE-TYPE)." - (mapcar (lambda (device-path) - (let* ((device (file-relative-name - device-path battery-upower-dbus-device-path)) - (type-num (battery-upower-device-property device "Type"))) - (cons device (or (cdr (assq type-num battery-upower-types)) - :unknown)))) - (dbus-call-method :system battery-upower-dbus-service - battery-upower-dbus-path - battery-upower-dbus-interface - "EnumerateDevices"))) +(defun battery--upower-devices () + "List all UPower devices according to `battery-upower-device'." + (cond ((stringp battery-upower-device) + (list battery-upower-device)) + (battery-upower-device) + ((dbus-call-method :system battery-upower-service + battery-upower-path + battery-upower-interface + "EnumerateDevices")))) -(defun battery-upower-device-autodetect (device-type) - "Return first matching UPower device of DEVICE-TYPE." - (car (rassq device-type (battery-upower-device-list)))) +(defun battery--upower-state (props state) + "Merge the UPower battery state in PROPS with STATE. +This is an extension of the UPower DisplayDevice algorithm for +merging multiple battery states into one. PROPS is an alist of +battery properties from `battery-upower-device-interface', and +STATE is a symbol representing the state to merge with." + ;; Map UPower enum into our printable symbols. + (let* ((new (pcase (cdr (assoc "State" props)) + (1 'charging) + (2 'discharging) + (3 'empty) + (4 'fully-charged) + (5 'pending-charge) + (6 'pending-discharge))) + ;; Unknown state represented by nil. + (either (delq nil (list new state)))) + ;; Earlier states override later ones. + (car (cond ((memq 'charging either)) + ((memq 'discharging either)) + ((memq 'pending-charge either)) + ((memq 'pending-discharge either)) + ;; Only options left are full or empty, + ;; but if they conflict return nil. + ((null (cdr either)) either) + ((apply #'eq either) either))))) (defun battery-upower () - "Get battery status from dbus Upower interface. -This function works only in systems with `upowerd' daemon -running. + "Get battery status from UPower D-Bus interface. +This function works only in systems that provide a UPower D-Bus +service. The following %-sequences are provided: %c Current capacity (mWh) -%p Battery load percentage -%r Current rate +%r Current rate of charge or discharge +%L AC line status (verbose) %B Battery status (verbose) %b Battery status: empty means high, `-' means low, `!' means critical, and `+' means charging -%L AC line status (verbose) +%d Temperature (in degrees Celsius) +%p Battery load percentage %s Remaining time (to charge or discharge) in seconds %m Remaining time (to charge or discharge) in minutes %h Remaining time (to charge or discharge) in hours %t Remaining time (to charge or discharge) in the form `h:min'" - (let* ((bat-device (or battery-upower-device - (battery-upower-device-autodetect :battery))) - (bat-props (when bat-device - (battery-upower-device-all-properties bat-device))) - (percents (cdr (assoc "Percentage" bat-props))) - (time-to-empty (cdr (assoc "TimeToEmpty" bat-props))) - (time-to-full (cdr (assoc "TimeToFull" bat-props))) - (state (cdr (assoc "State" bat-props))) - (level (cdr (assoc "BatteryLevel" bat-props))) - (energy (cdr (assoc "Energy" bat-props))) - (energy-rate (cdr (assoc "EnergyRate" bat-props))) - (lp-device (or battery-upower-line-power-device - (battery-upower-device-autodetect :line-power))) - (online-p (when lp-device - (battery-upower-device-property lp-device "Online"))) - (seconds (if online-p time-to-full time-to-empty)) - (minutes (when seconds (/ seconds 60))) - (hours (when minutes (/ minutes 60))) - (remaining-time (when hours - (format "%d:%02d" hours (mod minutes 60))))) - (list (cons ?c (if energy (number-to-string (round (* 1000 energy))) "N/A")) - (cons ?p (if percents (number-to-string (round percents)) "N/A")) - (cons ?r (if energy-rate - (concat (number-to-string energy-rate) " W") + (let ((count 0) props type line-status state load temperature + secs mins hrs total-energy total-rate total-tte total-ttf) + ;; Merge information from all available or specified UPower + ;; devices like other `battery-status-function's. + (dolist (device (battery--upower-devices)) + (setq props (battery--upower-device-properties device)) + (setq type (cdr (assoc "Type" props))) + (cond + ((and (eq type 1) (not (eq line-status 'online))) + ;; It's a line power device: `online' if currently providing + ;; power, any other non-nil value if simply present. + (setq line-status (if (cdr (assoc "Online" props)) 'online t))) + ((and (eq type 2) (cdr (assoc "IsPresent" props))) + ;; It's a battery. + (setq count (1+ count)) + (setq state (battery--upower-state props state)) + (let ((energy (cdr (assoc "Energy" props))) + (rate (cdr (assoc "EnergyRate" props))) + (percent (cdr (assoc "Percentage" props))) + (temp (cdr (assoc "Temperature" props))) + (tte (cdr (assoc "TimeToEmpty" props))) + (ttf (cdr (assoc "TimeToFull" props)))) + (when energy (setq total-energy (+ (or total-energy 0) energy))) + (when rate (setq total-rate (+ (or total-rate 0) rate))) + (when percent (setq load (+ (or load 0) percent))) + (when temp (setq temperature (+ (or temperature 0) temp))) + (when tte (setq total-tte (+ (or total-tte 0) tte))) + (when ttf (setq total-ttf (+ (or total-ttf 0) ttf))))))) + (when (> count 1) + ;; Averages over multiple batteries. + (when load (setq load (/ load count))) + (when temperature (setq temperature (/ temperature count)))) + (when (setq secs (if (eq line-status 'online) total-ttf total-tte)) + (setq mins (/ secs 60)) + (setq hrs (/ secs 3600))) + (list (cons ?c (if total-energy + (format "%.0f" (* total-energy 1000)) "N/A")) - (cons ?B (if state - (cdr (assq state battery-upower-states)) - "unknown")) - (cons ?b (cond ((= level 3) "-") - ((= level 4) "!") - (online-p "+") - (t ""))) - (cons ?L (if online-p "on-line" (if lp-device "off-line" "unknown"))) - (cons ?s (if seconds (number-to-string seconds) "N/A")) - (cons ?m (if minutes (number-to-string minutes) "N/A")) - (cons ?h (if hours (number-to-string hours) "N/A")) - (cons ?t (or remaining-time "N/A"))))) + (cons ?r (if total-rate (format "%.1f W" total-rate) "N/A")) + (cons ?L (cond ((eq line-status 'online) "on-line") + (line-status "off-line") + ("N/A"))) + (cons ?B (format "%s" (or state 'unknown))) + (cons ?b (cond ((eq state 'charging) "+") + ((and load (< load battery-load-critical)) "!") + ((and load (< load battery-load-low)) "-") + (""))) + ;; Zero usually means unknown. + (cons ?d (if (and temperature (/= temperature 0)) + (format "%.0f" temperature) + "N/A")) + (cons ?p (if load (format "%.0f" load) "N/A")) + (cons ?s (if secs (number-to-string secs) "N/A")) + (cons ?m (if mins (number-to-string mins) "N/A")) + (cons ?h (if hrs (number-to-string hrs) "N/A")) + (cons ?t (if hrs (format "%d:%02d" hrs (% mins 60)) "N/A"))))) ;;; `apm' interface for BSD. diff --git a/test/lisp/battery-tests.el b/test/lisp/battery-tests.el index 052ae49a80..8806047069 100644 --- a/test/lisp/battery-tests.el +++ b/test/lisp/battery-tests.el @@ -48,6 +48,69 @@ battery-linux-proc-apm-regexp (should (equal (match-string 8 str) "1792")) (should (equal (match-string 9 str) "min")))) +(ert-deftest battery-upower-state () + "Test `battery--upower-state'." + ;; Charging. + (dolist (total '(nil charging discharging empty fully-charged + pending-charge pending-discharge)) + (should (eq (battery--upower-state '(("State" . 1)) total) 'charging))) + (dolist (state '(nil 0 1 2 3 4 5 6)) + (should (eq (battery--upower-state `(("State" . ,state)) 'charging) + 'charging))) + ;; Discharging. + (dolist (total '(nil discharging empty fully-charged + pending-charge pending-discharge)) + (should (eq (battery--upower-state '(("State" . 2)) total) 'discharging))) + (dolist (state '(nil 0 2 3 4 5 6)) + (should (eq (battery--upower-state `(("State" . ,state)) 'discharging) + 'discharging))) + ;; Pending charge. + (dolist (total '(nil empty fully-charged pending-charge pending-discharge)) + (should (eq (battery--upower-state '(("State" . 5)) total) + 'pending-charge))) + (dolist (state '(nil 0 3 4 5 6)) + (should (eq (battery--upower-state `(("State" . ,state)) 'pending-charge) + 'pending-charge))) + ;; Pending discharge. + (dolist (total '(nil empty fully-charged pending-discharge)) + (should (eq (battery--upower-state '(("State" . 6)) total) + 'pending-discharge))) + (dolist (state '(nil 0 3 4 6)) + (should (eq (battery--upower-state `(("State" . ,state)) 'pending-discharge) + 'pending-discharge))) + ;; Empty. + (dolist (total '(nil empty)) + (should (eq (battery--upower-state '(("State" . 3)) total) 'empty))) + (dolist (state '(nil 0 3)) + (should (eq (battery--upower-state `(("State" . ,state)) 'empty) 'empty))) + ;; Fully charged. + (dolist (total '(nil fully-charged)) + (should (eq (battery--upower-state '(("State" . 4)) total) 'fully-charged))) + (dolist (state '(nil 0 4)) + (should (eq (battery--upower-state `(("State" . ,state)) 'fully-charged) + 'fully-charged)))) + +(ert-deftest battery-upower-state-unknown () + "Test `battery--upower-state' with unknown states." + ;; Unknown running total retains new state. + (should-not (battery--upower-state () nil)) + (should-not (battery--upower-state '(("State" . state)) nil)) + (should-not (battery--upower-state '(("State" . 0)) nil)) + (should (eq (battery--upower-state '(("State" . 1)) nil) 'charging)) + (should (eq (battery--upower-state '(("State" . 2)) nil) 'discharging)) + (should (eq (battery--upower-state '(("State" . 3)) nil) 'empty)) + (should (eq (battery--upower-state '(("State" . 4)) nil) 'fully-charged)) + (should (eq (battery--upower-state '(("State" . 5)) nil) 'pending-charge)) + (should (eq (battery--upower-state '(("State" . 6)) nil) 'pending-discharge)) + ;; Unknown new state retains running total. + (dolist (props '(() (("State" . state)) (("State" . 0)))) + (dolist (total '(nil charging discharging empty fully-charged + pending-charge pending-discharge)) + (should (eq (battery--upower-state props total) total)))) + ;; Conflicting empty and fully-charged. + (should-not (battery--upower-state '(("State" . 3)) 'fully-charged)) + (should-not (battery--upower-state '(("State" . 4)) 'empty))) + (ert-deftest battery-format () "Test `battery-format'." (should (equal (battery-format "" ()) "")) -- 2.26.2 --=-=-= Content-Type: text/plain n --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 11 14:17:48 2020 Received: (at 39491) by debbugs.gnu.org; 11 Jun 2020 18:17:48 +0000 Received: from localhost ([127.0.0.1]:37998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjRlr-0003ts-KE for submit@debbugs.gnu.org; Thu, 11 Jun 2020 14:17:47 -0400 Received: from mout.gmx.net ([212.227.15.19]:47929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjRlp-0003tb-Iy for 39491@debbugs.gnu.org; Thu, 11 Jun 2020 14:17:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1591899454; bh=4EUuuRSTyeckxWsfQUzJZSeCHB9RWGVLcd6LjHiLYvY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=HniMx9QACFmrkOktDEnG6wy9ayXpVjhiAEt9CAx+Kg5ThsIzNmgVo5xsTC5DOani3 hik+Z/Uj9lCIK81zIAFP1BN2xE/E9KnNevOnMnBSeNRZliOTpfbYmQYH43USga3OT5 vRmV1BYVn8boUbaREqvaOHpL4n8fl04gOaS9WbjM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.43.30]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MVeMA-1jK2cE15QC-00RWfI; Thu, 11 Jun 2020 20:17:34 +0200 From: Michael Albinus To: "Basil L. Contovounesios" Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> <83sgfmtzk2.fsf@gnu.org> <87ftb1zja1.fsf@tcd.ie> Date: Thu, 11 Jun 2020 20:17:32 +0200 In-Reply-To: <87ftb1zja1.fsf@tcd.ie> (Basil L. Contovounesios's message of "Thu, 11 Jun 2020 16:58:30 +0100") Message-ID: <87lfkteabn.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:RiSAaYX8SbMxbZG/zKNjju1cT7qYTIfvjIBTKJIvK9uiS+8Gf3m HRMiPAQgrIGGd/c+5c/8U41WLBMNU5ZN7Q+RhtJE0ZJa7LSj2pgYkPI6rP9RhBlbrzRk/wa r3fKpjcZFKTMe3pgkYa8as63LglSWp8zH6/van1wBiiifNL7A6qODKgZk2xhAMEsi7QdSGk zvqSToQL2yDxWFrgCm9cA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:0YH7stJa+ac=:xKmsbQqgrAcjQY7rbB00N5 GYvxqJXnH4VAZQISqcXYL1HjAeJM7QBIR+24r6KpwqXps/z1h4s5t/rdS/zSXlmxBW1nqutnm 0thUFtBQhhkrPtFdoOeBGN6akU8f4jvILUG5EWNwaxvgZohLThoivr+iN5WYZOileCNzWVX5b xZzXBUC4ZVJxPyuf+yWKY6qF5V/+sK5M0eI5PiH32bKahGGUDoilyzRLNZYLv6IMIUpzfHSxf p+ZVeF/dSxu6nYrEwBSy85f5UAsswUeUtYchmN+FAe/zNknsIwJNaJNa5fy9AUL/lSCuIwpZI 9wLHjgHsmEMCnIsRiPbz6WL3opOliWRMYcZc3rkV6racaba9brpc0rgPIt4cbckuhUvv1RxQ0 I/TYupQ/DiArLQ/cmtO7lvnw0CAsuFLLKD2BMynFoVcpQj/Ezcqq/iOQp3zesMTs2J4SSLw6X cYygvxoRgOBXdFyApyeHlwQSSYypBBExQC8WzrBCEnjl5qcxQpik4Y3YhmfID7cXP+h8prjYU BXD2zLey0WFMzB/feg/ACwQRvJPuGbWkX79zn6LtRzBx8MH6IfzISaCERDrz5dNr4HOXZ197M IJ0cn1ZfXAf24Ea/2q+Ibngdds+zqEB3gao+zzj0T3ys2hm2Rh8XwGmCjqsvCV5nA6p+u5TGk uT0dJ9PmtsUjllIXt4zBPh69j2iARlw1jNeyjdSs1UnEFERwimDL/5R6TV2PcBVOZqYHYlzkH CkYlOW5/ie9edYJrwLL5M+YJ0C/O+WMipFgd4sUo7bFxHN94XPUg/fY3r/uZKnguqojNOANgI UOCEzfJHMqSdzEZpuRqRMgtE3MqYx9sznAXYTv+ccNYR/yBhkfccaXy/orFi3lItgayT0t2r2 pJionwn5RQfDNgUme8nNU1T/huS5N7zZFxnPBV8bLAwaNmvO7z8/NZ+319weA+zN22BB47afO I6YlLkIi0/1iOy6+aeJA5E7JWvkMc2+TqMwUZTBuglXuPo6obHuSPAkpgnYYsqD3KBvjP2zmj WTOtZBZdkNsSPd6zDmoDtpT6bMn3OV1C1LPK2rQdYT958IdvSBayFakujIh8qmLSwKDvHubrm q9keExzgmLbuRIzJEF6/TaTUeyhwg4F7KfpMt1UQsjqqtGinID+O9EtGgJbH74lghJSp0Qnng pv2GT39il074f1reOF7B0Zl/tVZetq0n5ncuuOJxuxn0CFi1sw8oAXBMvlkPPOBEXCTo7EchR +FBeiX2/0qu1YI8CR Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, lg.zevlg@gmail.com, Richard Stallman , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "Basil L. Contovounesios" writes: > --- a/test/lisp/battery-tests.el > +++ b/test/lisp/battery-tests.el > @@ -48,6 +48,69 @@ battery-linux-proc-apm-regexp > (should (equal (match-string 8 str) "1792")) > (should (equal (match-string 9 str) "min")))) > > +(ert-deftest battery-upower-state () > +(ert-deftest battery-upower-state-unknown () Shouldn't theses tests be skipped, unless battery-upower is used? Something like (skip-unless (eq battery-status-function #'battery-upower)) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 11 15:41:20 2020 Received: (at 39491) by debbugs.gnu.org; 11 Jun 2020 19:41:20 +0000 Received: from localhost ([127.0.0.1]:38139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjT4i-00060c-Aj for submit@debbugs.gnu.org; Thu, 11 Jun 2020 15:41:20 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:45563) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjT4f-00060O-UD for 39491@debbugs.gnu.org; Thu, 11 Jun 2020 15:41:18 -0400 Received: by mail-wr1-f54.google.com with SMTP id c3so7373958wru.12 for <39491@debbugs.gnu.org>; Thu, 11 Jun 2020 12:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=HONS4VkaaAS1a6CZKg5EB73khICGNY3Tvba7GP3FBrk=; b=guqZGPYm12iBDaiibMIk6YBYmsJtNNI8g3w9QCF/A2DV4Kq6hhr23Cdth1ruqB3r5D zkWtmi9t+jWtq5LhtIN8yxHOwI3fW16Td4BU1Ir8QGC8M9bKJOMlxYBWYN9rHu/sYgfs UbGU2Wl7B2c0DcFFT8oKqwE2xRWTSVda0fubei/diBYosfazI3RldZTNuY3HqxsmXysT CS0nNKDJgvlRiOEHdODopSaTquNk/8ICaCvZSpcn8ja+fS2uyycUn1L3IBtGGAdxuOGt ukUV2aENf8V/eqne9z2JiiWt48rHFN07LdEoaFOzdUMIOdQHrCAnqJE8thwwcVs2Y1us W7VA== 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=HONS4VkaaAS1a6CZKg5EB73khICGNY3Tvba7GP3FBrk=; b=okTZdc4jMmKwRS5mCc2iECKyg+Yf9Qt6taEuPBVG0DzisCWlItrjPw80GUZTJaXjQH ICIRo8HysGVtAALkNB7y4PHHljeQFPKHG7Vwqh+mNHojO5GrJgUljh1ex2/0cfdutXIE 35MNlWy7rcUbhnZtpCfS44gsfu3/D/PS8YjH14TUKzeh0NGUSnaz0xmC+P8TdNtGTaia jCPhFh/lnJ8xrz81QdWhB1tmbEA2+JUHvZN9rcbTckDs76zKF0WpiwDZCgyDIJBayTtz GnnsqXdXOLebEJijINwbAZBpMWdOV7o5SZYMnTqjNd5PnLP5Viygw4QmKtnSQLwTbp2c l/+w== X-Gm-Message-State: AOAM531/1XchNMz+xy1CDh2wlWQPU0dhgbirB9piqHL59koCJ/02kLHR adnz0uN4chLcDGxMnDnoJa+HbQ== X-Google-Smtp-Source: ABdhPJynyCMxk4Uu3Rlk/A1FI0QoCooNQHELZOkSlAdF0Wf9RXnM+6yWP7IQWmQqBavtpanjSNFdBw== X-Received: by 2002:a5d:6288:: with SMTP id k8mr10544505wru.94.1591904472073; Thu, 11 Jun 2020 12:41:12 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id q1sm5288390wmc.12.2020.06.11.12.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 12:41:08 -0700 (PDT) From: "Basil L. Contovounesios" To: Michael Albinus Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> <83sgfmtzk2.fsf@gnu.org> <87ftb1zja1.fsf@tcd.ie> <87lfkteabn.fsf@gmx.de> Date: Thu, 11 Jun 2020 20:41:04 +0100 In-Reply-To: <87lfkteabn.fsf@gmx.de> (Michael Albinus's message of "Thu, 11 Jun 2020 20:17:32 +0200") Message-ID: <87wo4dcrvz.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39491 Cc: 39491@debbugs.gnu.org, lg.zevlg@gmail.com, Richard Stallman , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > "Basil L. Contovounesios" writes: > >> --- a/test/lisp/battery-tests.el >> +++ b/test/lisp/battery-tests.el >> @@ -48,6 +48,69 @@ battery-linux-proc-apm-regexp >> (should (equal (match-string 8 str) "1792")) >> (should (equal (match-string 9 str) "min")))) >> >> +(ert-deftest battery-upower-state () >> +(ert-deftest battery-upower-state-unknown () > > Shouldn't theses tests be skipped, unless battery-upower is used? No, because they test a pure function that depends only on its arguments. -- Basil From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 11:48:49 2020 Received: (at control) by debbugs.gnu.org; 18 Jun 2020 15:48:49 +0000 Received: from localhost ([127.0.0.1]:54163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlwmX-0007Kc-H6 for submit@debbugs.gnu.org; Thu, 18 Jun 2020 11:48:49 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:40731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlwmV-0007KH-CP for control@debbugs.gnu.org; Thu, 18 Jun 2020 11:48:48 -0400 Received: by mail-qt1-f178.google.com with SMTP id i16so4782733qtr.7 for ; Thu, 18 Jun 2020 08:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=e0PjU/1pIUg6Ph+5kwdzlvhEZuufXwG0CpaytuuJAvs=; b=PX2Sh4BBRDCoHSZl7zGxs+Iu2bNYilIBgicBiQ8ObnhvmancdgS31WK8EOFUqJbZ42 5qdabK2p09JofvdZ6DTiqCJchWim7vmF1r6I5D1Jo8zNycxWu3V6ERop6NrBBDy62ovg DQXoT7ug6HwED+73bYvN8lk67W/1KlK1IuzsDNb3u62lAiEuOwPnlnFpXySMFjgHDCD9 gv1MfAM1hPXGaMsYfqqgS36dLfeDEsQZVUfQ7MwVuiPyS3CLLpQV6dcNZzXNN3Ri2UtD qQ/SDCJyhvln8HH75bv8dr2HYdUDKPJg9L5ZjNPpUnvUJAgnCmASIhbNQ34XN3JpcI0k 6bEQ== 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=e0PjU/1pIUg6Ph+5kwdzlvhEZuufXwG0CpaytuuJAvs=; b=X5FnqCjIqqg+L2Qbv+pc/EUOixwB4R8MtlbQNgwhVif3yztpR7j9vTjL2qbqoXz8W3 0NdvoUTrbCEHpwVzhYYbhIHTp0YUMC1h9Wd5gKq2vpctWh+FoKndYijMvXLjnhdEmTRP FUepGWx1pDgZsmvGOjlUuA8dSBETA/CUHms+1DiXOtFZAJI/nEUL1xB8/QnlzG05YK6Y Sh5WXUbdaBdDdVsoNjN2w4NBqzr7UOgHVzrLe6+UUxUcXWxjHUP/PEUT9y66iRdaytDz 6Us7EF/QbL2Lk0Q6rXfGlxtXZfitweQ/9iXZWvIGLpATEWThpfZ0X9T6tap9zS40wM0R GYeQ== X-Gm-Message-State: AOAM532OV42dQgAekdrnXankO8br11Gn6Usj5sFyIUGg2r4tMUKv4L2j btoxsXgTZIAQRdNLA2670dQwqQ== X-Google-Smtp-Source: ABdhPJwh0VkpTN6jqZtsNGhEkuXnoJht8q0w7HZrTcJ2VE64AkDlln8isVk+s3IHyOWEWZvj280gOQ== X-Received: by 2002:ac8:708c:: with SMTP id y12mr5047305qto.235.1592495321585; Thu, 18 Jun 2020 08:48:41 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id s15sm3787380qtc.95.2020.06.18.08.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 08:48:40 -0700 (PDT) From: "Basil L. Contovounesios" To: Richard Stallman Subject: Re: bug#39491: 28.0.50; two bugs in battery-upower References: <83mu9tedsh.fsf@gnu.org> <5A4C6466-FB4B-484F-BF29-91762AFB46F3@gmail.com> <83wo625mo6.fsf@gnu.org> <83mu6y5gti.fsf@gnu.org> <83y2peu0lf.fsf@gnu.org> <83sgfmtzk2.fsf@gnu.org> <87ftb1zja1.fsf@tcd.ie> Date: Thu, 18 Jun 2020 16:48:38 +0100 In-Reply-To: <87ftb1zja1.fsf@tcd.ie> (Basil L. Contovounesios's message of "Thu, 11 Jun 2020 16:58:30 +0100") Message-ID: <87lfkkml2h.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 39491-done@debbugs.gnu.org, lg.zevlg@gmail.com, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 39491 fixed close 39491 28.1 quit "Basil L. Contovounesios" writes: > The attached patch fixes this regression and adds support for both > multiple power sources and D-Bus status change notifications in > battery-upower. Pushed to master and boldly closing. Improve battery.el UPower support 453d30d92c 2020-06-18 13:11:17 +0100 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=453d30d92cbf940567869d4705c1fcfe57725825 -- Basil From unknown Thu Sep 11 12:42:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 17 Jul 2020 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator