sshaw / copy-as-format Goto Github PK
View Code? Open in Web Editor NEWEmacs function to copy buffer locations as GitHub/Slack/JIRA etc... formatted code
Emacs function to copy buffer locations as GitHub/Slack/JIRA etc... formatted code
https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=advanced
Need to think about defaults.
If there's no title, is there a point to support?
Could you please add Telegram and Whatsapp formats?
suspect a better way than mapping file extensions to Jira language tags would be to map Emacs modes to language tags. That way you get to take advantage of all the work put into auto-mode-alist over the years.
Reddit confuses people a lot, because its current default front-end supports code formatting options which are not supported by the old front-end (and reddit has shown no interest in fixing this long-standing problem). Consequently people using the default front-end have no idea that the code they paste is liable to look incredibly broken for many of their readers, unless someone points it out to them.
The single formatting technique which is compatible between the old and the new is to indent everything by 4 spaces. If copy-as-format
had a reddit option which did that, that would help to reduce the number of broken posts seen at https://old.reddit.com/r/emacs
right now the only api is the copy-as-format
function which inspects the prefix argument and relies on the region being active.
it would be nice to have a public function that would take two positions (begin and end) and a format argument (string, t
to prompt for format, nil for default format) that would copy the text in between those two positions using the specified format.
something like this:
(defun copy-as-format-positions (beg end &optional format)
...)
this would allow for better use in custom commands, and also for better integration with evil-mode
, which has its own concepts to define various regions (e.g. with text objects).
even better, there should be an option to not copy but only return the formatted text, which would mean it can be used in other functions.
what do you think about this? i could come up with a pr if you agree this makes sense to have.
Output as Format does this now. This should too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.