From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 05 10:52:30 2022 Received: (at submit) by debbugs.gnu.org; 5 Oct 2022 14:52:30 +0000 Received: from localhost ([127.0.0.1]:57808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og5l7-0002gN-E8 for submit@debbugs.gnu.org; Wed, 05 Oct 2022 10:52:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:39030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og5l4-0002gF-Gp for submit@debbugs.gnu.org; Wed, 05 Oct 2022 10:52:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og5l4-00022e-98 for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 10:52:26 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:30831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og5l0-00070Z-Np for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 10:52:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=T5GILs6Em+2W4SGb 8a5n+fkGKlSv5rx5C+ec7cZl4GI=; h=date:subject:to:from; d=ledu-giraud.fr; b=u94JtdOjPE3RlIfgevWxWL3UW8utS++sLqS+LiyGnb/pwU4xEt suMSp1lC0dUn5J11jd2OEeRxx2QYxiP5vLHC3UiLfGHpUYOE+bs/ZwCXzd+IMHPBolUM/w ++HzCD4IS64q4NwS3DX5EAsO/E08BX/2mFSr7Z77Ct8penPkjdrCSXR10BkfRfnIer/lWw Vps//BhgB6uvAeL8HjPEHAPHwP0dIFLnRODupmgj5Fn6dK+zbIpsZvZ2SsYCJApblxuwjP UJQVmi9p6ylajMMEJet5IYkTGb/pcQM6r18OiULye0nCKmeiD05W+1FcSrmaecMlzzvNIU RtCrgmEXxjbw== Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id c55543e6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 5 Oct 2022 16:52:20 +0200 (CEST) From: Manuel Giraud To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Fix battery mode over TRAMP on *BSD Date: Wed, 05 Oct 2022 16:52:19 +0200 Message-ID: <87ilkyfhlo.fsf@elite.giraud> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Hi, I'm using OpenBSD on a laptop. I'm also using battery-mode. Whenever, I'm accessing another machine over TRAMP, the string displayed by battery-mode become useless in this buffer. The attached patch fixes this issue. AFAIU, shell-command-to-string is using the current directory of the buffer and fails to find a usable "/usr/sbin/apm" on a remote Linux, for instance. So I'm using call-process that does call the local "/usr/sbin/apm". Best regards, --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-BSD-battery-mode-over-TRAMP.patch >From e0a4eaa69171378664e28e8ab30a0e83e09ce19c Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Wed, 5 Oct 2022 15:59:14 +0200 Subject: [PATCH] Fix BSD battery mode over TRAMP * lisp/battery.el (call-process-to-string): Simple wrapper to `call-process' that outputs to a string. (battery-bsd-apm): Use it instead of `shell-command-to-string'. --- lisp/battery.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/battery.el b/lisp/battery.el index 72b3dfdae7..0fae92ab98 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -913,6 +913,10 @@ battery-upower ;;; `apm' interface for BSD. +(defun call-process-to-string (program &rest args) + (with-output-to-string + (with-current-buffer standard-output + (apply #'call-process program nil t nil args)))) (defun battery-bsd-apm () "Get APM status information from BSD apm binary. @@ -929,13 +933,13 @@ battery-bsd-apm %t Remaining time (to charge or discharge) in the form `h:min'" (let* ((os-name (car (split-string ;; FIXME: Can't we use something like `system-type'? - (shell-command-to-string "/usr/bin/uname")))) + (call-process-to-string "/usr/bin/uname")))) (apm-flag (pcase os-name ("OpenBSD" "mP") ("FreeBSD" "st") (_ "ms"))) - (apm-cmd (concat "/usr/sbin/apm -abl" apm-flag)) - (apm-output (split-string (shell-command-to-string apm-cmd))) + (apm-args (concat "-abl" apm-flag)) + (apm-output (split-string (call-process-to-string "/usr/sbin/apm" apm-args))) (indices (pcase os-name ;; FreeBSD's manpage documents that multiple ;; outputs are ordered by "the order in which -- 2.37.3 --=-=-= Content-Type: text/plain In GNU Emacs 29.0.50 (build 2, x86_64-unknown-openbsd7.2, cairo version 1.17.6) of 2022-10-05 built on elite.giraud Repository revision: 6430c4c44f3cbfdaa702302017afbc5d442960f3 Repository branch: mgi/battery Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: OpenBSD elite.giraud 7.2 GENERIC.MP#739 amd64 Configured using: 'configure --prefix=/home/manuel/emacs --bindir=/home/manuel/bin --with-x-toolkit=no --without-sound --without-compress-install CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBXML2 MODULES NOTIFY KQUEUE OLDXMENU PDUMPER PNG RSVG SQLITE3 THREADS TIFF WEBP X11 XDBE XIM XINPUT2 XPM ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Group Minor modes in effect: gnus-topic-mode: t global-git-commit-mode: t magit-auto-revert-mode: t icomplete-mode: t display-time-mode: t display-battery-mode: t gnus-undo-mode: t shell-dirtrack-mode: t global-so-long-mode: t repeat-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/manuel/.emacs.d/elpa/transient-20220918.2101/transient hides /home/manuel/emacs/share/emacs/29.0.50/lisp/transient Features: (shadow emacsbug gnus-fun shr-color mailalias sort gnus-cite mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check gnus-async gnus-bcklg gnus-draft gnus-ml gnus-topic mm-archive url-http url-gw url-cache url-auth qp utf-7 imap rfc2104 nndoc nndraft nnmh network-stream nsm nnfolder nnml gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache nnrss mm-url w3m doc-view jka-compr image-mode exif w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-favicon w3m-image tab-line w3m-proc w3m-util magit-patch magit-extras face-remap magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff git-commit log-edit pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor magit-mode transient magit-git magit-base magit-section dash compat-27 compat-26 compat compat-macs shortdoc vc-hg vc-bzr sh-script smie executable dabbrev cl-print help-fns radix-tree gnus-dired tramp-sh tramp-cache time-stamp pulse misearch multi-isearch vc-git diff-mode vc-dispatcher vc-svn bug-reference paredit edmacro icomplete time battery exwm-randr xcb-randr exwm-config exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types xcb-debug kmacro server stimmung-themes modus-operandi-theme modus-themes ytdious osm mingus libmpdee reporter edebug debug backtrace transmission diary-lib diary-loaddefs color calc-bin calc-ext calc calc-loaddefs rect calc-macs w3m-load mu4e mu4e-org mu4e-main mu4e-view mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders mu4e-server mu4e-context mu4e-vars mu4e-helpers mu4e-config bookmark ido supercite regi ebdb-message ebdb-gnus gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail yank-media puny rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums gmm-utils mailheader gnus-win gnus nnheader gnus-util mail-utils range mm-util mail-prsvr ebdb-mua ebdb-com crm ebdb-format ebdb mailabbrev eieio-opt speedbar ezimage dframe eieio-base pcase timezone org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs visual-basic-mode cl web-mode disp-table erlang-start smart-tabs-mode skeleton cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs slime-asdf grep slime-tramp tramp tramp-loaddefs trampver tramp-integration cus-edit cus-load wid-edit files-x tramp-compat rx shell pcomplete parse-time iso8601 time-date ls-lisp format-spec slime-fancy slime-indentation slime-cl-indent cl-indent slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references slime-compiler-notes-tree slime-scratch slime-presentations advice bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc slime-repl elp slime-parse slime derived cl-extra help-mode lisp-mnt gud apropos compile text-property-search etags fileloop generator xref project arc-mode archive-mode noutline outline icons pp comint ansi-osc ansi-color ring hyperspec thingatpt slime-autoloads dired-aux dired-x dired dired-loaddefs so-long notifications dbus xml repeat easy-mmode auctex-autoloads tex-site boxquote-autoloads debbugs-autoloads hyperbole-autoloads magit-autoloads git-commit-autoloads magit-section-autoloads dash-autoloads paredit-autoloads rust-mode-autoloads stimmung-themes-autoloads transient-autoloads with-editor-autoloads info compat-autoloads ytdious-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile cconv url-vars cl-loaddefs cl-lib rmc iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind kqueue lcms2 dynamic-setting system-font-setting font-render-setting cairo xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 1167279 633143) (symbols 48 63271 58) (strings 32 303254 61151) (string-bytes 1 9534116) (vectors 16 184075) (vector-slots 8 3124174 86979) (floats 8 683 436) (intervals 56 11854 1676) (buffers 1000 42)) -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 05 16:24:52 2022 Received: (at 58307) by debbugs.gnu.org; 5 Oct 2022 20:24:52 +0000 Received: from localhost ([127.0.0.1]:58177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogAwl-0002pc-M7 for submit@debbugs.gnu.org; Wed, 05 Oct 2022 16:24:51 -0400 Received: from mout.gmx.net ([212.227.17.20]:53433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogAwf-0002pJ-QS for 58307@debbugs.gnu.org; Wed, 05 Oct 2022 16:24:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1665001476; bh=HDR9nSfX75wqGcDaqK/HvPaKM1G+yqLV9BI2QuL4kPs=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=ccM/XMedCtsSHzAsDbciDw8SMN+C1vbCOKFYOTam13PrJNdYhrdm3tc/c5wYIiVI6 nR4BwMq9/tlrt515ORiPFGANW93alcuwxT3IAgkqQh2IGgHqzBgUAcQY6fNVxd1slI nX1gYotgBQN8rC6atl3H4UAmp7ZkD4RBcPCGPRm0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.148.171]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MG9g4-1oPegx2sUm-00GWD8; Wed, 05 Oct 2022 22:24:36 +0200 From: Michael Albinus To: Manuel Giraud Subject: Re: bug#58307: 29.0.50; Fix battery mode over TRAMP on *BSD In-Reply-To: <87ilkyfhlo.fsf@elite.giraud> (Manuel Giraud's message of "Wed, 05 Oct 2022 16:52:19 +0200") References: <87ilkyfhlo.fsf@elite.giraud> Date: Wed, 05 Oct 2022 22:24:32 +0200 Message-ID: <877d1ekohr.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:j3+Odujx+GbDphwrHeLjgPJhycP9C3xTmaWekk/nkequFfjffg7 LN6iR99xEyAtVTfmhEM/9xpdH0Wl7l70pNs6AaVEwyhZX+hxzhs01ZlkXLW/Emg4uQjbNnq zrBSTny5xD4I34ZMSsxbrjORcEQi8Wwlo09kgOiFuF5MHUqq4QVbhtK2TJJwLgY0WbYX9L9 9Ht3QwFFOLIkzXVPL2y3w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:EvKFga4T0O8=:Hzp/Rb3Sy2QRm0scBJc7I4 Q/ehd/dUqxHQvAp/eHi1eBihbPd3KMDiIOFKiJfRIWdZFU9ffWeVXABJxO0ekPa598/RvuKLi xOiHvO6WGRl2OGoN2/yVy9QDVO4mzlklQRIDGeoKmFYjUHT0s3u4g7MZPxk5GBZZEr1yd9Xb3 VEwctQ+pkSg943EY49Y0OZGYWoR9qIuhMi3IQMMk19FNX/RrZ22FGUo7CwwRKoLPzBmjjJYvU 8t7R4CbwqUZxdQ868mDKW9va4ojxj6iyhWP/9sdSGku2v2kuZNzYLTvemZDjnMYb37BGqf2Xz clQVOZOrgZINpvs3CyU4MDe3yk0DYYXwsEfGcsvNiMoTceeKqwMbXAGSA8Cv3cUvBS6cIMss9 tcHf7UHEWnd5hMEuHGHSmPPIJxhkXndlcOg0V+qsocRFX5bOe9egi97vXezBBihfeLyWcZgz1 ArkmaO5xYVIsVgaZOut0SI4dfAwf5l4cZLkvLGNN5jkcJQGMBelPkBzKuWfiZQr7EfRy4cP5j ZZKRvFczr2PXMls1MSjfC9ALVJRiXygiurM2wWYvi5UAp5a+g5kr4FldpJvUXmOEZDk1ETQk7 E8VLW5NWpPVxjBVJjuPexcTkprv++Eb/m/Xcq8tmA2E0HcZVKpsCx0015ETv3qiZmBa7tcQ+s lA/GecRVI4oLZRBhTkFaTQmivvJlfECmxAIo5yFloVdvoF8fNtyO80rj4iP3rKjX/o5m8YNtM 5y8bD+T7ah2/xltEnNQsOE2LDw0+ENkvp9zHNmu0TZMu9x4TlMVl5hnGOYH/KW0iMTXI6rurh EDjGZK913pS9Bwle7NDtyCpzBpaQb0/ovMELrZ9SzN5T6FTJ1gDKRj/T9Uoi0v2VnNF68Gfgu R73Us+T2vWweBj5PDa7YW3JERhqfHGDn+Uqxyhyj4Y3lGnY1aSCmyAEBw14X2OSQW5L40so8O yyIH8cDDpRp3Ed+olZTu4dAxrJm41VrR5NjA25OmWJmurJ6vQ350FgWRNY0z9wNcz3mHVlmbR O5s+0t/KjjpP/4P9x1sL581NlOp9VwONf7t0bNT7wwMtUztVrBqXkLylBUSOwSYAi+fIkCLje 09e2O1LCeVqYbdPDE0dVozInlQo0fzXyeJuX/5QL+kKksd0Arc0VImqpsB7vi4gX55tVkERWS mtWPkSrVM4TMfSIA928YEESm5v6ehKOY5L3YGZP4sDvBYW320opVTXcYEgmgo92AT73D2HDFV 5M3k/5M4mYtJD44t3X88orBIMAKXZA+qVkj7uDv6mMbE6axRlv6mxXqBbpaJ3q0lA+/utTRz5 wIdvxYMWK2B2aqiHGl9xonfttTegFL0NKo+psKrpTvnmQ3HW8ZT0CKjJNHDoJG4S7CFjnz8a5 wGPxG9qAxZDe9Ohc9tvfAZo4NSg1JC57t/lztBdgX8D9EEalWEwyrFAL4RGxd+l14A1lXa1YW ZuwqAmnZc+azj/GMSPuXdUNhqpG0cmM2wGpACVV5/gblUFa9Jcln0MSyyHG82R5FeMwzJbQbS L8kOyiJZ4OLLLf+IPgAAKcaxh9pupwNjMTn2RqdMlujB9 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58307 Cc: 58307@debbugs.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.7 (-) Manuel Giraud writes: > Hi, Hi Manual, > I'm using OpenBSD on a laptop. I'm also using battery-mode. Whenever, > I'm accessing another machine over TRAMP, the string displayed by > battery-mode become useless in this buffer. > > The attached patch fixes this issue. AFAIU, shell-command-to-string is > using the current directory of the buffer and fails to find a usable > "/usr/sbin/apm" on a remote Linux, for instance. So I'm using > call-process that does call the local "/usr/sbin/apm". The patch LGTM. There's one point: you have called your helper function `call-process-to-string'. This looks like a general function, which moght confuse users. Could you rename it to something like `battery--call-process-to-string'? Also a comment might be helpful explaining the problem. > Best regards, Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 05 18:51:45 2022 Received: (at 58307) by debbugs.gnu.org; 5 Oct 2022 22:51:45 +0000 Received: from localhost ([127.0.0.1]:58307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogDEv-0000Gl-9p for submit@debbugs.gnu.org; Wed, 05 Oct 2022 18:51:45 -0400 Received: from mail-oi1-f178.google.com ([209.85.167.178]:46071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogDEr-0000GX-Gg for 58307@debbugs.gnu.org; Wed, 05 Oct 2022 18:51:42 -0400 Received: by mail-oi1-f178.google.com with SMTP id o64so134688oib.12 for <58307@debbugs.gnu.org>; Wed, 05 Oct 2022 15:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date; bh=ds1Zh9ql2rEMAuurCeqNCO8X0KZXECUzl6a7CplS554=; b=RpHAuvSv+p4rq7P3HeLomouXnK2wRO5oWSXtf0OEXrlmxrVzgFbyAUsSjMKWdWe7mB GQW7QQ3JFc8WfdiveNkUscHZzd/gkbbKs8R/zoYtWG92V4x3w9S2XcaOLD4fvLe7U3io ZpsXOujoZVu7b2bnzEuXHnPzalJXqXNRZ594KNyjkvFQTWqXtCYXiWrskSU/uAMkRR68 0SGuUYRkuuxwCInch0gKbmxHB93CUrlZN0Fchl+GQt2rREt/VmHsjUq/jcvGGh/cY4E5 jk29v/EGSiqZFreqyw7Jf4eDrImcev/gy/SG3kU2GQR5tqFyE4RqheoLIAIuLgKsJ6Cw RRTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date; bh=ds1Zh9ql2rEMAuurCeqNCO8X0KZXECUzl6a7CplS554=; b=bHc5GjaFWvRtBIbmqLQ7k+EFsrAb4gs/83HP08VMVIF+LbCtIskcNPPceqL1za1Uvw KPihlAggGKtwZoS4UYH28CqSrsVdUw+6B2PPquGfJxv+hyMm/MEvlk7NZG5JI+atu/PD i7D8JfsiNLRTyeeRnGecMNTpZqok8QZu6MAcjxa4l4rGsMVyWl+74gcdsA5dXnEkzIN2 ZxQwk1aRyyy5hwYMlC5jCnedPFLig8bjtL00bBnJx73tBz48wh9FoROznI55+nPNmLo1 NwCoubbZys1cUNnujjNVxpndYBV/Rm1EHOCcrZn0HHqw60moEpeuWXy9iFRKkl0coVZG MSyA== X-Gm-Message-State: ACrzQf34MgYW01UpW5AJWOnim2IeqQlU9i40e01P2VMNNyvfmJyS8myM 3MrI1gyC2w4+nFaiPKQzcCIBKTS5v0eYGC9jm7WfiScd X-Google-Smtp-Source: AMsMyM4fb6ZRNmnO71340cWvqoLxaND+mrLPkjehUIlDA1tca6Tb2E9tTmM0YG1hshGWVDXTanZRY0gl8GfnMIv9UYU= X-Received: by 2002:a05:6808:1a09:b0:350:1e6a:e469 with SMTP id bk9-20020a0568081a0900b003501e6ae469mr3306287oib.92.1665010295713; Wed, 05 Oct 2022 15:51:35 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 5 Oct 2022 15:51:35 -0700 From: Stefan Kangas In-Reply-To: <87ilkyfhlo.fsf@elite.giraud> References: <87ilkyfhlo.fsf@elite.giraud> X-Hashcash: 1:20:221005:58307@debbugs.gnu.org::RvgZbvhhkfncDl9Z:3V15 MIME-Version: 1.0 Date: Wed, 5 Oct 2022 15:51:35 -0700 Message-ID: Subject: Re: bug#58307: 29.0.50; Fix battery mode over TRAMP on *BSD To: Manuel Giraud , 58307@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58307 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 (-) Manuel Giraud writes: > @@ -929,13 +933,13 @@ battery-bsd-apm > %t Remaining time (to charge or discharge) in the form `h:min'" > (let* ((os-name (car (split-string > ;; FIXME: Can't we use something like `system-type'? > - (shell-command-to-string "/usr/bin/uname")))) > + (call-process-to-string "/usr/bin/uname")))) Here's a minor nit: I realize that the OpenBSD folks are not likely to move uname to /bin (which is its location on my GNU/Linux system, for example), but I'd probably still prefer (executable-find "uname") to hard coding its location. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 04:17:23 2022 Received: (at 58307) by debbugs.gnu.org; 6 Oct 2022 08:17:24 +0000 Received: from localhost ([127.0.0.1]:58842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogM4J-0008WE-LF for submit@debbugs.gnu.org; Thu, 06 Oct 2022 04:17:23 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:15855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogM4G-0008W3-B8 for 58307@debbugs.gnu.org; Thu, 06 Oct 2022 04:17:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=k/+0rub9zVd1Ulz+ 4tGH9ZAfH5upZIJWQ4qVWUQKCZM=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=AeujLAlOO/DnTLytOFUNf3y57X6VzHxJAAdDPf YsOcvPwzEXvlEzPwSVuQtFH5MYLxx7TDUZ63ppVSMdnXCCdhPPoH/pxuHV+7ltRPh0J93P /ZN3Y8p+q4yH+Q+CeggY0R9QkISepyN6WRPlik6yS47G6nnpaIXa/9nZowysqCytcQO/dJ /8TOWKr7bKRzmjEIM4TsEfQpVdHqdhZ5Ra86bMOYt/g0sy201CkQJKxYRvGSV2AeTx/tYL 5sDGigeih0g4laUuRyqfQ6hUHYqafSjIoIzrCIqSnyDR/6HoJAt0GrrPi1QhMbfr+V2yBV ubXugdFXwp6xmuv25Qq00slA== Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 551e68fb (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 6 Oct 2022 10:17:18 +0200 (CEST) From: Manuel Giraud To: Stefan Kangas Subject: Re: bug#58307: 29.0.50; Fix battery mode over TRAMP on *BSD In-Reply-To: (Stefan Kangas's message of "Wed, 5 Oct 2022 15:51:35 -0700") References: <87ilkyfhlo.fsf@elite.giraud> Date: Thu, 06 Oct 2022 10:17:17 +0200 Message-ID: <87ilkxl62a.fsf@elite.giraud> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58307 Cc: 58307@debbugs.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 (-) --=-=-= Content-Type: text/plain Thank you Stefan and Michael! Here is an updated version. My wording in the comment might not be correct. Best regards. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-BSD-battery-mode-over-TRAMP-bug-58307.patch >From f9b1ee4df0280daab91a103fde4ee3a707d4224c Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Wed, 5 Oct 2022 15:59:14 +0200 Subject: [PATCH] Fix BSD battery mode over TRAMP (bug#58307) * lisp/battery.el (battery--call-process-to-string): Simple wrapper to `call-process' that outputs to a string. (battery-bsd-apm): Use it instead of `shell-command-to-string'. --- lisp/battery.el | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lisp/battery.el b/lisp/battery.el index 72b3dfdae7..4c83f8a7d3 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -914,6 +914,15 @@ battery-upower ;;; `apm' interface for BSD. +;; This function is a wrapper on `call-process' that return the +;; standard output in a string. We are using it instead +;; `shell-command-to-string' because this last one is trying to run +;; PROGRAM on the remote host if the buffer is remote. +(defun battery--call-process-to-string (program &rest args) + (with-output-to-string + (with-current-buffer standard-output + (apply #'call-process program nil t nil args)))) + (defun battery-bsd-apm () "Get APM status information from BSD apm binary. The following %-sequences are provided: @@ -929,13 +938,14 @@ battery-bsd-apm %t Remaining time (to charge or discharge) in the form `h:min'" (let* ((os-name (car (split-string ;; FIXME: Can't we use something like `system-type'? - (shell-command-to-string "/usr/bin/uname")))) + (battery--call-process-to-string (executable-find "uname"))))) (apm-flag (pcase os-name ("OpenBSD" "mP") ("FreeBSD" "st") (_ "ms"))) - (apm-cmd (concat "/usr/sbin/apm -abl" apm-flag)) - (apm-output (split-string (shell-command-to-string apm-cmd))) + (apm-args (concat "-abl" apm-flag)) + (apm-output (split-string + (battery--call-process-to-string (executable-find "apm") apm-args))) (indices (pcase os-name ;; FreeBSD's manpage documents that multiple ;; outputs are ordered by "the order in which -- 2.37.3 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 08:47:20 2022 Received: (at 58307) by debbugs.gnu.org; 6 Oct 2022 12:47:20 +0000 Received: from localhost ([127.0.0.1]:59335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogQHY-0003q3-7s for submit@debbugs.gnu.org; Thu, 06 Oct 2022 08:47:20 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogQHW-0003pn-LX for 58307@debbugs.gnu.org; Thu, 06 Oct 2022 08:47:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=IzvnG3JFCtVP73v/Awz47GBkNnrx3jMrDo/OUOolD8o=; b=DjYldtg3F/OGGeXV/OlY6nZ1EA lGS4YMHuoxS6mAlx1FAxYVl57mC2fCWsVKmERdMCsxGVFyBdKyiujtN9i39l3uLX2AdKTjc0HXrrM zRQ3WCTmli2W98kQcKIOhWD/5iKtggM1rXSfGGR00PRz2OAlfh2BbDq+f5pSQB+MiqAI=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogQHO-0002vh-9g; Thu, 06 Oct 2022 14:47:12 +0200 From: Lars Ingebrigtsen To: Manuel Giraud Subject: Re: bug#58307: 29.0.50; Fix battery mode over TRAMP on *BSD In-Reply-To: <87ilkxl62a.fsf@elite.giraud> (Manuel Giraud's message of "Thu, 06 Oct 2022 10:17:17 +0200") References: <87ilkyfhlo.fsf@elite.giraud> <87ilkxl62a.fsf@elite.giraud> X-Now-Playing: Curve's _Still in a Dream (3)_: "Ten Little Girls" Date: Thu, 06 Oct 2022 14:47:09 +0200 Message-ID: <87k05dxgoi.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Manuel Giraud writes: > Thank you Stefan and Michael! > > Here is an updated version. My wording in the comment might not be > correct. Best regards. Thanks; pushed to Emacs 29 (with some whitespace changes to get the line length under 80). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58307 Cc: Stefan Kangas , 58307@debbugs.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 (---) Manuel Giraud writes: > Thank you Stefan and Michael! > > Here is an updated version. My wording in the comment might not be > correct. Best regards. Thanks; pushed to Emacs 29 (with some whitespace changes to get the line length under 80). From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 08:47:24 2022 Received: (at control) by debbugs.gnu.org; 6 Oct 2022 12:47:24 +0000 Received: from localhost ([127.0.0.1]:59338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogQHc-0003qN-FU for submit@debbugs.gnu.org; Thu, 06 Oct 2022 08:47:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogQHa-0003ps-NT for control@debbugs.gnu.org; Thu, 06 Oct 2022 08:47:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5llVdjHW0lRG9qtFp+yp+0evMqbx3EErVnd6fxELhrI=; b=Q4NUqgayKlq3xoJfyNj/APxKFG /grLi47h4Mx6dMv0S495OFY1mz5OwbJL6QUpKFSFwAFd8A0HZixyhKDLCVtWR7sRo2f+QWu0t6gUj 5ELbRrB8I/wiQ8AYxjEJu07TDVYUomMNLvUIFV6Vro0E3qIE7UzK1idt9HZlL+o5JaL0=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogQHS-0002vr-VH for control@debbugs.gnu.org; Thu, 06 Oct 2022 14:47:16 +0200 Date: Thu, 06 Oct 2022 14:47:14 +0200 Message-Id: <87ilkxxgod.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #58307 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 58307 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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: -3.3 (---) close 58307 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 10:34:52 2022 Received: (at 58307) by debbugs.gnu.org; 6 Oct 2022 14:34:53 +0000 Received: from localhost ([127.0.0.1]:33103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogRxc-0007ec-JF for submit@debbugs.gnu.org; Thu, 06 Oct 2022 10:34:52 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:48733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogRxa-0007eN-8k for 58307@debbugs.gnu.org; Thu, 06 Oct 2022 10:34:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=hQ5s9CYv5rVcPheX 4FXBUtcXpOEm+d27sT3rTWxsGLI=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=sSzM1BjOlNYeRaSy4NAjw2HsbvDKGRE2lzUeX1 GSiuzWUDodWt6p0dp8958KploZsD6xm3YKiHs4OUb8cqxvIah9pmFpmxEJAKJ4Jha5CGdu CmmxfDrQZK9/4ST03e+MKz1xQ5LOhQWAth4l4BsWbw5UxQCky0hE2ADonG2B/GTAydE+53 sXsjxXr4ZY3O34exqAkXXm85+xx3cINax3RMfYMbQREfW27gX+N+9/6nPD8qHtR9+oGXFG LJcORv6RWMePtPMWWxZECNb1aaU79DMz3fnPsfh8P/WCcjmxCVDuamdFB+D/eoSskYMjUV SsObAe2/uauV95dQ5gQRmRLQ== Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 69957180 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 6 Oct 2022 16:34:47 +0200 (CEST) From: Manuel Giraud To: Lars Ingebrigtsen Subject: Re: bug#58307: 29.0.50; Fix battery mode over TRAMP on *BSD In-Reply-To: <87k05dxgoi.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 06 Oct 2022 14:47:09 +0200") References: <87ilkyfhlo.fsf@elite.giraud> <87ilkxl62a.fsf@elite.giraud> <87k05dxgoi.fsf@gnus.org> Date: Thu, 06 Oct 2022 16:34:46 +0200 Message-ID: <878rlt58c9.fsf@elite.giraud> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58307 Cc: Stefan Kangas , 58307@debbugs.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 (-) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Manuel Giraud writes: > >> Thank you Stefan and Michael! >> >> Here is an updated version. My wording in the comment might not be >> correct. Best regards. > > Thanks; pushed to Emacs 29 (with some whitespace changes to get the > line length under 80). Thanks. And here is an update on top of it with the suggestion of Stefan Monnier on the list. FWIW, it still works for me. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-battery.el-battery-bsd-apm-No-need-for-executab.patch >From dbf45fa6677dc6ac71988db39afa54f3527a48b3 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Thu, 6 Oct 2022 16:03:34 +0200 Subject: [PATCH] ; * lisp/battery.el (battery-bsd-apm): No need for `executable-find'. --- lisp/battery.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/battery.el b/lisp/battery.el index a874f0640e..8de80109c6 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -938,16 +938,14 @@ battery-bsd-apm %t Remaining time (to charge or discharge) in the form `h:min'" (let* ((os-name (car (split-string ;; FIXME: Can't we use something like `system-type'? - (battery--call-process-to-string - (executable-find "uname"))))) + (battery--call-process-to-string "uname")))) (apm-flag (pcase os-name ("OpenBSD" "mP") ("FreeBSD" "st") (_ "ms"))) (apm-args (concat "-abl" apm-flag)) (apm-output (split-string - (battery--call-process-to-string - (executable-find "apm") apm-args))) + (battery--call-process-to-string "apm" apm-args))) (indices (pcase os-name ;; FreeBSD's manpage documents that multiple ;; outputs are ordered by "the order in which -- 2.37.3 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 14:20:12 2022 Received: (at 58307-done) by debbugs.gnu.org; 6 Oct 2022 18:20:12 +0000 Received: from localhost ([127.0.0.1]:33520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogVTg-0001Aa-5p for submit@debbugs.gnu.org; Thu, 06 Oct 2022 14:20:12 -0400 Received: from mail-oa1-f42.google.com ([209.85.160.42]:36452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogVTa-00019v-NP for 58307-done@debbugs.gnu.org; Thu, 06 Oct 2022 14:20:10 -0400 Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-13207a86076so3148349fac.3 for <58307-done@debbugs.gnu.org>; Thu, 06 Oct 2022 11:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date; bh=AbHe+rdqUP1myk2ysTx/kwN0TSiBjppozhbHrAdiCjA=; b=MsdKCnlRHsQXGcfiyudIDCnZhASh5VGf+WJ2C9Mg5Z1D50J1P0QgAqTFsmQ26pD8bp 9dbWGRCwe9/3qMhmCtoFEMJ2ZlE9kkW5ySOvjbB5Mj0FpJkVciguAr/vzRSmPE6vxQ+2 +yRsgN4eq5szcl1CmGDWfl420ygFJDb853cP52rjNM1UqCmXH3IUD4pY+h/cmoEpj15O PixJX73Pt0vNDfqlWW2qbPOna1jyEHQaKS70c1vKKQ8EZsQx2HzVPfwPV4tFPJoeFWZG +DRtFfNSvmxVBvDXbHhrmfWWPVWzBj5F/EjIiyQpIE6rRe2xwwFRMJbDrwKFwjw0oAg4 uyKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date; bh=AbHe+rdqUP1myk2ysTx/kwN0TSiBjppozhbHrAdiCjA=; b=ujIa0PA+Y6+HIiB7JDmw0FPfj/TBm/7YKjna14aL4wLc5CFBeeqFXv/WlFpkVCWgiA GasXVKTNSq7DMlQyJxf099kOBGtoFkbv+i+Ve3LHqEGMeSy4PKMab3JyDIcxyw/UdELa YHDpHGQ9rcouUY//ot1i1P+uZCMPiFnkLUK8BEWQswC7PlFsLqMAa2pKR9K6zXrzwm1L zaXP4qokKdVriuzbQ1vU2Nxp52WE3ToKQUcPFQrrquh6GCF9+LgCILX3k+mmHy9K0gaS mMz1Sh1aVL8trLclfFbGFZNFkUFe+VthsHVCxl/dldt86cvbBy33uEGvcnU651ABfDiL 85JQ== X-Gm-Message-State: ACrzQf0jYtVccvb01+sVMT9TWKQUnCBgSe8MvonJCAfqPMquCJzIOq0j UehQ7TpdX2wYMZpi053y6hdXN47iyFQCgW035v2auQjF X-Google-Smtp-Source: AMsMyM5E2knBJ9HU1fRn21e3/XyUX5+aLTGklF4iuldeMxsAWf+Nw5V2OPk+wbrK0ayg7Vjoy0Ukniphn5+dNHsmCnI= X-Received: by 2002:a05:6870:9126:b0:132:b724:e96c with SMTP id o38-20020a056870912600b00132b724e96cmr6226360oae.199.1665080401021; Thu, 06 Oct 2022 11:20:01 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 6 Oct 2022 13:20:00 -0500 From: Stefan Kangas In-Reply-To: <878rlt58c9.fsf@elite.giraud> References: <87ilkyfhlo.fsf@elite.giraud> <87ilkxl62a.fsf@elite.giraud> <87k05dxgoi.fsf@gnus.org> <878rlt58c9.fsf@elite.giraud> X-Hashcash: 1:20:221006:58307-done@debbugs.gnu.org::4bxci39ssnXbI5ls:1xOz MIME-Version: 1.0 Date: Thu, 6 Oct 2022 13:20:00 -0500 Message-ID: Subject: Re: bug#58307: 29.0.50; Fix battery mode over TRAMP on *BSD To: Manuel Giraud , Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58307-done Cc: 58307-done@debbugs.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 (-) Manuel Giraud writes: > Thanks. And here is an update on top of it with the suggestion of > Stefan Monnier on the list. FWIW, it still works for me. Pushed to master. From unknown Sat Aug 09 01:12:20 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, 04 Nov 2022 11:24:05 +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