{"id":28042348,"url":"https://github.com/mimo84/emacsclient-wrapper","last_synced_at":"2026-06-10T16:31:32.079Z","repository":{"id":244470188,"uuid":"815327328","full_name":"mimo84/emacsclient-wrapper","owner":"mimo84","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-09T19:55:22.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T03:10:12.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mimo84.png","metadata":{"files":{"readme":"Readme.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-14T21:42:30.000Z","updated_at":"2024-12-09T19:55:26.000Z","dependencies_parsed_at":"2024-06-14T23:43:26.234Z","dependency_job_id":"fcf55f71-a1c0-47c7-9b08-c64522564893","html_url":"https://github.com/mimo84/emacsclient-wrapper","commit_stats":null,"previous_names":["mimo84/emacsclient-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mimo84/emacsclient-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimo84%2Femacsclient-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimo84%2Femacsclient-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimo84%2Femacsclient-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimo84%2Femacsclient-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mimo84","download_url":"https://codeload.github.com/mimo84/emacsclient-wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimo84%2Femacsclient-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34161283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-11T14:26:23.654Z","updated_at":"2026-06-10T16:31:32.055Z","avatar_url":"https://github.com/mimo84.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"* Emacs Client Wrapper Script\n** Demo Video\n\nYou can watch the demo for this video here: https://youtu.be/pQr6pnnZ6sA\n\n** What is it\n\nThis is a utility script that wraps Emacs client in order to automatically run a server configured to use a chemacs2 profile or a =init-directory=.\nIt is going to pass to =emacsclient= all the extra options that are not read out by the script.\nFor the options you can pass to =emacsclient= refer to:  https://www.gnu.org/software/emacs/manual/html_node/emacs/emacsclient-Options.html\n\n** How is different than just running =emacsclient -a=?\n\nIt differs because when running emacsclient with =-a= option I did not find a way to specify a profile or an =init-directory=, which didn't involve changing the startup script.\nAlso the script has some utility functions such as =-l= that is going to list all the socket files currently available in the system.\n\n** Dependencies\n\n\nThis script expects =emacs= and =emacsclient= to be in the system and available.\nAlso uses =lsof= to be installed in the system.\n\n*** =profile= option\n\nIn order to use the =--profile= option in the script, [[https://github.com/plexus/chemacs2][chemacs2]] is expected to be installed and configured in the system.\n\n*** =init-directory= option\n\nThe [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Initial-Options.html#index-_002d_002dinit_002ddirectory][init-directory]] option relies on Emacs being v29.\n\n** Examples\n\n*** Basic usage\n\n#+begin_src sh\nec \n#+end_src\n\n*** Emacs server already running\nIt will open a new instance of =emacsclient= in a frame, called with =-c= option.\n\n*** Emacs server is not running\n\nIn this case is going to call =emacsclient= with =-a ''= option, which is going to start the server for the default profile of Emacs.\n\n*** Specify a profile or =init-directory=\n\n#+begin_src sh\nec --profile \u003cchemacs2-profile-name\u003e\n# or\nec --init-directory ~/init-directory\n#+end_src\n\n**** Emacs server already running\nIt's going to just call Emacs client, since the socket already exists and it's not required to create a new one.\nIf you really want to run a second server besides you can always run the regular command:\n\n#+begin_src sh\nemacs --bg-daemon=\u003cdeamon-name\u003e --init-directory ~/init-directory\n#+end_src\n\nand then call the script with the =-s= option for Emacs client to reference to that particular daemon that wants to be used.\n\n#+begin_src sh\nec -s \u003cdaemon-name\u003e\n#+end_src\n\n**** Emacs server is not running\nIt is going to start a new Emacs instance with a particular =init-directory= or profile, and then it's going to run the client associated with it.\n\n***** List available Emacs server\n\n#+begin_src sh\nec -l \n#+end_src\n\nIt will return a list of open Emacs sockets using =lsof=.\n\n*** Kill an Emacs server\n\n#+begin_src sh\nec -k\n#+end_src\n\nOr a specific daemon instance:\n\n#+begin_src sh\nec -k -s \u003cname\u003e\n#+end_src\n\n\n\n** Support for all the options that can be provided to =emacsclient=\n\nJust a few examples:\n\n*** Open =emacsclient= on a particular file and line number\n#+begin_src sh\nec +18 ~/dotfiles/.config/conf.el\n#+end_src\n\n*** Open =emacsclient= using a different daemon\n\n#+begin_src sh\nec -s deamon-name +12 ~/my-file.org \n#+end_src\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimo84%2Femacsclient-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmimo84%2Femacsclient-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimo84%2Femacsclient-wrapper/lists"}