summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorDante Catalfamo2020-09-19 13:36:02 -0400
committerDante Catalfamo2020-09-19 13:36:02 -0400
commit4c9457050db8e3b61ca5b0fecb4696c70a2fb83b (patch)
treea1453a21539002d0c45b1c075b65b41147525fae /content
parent2abe1ca9ca2c34352ecc7f9a0c551e65d9d3246e (diff)
downloadblog-4c9457050db8e3b61ca5b0fecb4696c70a2fb83b.tar.gz
blog-4c9457050db8e3b61ca5b0fecb4696c70a2fb83b.tar.bz2
blog-4c9457050db8e3b61ca5b0fecb4696c70a2fb83b.zip
emacs-helm-atoms: More work on describing how symbols work
Diffstat (limited to 'content')
-rw-r--r--content/posts/emacs-helm-atoms/index.org33
1 files changed, 21 insertions, 12 deletions
diff --git a/content/posts/emacs-helm-atoms/index.org b/content/posts/emacs-helm-atoms/index.org
index 3806ef5..f3c4e15 100644
--- a/content/posts/emacs-helm-atoms/index.org
+++ b/content/posts/emacs-helm-atoms/index.org
@@ -9,29 +9,38 @@
I don't remember where I read it, but while I was first learning about
how elisp works, someone had mentioned the fact that it could perform
-reverse variable searches. I remember thinking that idea was
+reverse variable searches. I remember thinking that idea was
incredibly interesting.
-I'd tried looking that capability at the time and coming up
-short.v Every link I'd looked at only talked about reverse I-search and
-xref capabilities. I pretty soon after forgot about it.
+I'd tried looking that capability at the time and coming up short.
+Every link I'd looked at only talked about reverse I-search and xref
+capabilities. I pretty soon after forgot about it.
The thought crossed my mind again today, out of the blue, and I
-decided that I would once and for all get to the bottom of it. I
+decided that I would once and for all get to the bottom of it. I
stumbled across the answer in [[https://github.com/lepisma/til-emacs][this]] github repo which contains various
-Emacs tips. Apparently this reverse variable search is performed
-through the =apropos-value= command. I had to say, I was quite
+Emacs tips. Apparently this reverse variable search is performed
+through the =apropos-value= command. I had to say, I was quite
disappointed with the result.
The command provides a lackluster interface to say the least, with the
only input being the ability to enter a search string in the
-minibuffer. It's results are also fairly disappointing, often not
-even returning a result, with the error message =condition-case:
-Apparently circular structure being printed=. When the results do
-appear, they are usually hard to understand, with the search term
-being deep in a list.
+minibuffer. It's results are also fairly disappointing, often not even
+returning a result, with the error message =condition-case: Apparently
+circular structure being printed=. When the results do appear, they
+are usually hard to understand, with the search term being deep in a
+list.
To quench my thirst for an interactive reverse variable lookup that
provided accurate results, I decided to make my own. I called it
[[https://github.com/dantecatalfamo/helm-atoms][helm-atoms]]. It's both completely interactive, using the [[https://emacs-helm.github.io/helm/][helm]]
completion and narrowing framework, and incredibly fast.
+
+The way it works is quite simple.
+
+There's a function in Emacs called =mapatoms=, which takes a function
+as one of its parameters. Without a second parameter, it traverses
+Emacs' standard =obarray=, which is a table which holds most of the
+interned symbols in Emacs. If you're curious about how symbols and
+interning work in Emacs, you can check out the info page on [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Creating-Symbols.html][Creating
+and Interning Symbols]].