{"id":13646432,"url":"https://github.com/sshaw/copy-as-format","last_synced_at":"2025-08-16T16:32:45.369Z","repository":{"id":47113351,"uuid":"75453748","full_name":"sshaw/copy-as-format","owner":"sshaw","description":"Emacs function to copy buffer locations as GitHub/Slack/JIRA etc... formatted code","archived":false,"fork":false,"pushed_at":"2023-11-13T07:33:11.000Z","size":125,"stargazers_count":140,"open_issues_count":4,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-04T22:11:42.700Z","etag":null,"topics":["asciidoc","bitbucket","disqus","emacs","gitlab","hipchat","html","jira","markdown","mediawiki","pod","restructured-text","restructuredtext","slack"],"latest_commit_sha":null,"homepage":"","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/sshaw.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}},"created_at":"2016-12-03T05:28:14.000Z","updated_at":"2024-11-26T12:09:38.000Z","dependencies_parsed_at":"2023-02-10T13:00:41.569Z","dependency_job_id":"dce32446-d3bb-4c54-b0f3-69a8204d6a13","html_url":"https://github.com/sshaw/copy-as-format","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fcopy-as-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fcopy-as-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fcopy-as-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fcopy-as-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshaw","download_url":"https://codeload.github.com/sshaw/copy-as-format/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230045137,"owners_count":18164266,"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":["asciidoc","bitbucket","disqus","emacs","gitlab","hipchat","html","jira","markdown","mediawiki","pod","restructured-text","restructuredtext","slack"],"created_at":"2024-08-02T01:02:55.530Z","updated_at":"2024-12-17T00:42:21.201Z","avatar_url":"https://github.com/sshaw.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# copy-as-format\n\n[![MELPA](https://melpa.org/packages/copy-as-format-badge.svg)](https://melpa.org/#/copy-as-format)\n\nEmacs function to copy buffer locations as GitHub/Slack/JIRA etc...\nformatted code\n\n![copy-as-format demo](demo.gif)\n\n## Supported Formats/Services\n\n* AsciiDoc\n* Bitbucket\n* Disqus\n* GitHub\n* GitLab\n* ⚰ HipChat\n* HTML\n* JIRA\n* Markdown\n* MediaWiki\n* Org-mode\n* POD\n* reStructuredText\n* Slack\n* Telegram\n* WhatsApp\n\n## Usage\n\n`M-x copy-as-format` or `C-u M-x copy-as-format`\n\nCopy the current line or active region and add it to the kill ring as\nGitHub/Slack/JIRA... formatted code. Format defaults to `copy-as-format-default`.\nThe buffer will not be modified.\n\nWith a prefix argument prompt for the format.\n\n`M-x copy-as-format-SERVICE`\n\nWhere `SERVICE` is one of the supported services.\n\nIt's a good idea to bind these functions to a key sequence:\n\n```el\n(global-set-key (kbd \"C-c w s\") 'copy-as-format-slack)\n(global-set-key (kbd \"C-c w g\") 'copy-as-format-github)\n```\n\nFor AsciiDoc customization see `copy-as-format-asciidoc-include-file-name` and `copy-as-format-asciidoc-language-alist`.\n\n## Adding Formats\n\nCreate a format function with a signature of `TEXT MULTILINE`:\n\n* `TEXT` - the text to be formatted\n* `MULTILINE` - `t` if `TEXT` spans multiple lines, otherwise `nil`\n\nFor example:\n\n```el\n(defun some-great-format (text multiline)\n  (if multiline\n      (multiline-format text)\n    (single-line-format text)))\n```\n\nThen, add an entry to `copy-as-format-format-alist`. The key is the format's name\nand the value is the format function:\n\n```el\n(add-to-list 'copy-as-format-format-alist '(\"great-format\" some-great-format))\n```\n\n## See Also\n\n* [git-link](https://github.com/sshaw/git-link)\n* [output-as-format](https://github.com/sshaw/output-as-format) - A command-line version of copy-as-format\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshaw%2Fcopy-as-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshaw%2Fcopy-as-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshaw%2Fcopy-as-format/lists"}