[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] battery.el, upower fixes
From: |
Michael Albinus |
Subject: |
Re: [PATCH] battery.el, upower fixes |
Date: |
Tue, 04 Feb 2020 21:16:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> +(defcustom battery-upower-device
>> + (dbus-ignore-errors
>> + (battery-upower-device-autodetect :battery))
>
> I think there's a possibility that the set of devices changes over time
> (e.g. on my machine (battery-upower-device-list) currently only shows
> battery_BAT0, but I can insert a second battery and I'd expect the list
> to then include a battery_BAT1 as well). So maybe we should instead
> allow a special value (e.g. nil) to mean "autodetect" and then do the
> autodetection dynamically. WDYT?
Usually, D-Bus services send a signal when a device is added/removed. IIUC
https://upower.freedesktop.org/docs/UPower.html,
org.freedesktop.UPower.DeviceAdded and org.freedesktop.UPower.DeviceRemoved
serve for that purpose. So you shall subscribe to those signals and
handle them accordingly.
> Stefan
Best regards, Michael.
- Re: [PATCH] battery.el, upower fixes, Stefan Monnier, 2020/02/04
- Re: [PATCH] battery.el, upower fixes,
Michael Albinus <=
- Re: [PATCH] battery.el, upower fixes, Evgeny Zajcev, 2020/02/04
- Re: [PATCH] battery.el, upower fixes, Stefan Monnier, 2020/02/04
- Re: [PATCH] battery.el, upower fixes, Evgeny Zajcev, 2020/02/04
- Re: [PATCH] battery.el, upower fixes, Stefan Monnier, 2020/02/04
- Re: [PATCH] battery.el, upower fixes, Richard Stallman, 2020/02/05
- Re: [PATCH] battery.el, upower fixes, Eli Zaretskii, 2020/02/06
- Re: [PATCH] battery.el, upower fixes, Evgeny Zajcev, 2020/02/06
- Re: [PATCH] battery.el, upower fixes, Stefan Monnier, 2020/02/06