Giter Site home page Giter Site logo

libmpdee's People

Contributors

andyetitmoves avatar colonelpanic8 avatar dme avatar drzissou avatar mgi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

libmpdee's Issues

Connect over unix domain socket

My first thought was to allow port be nil which would indicate a unix domain socket via (make-network-process :service (expand-file-name host) :family 'local :name "mpd"), but this would most likely not work in all situations; chiefly, when MPD_HOST is set to a file path, and somehow MPD_PORT is set as well, other MPD clients will correctly connect to the unix socket, despite the port being set as an env variable. (Tested with mpc, ncmpc, ncmpcc.)

So maybe the best route will be to test if host is a path (look for the filesystem's path separator) and simply ignore port if a path separator one exists in host.

Below is a PoC patch which I found to be in the right direction, but not really suitable as per what I stated above:

diff --git a/libmpdee.el b/libmpdee.el
index 86158f6..f9a1763 100644
--- a/libmpdee.el
+++ b/libmpdee.el
@@ -479,7 +479,7 @@ before giving up waiting for a reply from the server. Unspecified or zero
 TIMEOUT correspond to infinite timeout. Set automatic mode if NOAUTO is nil,
 hooked automatic function if NOAUTO is a function, and do not set automatic mode
 otherwise. See `mpd-set-automatic-mode' for a description of automatic mode."
-  (or (and (stringp host) (wholenump port) (or (not timeout) (numberp timeout)))
+  (or (and (stringp host) (or (wholenump port) (not port)) (or (not timeout) (numberp timeout)))
       (error "Invalid parameters passed for making new connection"))
   (and timeout
        (if (= timeout 0)
@@ -502,7 +502,9 @@ function doesn't need to be explicitly called when the connection is in
 automatic mode (the default). Close the connection using `mpd-close-connection'
 when you are done."
   (let (proc rt welc)
-    (setq proc (or (open-network-stream "mpd" nil (_mpdgh) (_mpdgp))
+    (setq proc (or (if (_mpdgp)
+                       (open-network-stream "mpd" nil (_mpdgh) (_mpdgp))
+                     (make-network-process :name "mpd" :service (expand-file-name (_mpdgh)) :family 'local))
                   (error "Unable to open connection with mpd")))
     (and (_mpdgo) (delete-process (_mpdgo)))
     (_mpdso proc)

Any ideas?

Bump version number

Can the version number be updated, so that dependent libs can reference the new number. E.g. if mingus re-installs via melpa, and the user has a cached version of libmpdee, emacs will not download a new version (needed for emacs28 and beyond).

line 7 of libmpdee.el:

;; Version:     2.1

Melpa stable

could you please creates tags corresponding to package versions.
Thanks

A toggle for single mode

Hi. I started using this package some days ago but could not find a way to toggle single mode. I copied and modified a preexisting function for that purpose. Not sure if such a function interests you.

Thank you for your time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.