{"id":17052051,"url":"https://github.com/noprompt/burdock-mode","last_synced_at":"2025-06-26T09:40:25.047Z","repository":{"id":136495723,"uuid":"44885085","full_name":"noprompt/burdock-mode","owner":"noprompt","description":"An Emacs mode for Ruby providing structured editing and evaluation operations.","archived":false,"fork":false,"pushed_at":"2024-04-05T16:35:09.000Z","size":74,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-14T11:43:40.449Z","etag":null,"topics":["emacs","ruby","structured-editing","structured-evaluation"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/noprompt.png","metadata":{"files":{"readme":"README.md","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":"2015-10-24T21:12:11.000Z","updated_at":"2022-11-01T18:08:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd7bea8d-2d0c-4511-bfbd-056b095836cf","html_url":"https://github.com/noprompt/burdock-mode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/noprompt/burdock-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprompt%2Fburdock-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprompt%2Fburdock-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprompt%2Fburdock-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprompt%2Fburdock-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noprompt","download_url":"https://codeload.github.com/noprompt/burdock-mode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprompt%2Fburdock-mode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262040145,"owners_count":23249348,"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","ruby","structured-editing","structured-evaluation"],"created_at":"2024-10-14T10:08:16.693Z","updated_at":"2025-06-26T09:40:25.031Z","avatar_url":"https://github.com/noprompt.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Burdock\n\nBurdock is an Emacs minor mode for Ruby which provides structured\nediting and evaluation operations.\n\n## Requirements\n\nBurdock requires the `inf-ruby` package.\n\n## Installation\n\nBurdock is not available as an official package as of yet so it must\nbe built from source.\n\nFrom the command line execute the following or similar commands.\n\n```\n$ export BURDOCK_DIRECTORY=~/.emacs.d/lisp/burdock-mode\n$ cd $BURDOCK_DIRECTORY\n$ git clone https://github.com/noprompt/burdock-mode .\n$ cd ruby\n$ bundle install\n```\n\nNext, add the following source to your Emacs configuration wherever\nyou deem appropriate. Then either evalaute it directly or restart\nEmacs.\n\n```el\n(add-to-list 'load-path BURDOCK_DIRECTORY)\n(require 'burdock-mode)\n\n;; Tells burdock where the backend Ruby code lives. This can also be\n;; configured with `M-x customize-group`.\n(setq burdock-ruby-source-directory (concat BURDOCK_DIRECTORY \"ruby/\"))\n\n;; Enable burdock-mode whenever ruby-mode is also enabled. This is\n;; optional but recommended.\n(add-hook 'ruby-mode-hook 'burdock-mode)\n\n;; Whenever we initialize burdock-mode we should also start the\n;; burdock process.\n(add-hook 'burdock-mode-hook 'burdock-start)\n```\n\n`BURDOCK_DIRECTORY` here is a string which contains path to the root\nof the repository cloned in the first step.\n\nAt this point you should now be able to open a Ruby file and begin\nusing the provided Burdock feature set.\n\n## Usage with `inf-ruby-mode`\n\nOne of the primary motivators for the creation of Burdock was the\ndesired to have structured code evaluation experience complimentary to\nwhat is available in the lisp family of languages. Burdock enables\nthis functionality by accurately extracting expressions from your Ruby\nbuffer and sending them to the Ruby process created by `inf-ruby-mode`\nfor evaluation. When applied judiciously this ability can promote a\nmuch faster feedback loop than the traditional write/run pattern\ncommonly seen with Ruby development. It is a fantastic compliment\nto an automated test runner or other testing tool such as\n[`rspec-mode`](https://github.com/pezra/rspec-mode). Finally it is\ngreat way to [poke at things](http://www.posteriorscience.net/?p=206).\n\nTo get an appreciation for this start a Ruby process by running\n\u003ckbd\u003eM-x\u003c/kbd\u003e `run-ruby` or your preferred method then create a new\nRuby buffer with the following code.\n\n```rb\nlambda do\n  x = 1\n  y = 2\n\n  x + y\nend.call\n```\n\nNow, position your cursor _anywhere_ between the `do` and `end`\ndelimiters and execute \u003ckbd\u003eM-x\u003c/kbd\u003e\n`burdock-evaluate-scope-at-point`. With any luck you should see\nsomething similar to the following result in your Ruby REPL.\n\n```\n\u003e\u003e lambda do\n?\u003e   x = 1\n\u003e\u003e   y = 2\n\u003e\u003e   x + y\n\u003e\u003e end.call\n=\u003e 3\n```\n\nVoilà!\n\nThe only thing left to do is bind this to something easier to type!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoprompt%2Fburdock-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoprompt%2Fburdock-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoprompt%2Fburdock-mode/lists"}