Instead of (require 'org) which loads the entire thing and is quite
expensive, let's autoload what we need. In the config we load
org-bookmark before org-mode so we may as well do this.
It's also just good practice regardless.
Now we get completion (using the clipboard by default) for a URL,
which is set as a property for the bookmark. It also gets a timestamp
and we can fill in other text. This is a modification due to the
changes in org-bookmark.
Now it can:
- cache results until bookmarks file is modified, so we don't need to
open the file again if we've already figured everything out. This is
in-memory and not as a file
- a proper dispatching list which has pairs of form (PATTERNS . FUNC)
so the dispatching system is a bit more abstract and easier to add to
- use a URL property in org headings to get the bookmark URL rather
than having it as part of the body of the entry. This means the body
is now free to house any content without affecting the overall
function of the system, such as notes or subtrees for related
bookmarks.
Honestly not that useful for eshell (made it annoying to read text),
whereas in c/c++ it made looking at certain formatted code really
annoying.
Java and C# aren't used anyway.
In most cases, when reading code in a non terse language like C/C++,
C# or Java I'd rather just /see/ the code. In something like Lisp or
Python the symbols just make it that much easier to read code.
I had a problem with after-init-hook which would (while supposedly
keeping (emacs-init-time) under 1.2 seconds) take ages to start emacs
just due to how many things were starting up using it. So I removed
all the after-init-hook functions and instead aggressively demand the
stuff I need and defer everything else through ":defer", ":after",
":hook" and ":general".
Happy to say my boot time is now actually 1.2 seconds without
compilation.