unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Kangas <stefankangas@gmail.com>, 58307@debbugs.gnu.org
Subject: bug#58307: 29.0.50; Fix battery mode over TRAMP on *BSD
Date: Thu, 06 Oct 2022 16:34:46 +0200	[thread overview]
Message-ID: <878rlt58c9.fsf@elite.giraud> (raw)
In-Reply-To: <87k05dxgoi.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 06 Oct 2022 14:47:09 +0200")

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Manuel Giraud <manuel@ledu-giraud.fr> 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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-battery.el-battery-bsd-apm-No-need-for-executab.patch --]
[-- Type: text/x-patch, Size: 1458 bytes --]

From dbf45fa6677dc6ac71988db39afa54f3527a48b3 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
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


[-- Attachment #3: Type: text/plain, Size: 18 bytes --]

-- 
Manuel Giraud

  reply	other threads:[~2022-10-06 14:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 14:52 bug#58307: 29.0.50; Fix battery mode over TRAMP on *BSD Manuel Giraud
2022-10-05 20:24 ` Michael Albinus
2022-10-05 22:51 ` Stefan Kangas
2022-10-06  8:17   ` Manuel Giraud
2022-10-06 12:47     ` Lars Ingebrigtsen
2022-10-06 14:34       ` Manuel Giraud [this message]
2022-10-06 18:20         ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rlt58c9.fsf@elite.giraud \
    --to=manuel@ledu-giraud.fr \
    --cc=58307@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).