{"id":24994947,"url":"https://github.com/mrc/go-emacs-module","last_synced_at":"2025-03-29T14:23:40.088Z","repository":{"id":136506742,"uuid":"187357760","full_name":"mrc/go-emacs-module","owner":"mrc","description":"Writing an emacs module with Go","archived":false,"fork":false,"pushed_at":"2019-05-18T13:32:27.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-04T15:32:54.937Z","etag":null,"topics":["emacs","go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-05-18T12:54:22.000Z","updated_at":"2019-05-20T03:44:26.000Z","dependencies_parsed_at":"2024-06-19T14:45:41.225Z","dependency_job_id":"ce8db6b5-bbdd-4c2b-9a79-22725826d24c","html_url":"https://github.com/mrc/go-emacs-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrc%2Fgo-emacs-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrc%2Fgo-emacs-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrc%2Fgo-emacs-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrc%2Fgo-emacs-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrc","download_url":"https://codeload.github.com/mrc/go-emacs-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246194244,"owners_count":20738638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["emacs","go","golang"],"created_at":"2025-02-04T15:25:44.578Z","updated_at":"2025-03-29T14:23:40.064Z","avatar_url":"https://github.com/mrc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-emacs-module\n\nThis doesn't work, but it's a start at getting a module written in Go that Emacs can use.\n\n## Building\n\nRequires `emacs-module.h`, which is created when Emacs configure is run.\n\nSome package managers that don't keep source might remove it. macOS Homebrew removes it -- some patches ([example](https://github.com/railwaycat/homebrew-emacsmacport/pull/112)) restore it, or brew cask emacs puts it in `/Applications/Emacs.app/Contents/Resources/include/emacs-module.h`.\n\n```\n% go build -o emacsmodtest.so -buildmode=c-shared \u0026\u0026 emacs --batch -nw -Q -L $(pwd) --eval \"(require 'emacsmodtest)\" --eval \"(princ (frob))\"\nemacs version: 26\nhello from frob!\nborf%\n```\n\n## What works\n\n* intern a symbol, get the symbol value\n* call a Go func from Emacs (just one, with no arguments)\n\n## Todo\n\n* Convert args for the thunk to a Go slice\n* Make the thunk call a different Go func\n* Figure out if all this casting is safe\n\n## Notes\n\nEmacs requires the symbol `plugin_is_GPL_compatible`. It doesn't need it to be anything in particular, and cgo is happy exporting functions, so I made it a function.\n\n`fmt.Printf` is nice for testing from the command line, but would be bad at runtime.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrc%2Fgo-emacs-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrc%2Fgo-emacs-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrc%2Fgo-emacs-module/lists"}