Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
dired-auto-readme
An Emacs package to automatically display a README file when one is present in a dired buffer.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Also consider using checkdoc and package-lint before you publish stuff, it is really annoying to get warning pop-up for docs wider than 80 chars. Those are so easy to catch up. Generally, it is good to follow Melpa guidelines even if you don't plan to publish your package in Melpa.
Also consider using checkdoc and package-lint before you publish stuff, it is really annoying to get warning pop-up for docs wider than 80 chars. Those are so easy to catch up. Generally, it is good to follow Melpa guidelines even if you don't plan to publish your package in Melpa.
Exactly. Consider you have point in a table definition. You can programmatically find which org element you are in, at least for org-mode. Or in a defun for elisp-mode, a sentence or paragraf in plain text and so on. You could just press a shortcut, and based on major-mode you could find boundaries of the element and put it in hidden-list. It would be really fast to work that way. I don't know if it already exists in some package. Or you could go for somewhat easier version, and just check if a region is active, and if it is, hide region, and if not, hide current line, or based on mode, hide element at point. That way we can easily expand/contract region with er/expand-region and press a key to temporary hide/unhide it. It is not difficult to write a function to do that based on text properties. Thing-at-point might be useful here too.
If you need some example of using text properties, here is some of my code, not sure if it is very good example, but it is very short and hopefully easy to understand. Here is a bit more elaborated one, and here is a bit of unorthodox usage of Emacs, also using text properties to achieve the effect. I don't recommend anything for "stable" system, beside org-view-mode, rest are just experiments and idea tests.
If you need some example of using text properties, here is some of my code, not sure if it is very good example, but it is very short and hopefully easy to understand. Here is a bit more elaborated one, and here is a bit of unorthodox usage of Emacs, also using text properties to achieve the effect. I don't recommend anything for "stable" system, beside org-view-mode, rest are just experiments and idea tests.
If you need some example of using text properties, here is some of my code, not sure if it is very good example, but it is very short and hopefully easy to understand. Here is a bit more elaborated one, and here is a bit of unorthodox usage of Emacs, also using text properties to achieve the effect. I don't recommend anything for "stable" system, beside org-view-mode, rest are just experiments and idea tests.
Cool. Another way to implement it, rather than using toggling commands, would be to use font-locking, which would improve performance in large buffers since it wouldn't be necessary to toggle the whole buffer at once. You can see how I did something similar here: https://github.com/alphapapa/obvious.el