From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Omar Polo Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] new package: sndio.el Date: Sun, 14 Nov 2021 19:27:55 +0100 Message-ID: <87mtm6vb5a.fsf@omarpolo.com> References: <87tugfw1yg.fsf@omarpolo.com> <87bl2meh4h.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29665"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.9; emacs 29.0.50 Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 14 19:36:41 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmKMq-0007TR-Ls for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 19:36:40 +0100 Original-Received: from localhost ([::1]:52910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmKMp-00046u-IX for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 13:36:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmKLV-0002UK-Pa for emacs-devel@gnu.org; Sun, 14 Nov 2021 13:35:17 -0500 Original-Received: from mail.omarpolo.com ([144.91.116.244]:59465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmKLS-0000Yu-3m for emacs-devel@gnu.org; Sun, 14 Nov 2021 13:35:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omarpolo.com; s=20200327; t=1636914905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=o4q1MqsVcicnGOgyTCfNuMfB1clJnnZuGmxUjWb+FtA=; b=C4ViBmpeM1RGL5okGPYntTWkv3Tk0Pt79Qq8cx2zui8v4uaC3f0xOa5L8UNOMdEWH0BVHG yFkLSusTq3nIUc47YMEdpQeLx9fPvlINBYwWjx0vLwud3A1BQUT+8qIr/kOeHNdG8Ie6uJ 8kmc3ufk63EyRch+cECKfWDWfdHADRo= Original-Received: from localhost (host-213-45-155-59.retail.telecomitalia.it [213.45.155.59]) by mail.omarpolo.com (OpenSMTPD) with ESMTPSA id be382d34 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 14 Nov 2021 19:35:04 +0100 (CET) Original-Received: from venera (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 3c9b7fc2; Sun, 14 Nov 2021 19:34:57 +0100 (CET) In-reply-to: <87bl2meh4h.fsf@posteo.net> Received-SPF: pass client-ip=144.91.116.244; envelope-from=op@omarpolo.com; helo=mail.omarpolo.com 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_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279438 Archived-At: Philip Kaludercic writes: > Omar Polo writes: > >> Hello, >> >> Some time ago to scratch an itch I wrote sndio.el, a package to interact >> with the OpenBSD' audio daemon sndiod(8). Recently, I've enhanced it a >> bit and added an hydra-like window for a quick interaction and thought >> it may be useful to others, so here's the submission. It should work >> outside of OpenBSD too provided that you're running sndio and have >> sndioctl(1), but I never tried. > > From what I see, if I were to download and run the package on a GNU > System without sndio, there wouldn't be any clear error message > indicating what went wrong, just an error message indicating that > sndioctl has failed, right? (this is just from reading and using faulty > mental evaluation). If the package is to be added to GNU ELPA, you > should probably add a explicit error message (perhaps even at compile > time) to clarify what is missing, and that the package isn't mean to > work on this system. Yes, as things are now if sndio-sndioctl-cmd is not found `sndio-update' fails with a generic error due to process-file not finding the executable. Would something like this be a viable option? --- sndio.el +++ sndio.el @@ -67,6 +67,8 @@ (defun sndio-update () "Update the current sndio buffer." (interactive) + (unless (executable-find sndio-sndioctl-cmd) + (error "Can't find executable %s" sndio-sndioctl-cmd)) (when (derived-mode-p 'sndio-mode) (let ((inhibit-read-only t)) (erase-buffer) (sndio-update is the first function called in both the entrypoints of the package, so it seems a good place for such a check) >> There's a small gif on the repo that shows sndio.el in action: >> >> https://git.omarpolo.com/sndio.el/about/ >> >> I was able to fetch and checkout the source in the elpa repository using >> the attached diff. > > The source looks good, I can add it to GNU ELPA if there are no objections. > >> Thanks, >> >> Omar Polo >> >> diff --git a/elpa-packages b/elpa-packages >> index efa53e3e40..2e21c9bffb 100644 >> --- a/elpa-packages >> +++ b/elpa-packages >> @@ -438,6 +438,7 @@ >> ("smalltalk-mode" :url nil) ;; Was "git://git.sv.gnu.org/smalltalk" >> ("smart-yank" :url nil) >> ("sml-mode" :url nil) >> + ("sndio" :url "https://git.omarpolo.com/sndio.el") >> ("so-long" :core "lisp/so-long.el") >> ("soap-client" :core ("lisp/net/soap-client.el" "lisp/net/soap-inspect.el")) >> ("sokoban" :url nil) >> >>