{"id":17988051,"url":"https://github.com/lujun9972/examples.el","last_synced_at":"2026-01-19T03:01:46.316Z","repository":{"id":91558562,"uuid":"64566738","full_name":"lujun9972/examples.el","owner":"lujun9972","description":"Do By Examples","archived":false,"fork":false,"pushed_at":"2016-08-18T14:03:04.000Z","size":719,"stargazers_count":11,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T03:26:59.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","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/lujun9972.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}},"created_at":"2016-07-30T22:32:59.000Z","updated_at":"2023-11-16T19:32:09.000Z","dependencies_parsed_at":"2023-03-02T10:45:27.276Z","dependency_job_id":null,"html_url":"https://github.com/lujun9972/examples.el","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lujun9972/examples.el","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fexamples.el","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fexamples.el/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fexamples.el/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fexamples.el/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lujun9972","download_url":"https://codeload.github.com/lujun9972/examples.el/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fexamples.el/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28559350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"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":"2024-10-29T19:10:29.169Z","updated_at":"2026-01-19T03:01:46.291Z","avatar_url":"https://github.com/lujun9972.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: README\n#+AUTHOR: lujun9972\n#+CATEGORY: examples.el\n#+DATE: [2016-07-29 周五 16:21]\n#+OPTIONS: ^:{}\n\n* Do By Examples\n[[examples.gif]]\n\n* The Idea\nThere are always some commands that we use frequently, but not frequently enough to remember. Usually I record them into org files.\n\nSo, If I forget a command, I should go through the following steps:\n1. Found the org file\n2. Open the org file and find out the corresponding src-block\n3. Copy the code in the src-block, and then modify it according to the actual situation\n\nThat's too much steps!!\n\nThat's why I write this =examples= package.\n\nThe idea is to treat headlines as examples and the codes in src-blocks as command templates.\n\nSpecifically, =examples= will do following things\n1. List all the examples in org files to user for selection.\n2. Once user selected an example, =examples= will search corresponding src-blocks. \n3. If there is only one src-block then the code will be expanded by yasnippet and inserted into current buffer, otherwise tell the user to select which src-block before expanding and inserting.\n\n* Usage\n1. setting =examples-default-org-files= \n\n   The varialbe specified org files stored examples. \n   \n   The default value is all the org files in =PATH-TO-EXAMPLES/examples/= directory\n\n2. （Optional）setting =exampls-mode-lang-alist=\n   \n   This varialbe specified the correspondence between currect major-mode and the src-block language.\n\n   It is mainly used to reduce the amount of src-block selection. after all, if you're in eshell, It is less likely to use C ++ code.\n\n   Defautly, =examples= only search those src-blocks which language is the same as current major-mode(removed the mode suffix).\n\n3. execute =M-x examples=\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flujun9972%2Fexamples.el","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flujun9972%2Fexamples.el","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flujun9972%2Fexamples.el/lists"}