I temporarily set it to /tmp/custom.el while I was in the midst of Nixifying my
Emacs setup. Since I'm not Nixified at the moment, I'm reverting this, so that
Emacs doesn't ask me the same questions about loading themes every day.
Configuring deadgrep to do a number of things:
1. Set `deadgrep--context` to see more context "after" in the output.
2. Define `deadgrep/dwim` to use a region if one is present; otherwise just
behave as `deadgrep`.
Warning: This commit relies on a patch I made to deadgrep: supporting the
`deadgrep--additional-flags`.
Instead of consuming `cycle/previous-focus`, define a function
`cycle/focus-previous!` that "focuses" the element at `previous-index` and
returns that element.
This function greatly simplified the code in window-manager.el and eliminated
the unnecessary `exwm/previous-workspace` variable that was managing the state.
Define a `cycle/previous-focus` function that returns the item that was
previously "focused" in the cycle. This is helpful for toggling back-and-forth
between buffers and EXWM workspaces for example without needing to define ad-hoc
variables to support it.
Also: Adds tests to cycle.el.
Also: Prefers `struct/set!` instead of `setf`. See the previous commit's message
for more information about that preference.
I originally tried using `struct/set` instead of `setf`, which I had forgotten
was the *immutable* version of `struct/set!`. When this didn't work, I reverted
to `setf`. After a good night's sleep and with a fresh set of eyes, I dug into
the issue and discovered that `struct/set!` was what I wanted the whole.
I am curious now about `struct/update` versus `struct/update!`; shouldn't the
former be immutable and the latter be mutable? I'll save that investigation for
a later date.
I've wanted an MRU/LRU sort of my "source code buffers" in Emacs. This commit
support three ways for working with a cache of source code buffers.
So first, what's a source code buffer? Well it isn't a buffer like *Messages*;
we can call these "Emacs-generated" buffers for convenience. Other problematic
buffers are buffers like `magit-status` and `dired-mode` and `erc` buffers.
I added some predicates for querying buffers for their major modes.
Supporting three KBDs for quickly accessing these functions:
1. <SPC><SPC> Toggle previous buffer
2. <SPC>b Use ivy to fuzzily search source code buffers
3. C-{f,b} Cycle {forwards,backwards} through the source code buffer cache.
I had forgotten that I defined <SPC>J. Maybe I should switch to using Hydras or
transient mode to improve the discoverability of my own setup... well in the
spirit of support things that I will likely forget, here's a new KBD for editing
config files in the `~/.config` directory.
Defined `dotfiles/find-emacs-file` and `org-helpers/find-file`, to clean up some
of the `find-file` calls I have with long path names. This DRYs things up as
well so that the path can be changed without breaking many other things.
I've wanted a library like this ever since I saw Douglas Crockford's JS talk
about scope highlighting as a more useful alternative to syntax highlighting.
I attempted to Nixify my Emacs over winter break. I made some meaningful
progress, but not enough progress to use my Nixified Emacs setup. Since Emacs is
my primary editor and my window manager at work and at home, having a partially
baked setup is untenable at the moment.
Reverting these changes so that I can get on with my work, but checking them in
so that I can pick up where I left off one day.
The things that I dislike about this setup are:
1. `xref-find-definitions` takes me to `/nix/store`, which is a read-only
version of the source code, so I cannot edit it, which doesn't feel lispy.
2. I need to rebuild the derivation when I change something, which also doesn't
feel lispy.
There are ways to circumvent both of these drawbacks, but for now, I'm checking
this in only to later revert it.
This is a work-in-progress. I'd like to add a README to this project to explain
my intention. The goal, roughly, is to port Elisp's fantastic f.el module to
Haskell. I consider Haskell APIs to be useful but somewhat sloppily designed. In
the same spirit as Elixir wrapping Erlang APIs, many of the functions I intend
to define will simply wrap existing Haskell APIs, but with a hopefully cleaner
API that I find more intuitive.
Adds some of the code I generated while studying for a role transfer at Google
using the fantastic resource, InterviewCake.com. This work predates the
mono-repo.
I should think of ways to DRY up this code and the code in
crack_the_coding_interview, but I'm afraid I'm creating unnecessary work for
myself that way.
I believe I have multiple other snippets and attempts scattered across /tmp,
~/programming, and other directories. Again, I created these files and others
before the mono-repo.
Well, unexpectedly (perhaps naively so), I only made it to Day 7. I created
these before I stumbled upon the idea of the mono-repository; otherwise, I like
to think I would have more granular commits introducing this work.
After deciding to support the `C-s-` prefix for lispyville KBDs, I'm
re-introducing support for:
- `lispyville-drag-backward`
- `lispyville-drag-forward`
- `lispyville-end-of-defun`
- `lispyville-beginning-of-defun`
Previously my ERC setup just supported Google's internal IRC. Now I have
Freenode for things like #nixos, #emacs.
This complicated my KBDs for cycling through IRC channels since certain channels
only exist on certain servers. To remedy this, I introduced a temporary solution
that looks up the server given a particular channel. This isn't ideal, but it
works for now.
If you refer to the previous commit where I change shell-command usages to
start-process function calls, you'll see the rationale for why I prefer
start-process.
This commit introduces a more ergonomic API for start-process that fits most of
my current use-cases of it. This cleans up the code. I have introduced a bug in
the way that I'm tokenizing the COMMAND value. I've tracked that with a
TODO. For now it only affects the `xmodmap -e '<command-string>'` calls, which
isn't too disruptive.
Continuing the series of easy-win commits that increase the speed of commands
that I was previously using `shell-command` to run by using `start-process`
instead.
As promised in the previous commit, I'm refactoring usages of `shell-command` to
prefer the faster alternative `start-process`. So far, I'm pleased with the
results.
Without doing any benchmarking (break this naughty habit), I'm preferring to
call `start-process` instead of `shell-command` in my `wallpaper/set`
function. I noticed that the `shell-command` call was unnecessarily polluting my
`pstree` call when I debugging my randomly changing wallpaper bug.
I'm mostly likely going to change a few more `shell-command` calls to prefer
`start-process`.
While I first switched to EXWM warily and thinking it would only be temporary,
it seems like this switch is here to stay. It turns out that EXWM was exactly
the integration I've been looking for. How serendipitous it that I found it when
I did.
Thank you, @tazjin.
While this commit isn't much (i.e. notmuch), it represents one brave step
forward in the quest for supporting email in Emacs -- something I'm estimating
to be somewhere between a 1.5x and 2x workflow booster.
TL;DR:
Problem: I ran into a bug where my computer wallpaper was changing every five
seconds whenever my init.el file was open and I was typing in it.
Short-term solution: Disable flycheck.
Long-term solution: Disable flycheck just for Elisp or just for init.el in
Elisp.
Post Mortem:
Warning: If you have flycheck-emacs-lisp-initialize-packages set to auto or
really anything other than nil, than the emacs-lisp flycheck-checker will spin
up a new Emacs instance, and evaluate all of the Elisp in init.el.
Why does this matter? Well, if like me, you have code anywhere in your
init.el (and any files downstream from init.el), that code will get evaluated
not just twice. But countless times... tens, hundreds, w/e. So... while you
might think you have code that is just running at startup this code will be
called incessantly.
As a dramatic, contrived example, if you had something like...
```elisp
(bank/send :amount 100 :to "wpcarro@gmail.com")
```
...anywhere in that your init.el would evaluate, you may end up sending
wpcarro@gmail.com millions of dollars. To make debugging this problem a bit more
complicated is that because this runs in a separate Emacs instance, you can't do
something like...
```elisp
(defvar already-evaluated? nil)
(unless already-evaluated? (bank/send :amount 100 :to "wpcarro@gmail.com"))
(setq already-evaluated? t)
```
...since the `already-evaluated?` variable will be local to the Emacs
instance. So if you needed a mechanism to ensure code like this runs only once,
you would need a way to share this semaphore across Emacs instances --
e.g. writing to and reading from disk.
I'm sure that there is a fish package that supports git aliases or
abbreviations. This time, I'm preferring to write my own.
Side note: The more that I use fish's abbreviations, the less that I like them
-- at least for the way in which I'm using them.
I'm not actually sure if this is sensitive information, but I'm erring on the
side of caution and ignoring it in case it is.
squash! Ignore .gnupg/random_seed