unpackaged.el
emacs-config
unpackaged.el | emacs-config | |
---|---|---|
9 | 20 | |
373 | 81 | |
- | - | |
1.6 | 9.2 | |
about 1 year ago | 4 days ago | |
Emacs Lisp | Emacs Lisp | |
GNU General Public License v3.0 only | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
unpackaged.el
- Repository with code snippets and utility functions
- [ANN] unpackaged/imenu-eww-headings: Offer HTML headings in EWW buffers with Imenu
- unpackaged/custom-toggle-all-more-hide: Expand all options’ documentation
-
The Emacs Lock-In Effect or the Emacs Sunk Cost Fallacy
The question is almost like asking a fish to describe water. It's the sudden lack of it that produces a really clear example. :)
Anyway, here's a random example that comes to mind: I have some sexps in a Lisp file and I want to sort them alphabetically. Each sexp (usually a top-level form, but not necessarily) usually spans multiple lines, so line-sorting won't do it. Since they may be top-level forms, there may be comments between them that would lose their context if their position relative to sexps were lost, so comments need to "stick to" sexps they're above.
How would you solve this in a random text editor?
In Emacs, I would develop a command that does what I need. At each stage of the development process, I evaluate the command's definition, and it's instantly available to be used and tested. I could even test the function on its own definition, if I wanted to be silly (undoing the sorting after testing, of course).
When I'm done, I save the command definition to my configuration, and it's now a permanent tool in my toolbox. I didn't have to recompile the editor and start a new process, nor did I have to submit a patch to an upstream and ask for it to be merged. Similarly to a carpenter (forgive me if it sounds silly), my editor is my workbench, and as wood is malleable, so is my editor.
So, here's the command I came up with (maybe not the prettiest implementation, but maybe not the worst): https://github.com/alphapapa/unpackaged.el#sort-sexps And using Emacs and Org mode, I publish it into this "unpackaged" package, which I then install into my configuration as a package, and other users can then easily install it into theirs, too.
I don't know of any other editor that can do all of this, certainly not so easily.
- An Introduction to the Ultimate Git UI, Magit!
-
Automatically sorting an Org file upon save using multiple sorting criteria
Here's the code in my Emacs config. I'll probably add these functions to unpackaged.el (the Org sorting function there is more primitive than these).
-
Navigation suggestion needed
Sorting. This is handled within Org, see org-sort. However, you may find this function helpful for sorting recursively and with multiple methods (e.g. first by priority, then alphabetically): https://github.com/alphapapa/unpackaged.el#sort-tree-by-multiple-methods-at-once
-
Lets talk about Emacs UI
The customize buffers can be used with the keyboard. You can tab between fields, and C-c C-c to set values. See also https://github.com/alphapapa/unpackaged.el#set-value-of-customization-option-at-point
emacs-config
-
Emacs Advent Calendar 7: ordeless, embark 1.0 and some bric-a-brac
block-undo. Have keyboard macros undo in a single step (something vi gets right!).
- embark-kmacro.el: Embark support for Hyperbole key series
-
Stripped-down Embark?
Installing that Embark key series implementation I mentioned above, to get extra actions for key series such binding them to a key or turning them into named keyboard macros.
-
How do guys 'namespace' calls to functions in the same 'namespace'?
Generally I recommend to maintain all personal code in the form of tiny but proper Elisp libraries. The config just glues everything together using use-package/setup/your-self-baked-macro. See also /u/oantolin's config which uses this style: https://github.com/oantolin/emacs-config. I cannot recommend this enough!
-
How many lines are in your .emacs file?
I have 3720 lines in my configuration. I try to write as much of it as tiny packages that I configure with use-package, just like I do for external packages. (I highly recommend this form of organization) Many of these are only useful to me, but some would be very reasonable to steal, like:
-
[ANN] unpackaged/imenu-eww-headings: Offer HTML headings in EWW buffers with Imenu
I have a slightly different take on this in my configuration, file shr-heading.el. In addition to imenu support I wanted next and previous heading navigation commands. It turns out you then get imenu support for free, since one way you can specify imenu entries is by providing a "goto previous imenu entry" function.
- Whose user init have you found helpful?
-
Dragging the region
I wrote a small drag-region package once. You mark a region, turn on drag-region-mode and then your normal motion commands will drag the region along until you turn the minor mode off again. I never tested it with evil.
-
ecomplete: the Emacs contact manager you were looking for
I'm very happy with ecomplete now, I mostly just need the completion and automatic storing of addresses I write to, as configured in your post. But occasionally I want to remove an address or manually add one, so I wrote a couple of commands to do that which I bind in embark-email-map to + (for adding) and \ (for removing). I don't think I've used these commands directly, always as Embark actions. When I want to add an email to ecomplete I usually have it written in some buffer already. And the command to remove an email I've only ever used from the ecomplete completion interface or from a message buffer after mistakenly having inserted it and realized that's an old address I'll never use again.
-
Need help integrating a package into consult
I keep some packages in a subdirectory my personal configuration and don't create a separate repo for them. (Also, not every file there is really a package that could be released: some don't follow proper naming conventions, or depend on details of my configuration).
What are some alternatives?
ement.el - A Matrix client for GNU Emacs
embark - Emacs Mini-Buffer Actions Rooted in Keymaps
lispy - Short and sweet LISP editing
Emacs-VSCode-Default-High-Contras
consult-better-jumper - Integrate better-jumper into consult
vertico - :dizzy: vertico.el - VERTical Interactive COmpletion
prism.el - Disperse Lisp forms (and other languages) into a spectrum of colors by depth
org-make-toc - Automatic tables of contents for Org-mode files
consult - :mag: consult.el - Consulting completing-read
org-ql - A searching tool for Org-mode, including custom query languages, commands, saved searches and agenda-like views, etc.
modalka - Modal editing your way