From f08585c89feeb7aef6e3e4c5558b0bf1d59a549c Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Wed, 12 Apr 2023 16:17:34 +0300 Subject: [PATCH] feat(emacs): better text --- org/2023-04-14-emacs.org | 72 +++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/org/2023-04-14-emacs.org b/org/2023-04-14-emacs.org index 1aa8394..375dad6 100644 --- a/org/2023-04-14-emacs.org +++ b/org/2023-04-14-emacs.org @@ -22,15 +22,15 @@ Poof I made my free-time disappear @@html:

- Ellis Kenyő, on being called an "elisp mage"@@ -Little did I know when on the fateful day of *[2020-10-09 Fri]* I had installed [[https://www.gnu.org/software/emacs/][GNU Emacs]]. I wasn't thinking about the [[https://www.gnu.org/philosophy/philosophy.html][ethical aspects]] of free software, [[https://www.webofstories.com/play/marvin.minsky/44][aesthetics of Lisp]], or these other things with which an occasional layperson explains to him or herself how an almost [[https://www.jwz.org/doc/emacs-timeline.html][half a century old]] program can still be in [[https://emacsconf.org/2022/talks/survey/][active use]]. +Little did I know on the fateful day of *[2020-10-09 Fri]*, when I had installed [[https://www.gnu.org/software/emacs/][GNU Emacs]]. I wasn't thinking about the [[https://www.gnu.org/philosophy/philosophy.html][ethical aspects]] of free software, [[https://www.webofstories.com/play/marvin.minsky/44][aesthetics of Lisp]], or these other things with which an occasional layperson might explain how an almost [[https://www.jwz.org/doc/emacs-timeline.html][half a century old]] program can still be in [[https://emacsconf.org/2022/talks/survey/][active use]]. In fact, when considering using software X for anything, the most important question to me was: can X provide a better user experience? For Emacs, the answer to most of these questions turned out to be yes. -So, over that time, Emacs has become my programming environment, email client, window manager, knowledge base [[https://sqrtminusone.xyz/configs/emacs/][and a lot more]]. I think I ended up using Emacs for almost as many things as possible; I have even authored a few packages that implement certain parts of my workflows that weren't readily available. +So over time, Emacs has become my programming environment, email client, window manager, knowledge base [[https://sqrtminusone.xyz/configs/emacs/][and a lot more]]. I think I ended up using Emacs for almost as many things as possible; I even authored a few packages that implement certain parts of my workflows that weren't readily available. -Among other things, the Emacs community is responsible for my introduction to [[https://zettelkasten.de/][Zettelkasten]], RSS, Lisps... Perhaps even my English became slightly less broken because Emacs is so text-centered. Indeed, a lot has changed over the course of these short 2.5 years. +Among other things, the Emacs community is responsible for my introduction to [[https://zettelkasten.de/][Zettelkasten]], RSS, Lisps... Perhaps even my English became slightly less broken because Emacs is so text-centered. A lot has changed over the course of these short 2.5 years. -Anyway, this post is an attempt at quantifying some aspects of that story. The numbers mostly come from projects called [[https://activitywatch.net/][ActivityWatch]] and [[https://wakatime.com/][WakaTime]]. +Anyway, this post is an attempt to quantify some aspects of that story. The numbers mostly come from projects called [[https://activitywatch.net/][ActivityWatch]] and [[https://wakatime.com/][WakaTime]]. Mostly I'm curious myself, but also every now and then I see Emacs people discussing their journeys through the Elisp-land, or a potential convert wondering whether this rabbit hole is worth investigating. If any of this applies to you, you might find something interesting in this document. @@ -41,7 +41,7 @@ Also, I use a lot of JavaScript here, but it's all open source. The only 3rd par #+end_export * Everything goes into Emacs -As I said, I use Emacs for a lot of things, which is described in my [[https://sqrtminusone.xyz/configs/emacs/#introduction][Emacs config]] in more detail. Fig. 1 shows how Emacs was replacing various programs over time. +As I mentioned earlier, I use Emacs for a lot of things, which are described in my [[https://sqrtminusone.xyz/configs/emacs/#introduction][Emacs config]]. Fig. 1 shows how Emacs replaced various programs over time. #+begin_export html @@ -51,34 +51,34 @@ As I said, I use Emacs for a lot of things, which is described in my [[https://s #+end_export -As you can see, I used Neovim for a bit more than a year. We'll get into some numbers on that later. +As you can see, I used Neovim for a little over a year. We'll get into some numbers on that later. -And it took me about 13 months to move from knowing nothing about Emacs to using EXWM. +The process of moving from knowing nothing about Emacs to using EXWM took about 13 months. -Fig. 2 shows the dynamics of the direct screen time ratio spent in Emacs per each month, i.e. how many non-AFK seconds the Emacs window was active on average. +Fig. 2 shows the dynamics of the direct screen time ratio spent in Emacs per each month, i.e. the average number of non-AFK seconds in the Emacs window. #+begin_export html #+end_export -It's hard to distinguish any general trend here. It seems like the ratio started at 0.2 in October 2020, was oscillating around 0.3 for about 7 months, then moved closer to 0.4 until January 2023, after which jumped to 0.45-0.5. +It's hard to discern any general trend here. It appears that the ratio started at 0.2 in October 2020, oscillated around 0.3 for about 7 months, then moved closer to 0.4 until January 2023, after which jumped to 0.45-0.5. -The three peaks in September 2021 (0.526), January 2022 (0.532) and August 2022 (0.568) may match my vacations, in which I didn't have to spend time in Chrome DevTools (I do web development as my "main" job), but I'm not sure about that. +The three peaks in September 2021 (0.526), January 2022 (0.532) and August 2022 (0.568) may correspond to my vacations, during which I didn't have to spend time in Chrome DevTools (I do web development as my "primary" job), but I'm not entirely sure. The jump is January 2023 definitely matches my adoption of [[https://github.com/zevlg/telega.el][telega.el]] instead of the official desktop client. The time redistributes rather cleanly in the detailed ActivityWatch data. -It's also interesting that switch from [[https://i3wm.org/][i3]] to [[https://github.com/ch11ng/exwm][EXWM]] didn't seem to have any particularly distinguishable effects. +It's also interesting that switching from [[https://i3wm.org/][i3]] to [[https://github.com/ch11ng/exwm][EXWM]] didn't seem to have any distinguishable effects. The mean Emacs screen time ratios are 0.39 since October 2020 and 0.47 since January 2023. So, as you might infer, Emacs is quite prominent in my PC usage. * Time spent in Emacs -Now let's turn to the structure of time spent in Emacs. Fig. 3 shows how many Emacs-hours per month I spent on what, Fig. 4 shows the same in the stacked form. +Now let's examine the structure of time spent in Emacs. Fig. 3 shows how many Emacs-hours per month I spent on different activities, and Fig. 4 shows the same in stacked form. -Contrary to Fig. 2, the time here is calculated with a 15-minute timeout preference, like [[https://wakatime.com/faq#timeout][it's done in WakaTime]]. For instance, if I do something in a project in Emacs for 10 minutes, then switch to something else for 10 minutes (i.e. no [[https://wakatime.com/developers/#heartbeats][heartbeats]] in that time), then switch back to the project for 10 more minutes, this will be accounted as 30 minutes in that project. +Unlike Fig. 2, the time here is calculated with a 15-minute timeout preference, as [[https://wakatime.com/faq#timeout][it's done in WakaTime]]. For instance, if I work on a project in Emacs for 10 minutes, then switch to something else for 10 minutes (i.e. no [[https://wakatime.com/developers/#heartbeats][heartbeats]] recorded during that time), then return to the project another 10 minutes, this will be counted as 30 minutes in that project. -This is mostly so because that's the default format of the [[https://wakatime.com/faq#exporting][WakaTime export]], but I also think that's reasonable, because I may open package documentation during configuration, experiment in scratch buffers while working on a package, etc. This time really has to be included in the final tally. +This is mostly so because it's the default format for the [[https://wakatime.com/faq#exporting][WakaTime export]], but I also believe it's reasonable since I may open package documentation during configuration, experiment in scratch buffers while working on a package, and so on. This time really has to be included in the final tally. -Of course, this will also include all the times I was distracted to the [[https://wiki.systemcrafters.net/community/chat-with-us/][System Crafters]] Discord server, [[https://emacs.ch/][emacs.ch]] (a Mastodon instance), or whatever else. So treat the numbers below as an upper bound. +Of course, this will also include all the times I was distracted to the [[https://wiki.systemcrafters.net/community/chat-with-us/][System Crafters]] Discord server, [[https://emacs.ch/][emacs.ch]] instance, or whatever else. Therefore, consider the numbers that follow as an upper bound. #+begin_export html @@ -91,35 +91,35 @@ Of course, this will also include all the times I was distracted to the [[https: The categories are as follows: - *Config* ({{{num("config_hours_total")}}} total hours, {{{num("config_hours_percent")}}}% of all time)\\ - Time spent on the actual Emacs configuration. + Time spent on actual Emacs configuration. - *Emacs Packages* ({{{num("package_hours_total")}}} total hours, {{{num("package_hours_percent")}}}% of all time)\\ - Time spent in other Emacs Lisp files, i.e. writing my packages or debugging other packages. See the packages section. + Time spent in other Emacs Lisp files, such as writing my packages or debugging other packages. See the [[*Emacs packages][packages]] section. - *Org Mode* ({{{num("orgmode_hours_total")}}} total hours, {{{num("orgmode_hours_percent")}}}% of all time)\\ Time spent in my =org-mode= project, which is mostly [[https://github.com/bastibe/org-journal][org-journal]], [[https://www.orgroam.com/][org-roam]] and project management. By the way, guess the month in which I read [[https://www.soenkeahrens.de/en/takesmartnotes][Sönke Ahrens' book]] about Zettelkasten. - *sqrtminusone.xyz* ({{{num("sqrt_hours_total")}}} total hours, {{{num("sqrt_hours_percent")}}}% of all time)\\ - Working with this strange little website. + Working on this strange little website. - *Other Code* ({{{num("other_code_hours_total")}}} total hours, {{{num("other_code_hours_percent")}}}% of all time)\\ - Doing something marginally useful in Emacs, which is mostly work, education and a few personal projects that aren't related to Emacs. + Doing something marginally useful in Emacs, which is mostly work, education and a few personal projects unrelated to Emacs. - *Misc* ({{{num("misc_hours_total")}}} total hours, {{{num("misc_hours_percent")}}}% of all time) - Time spent in Emacs but not in an actual project (i.e. accounted by the [[https://github.com/ActivityWatch/aw-watcher-window][window watcher]] of ActivityWatch but not WakaTime, which watches for files). These are things like reading RSS, writing emails, using messengers, doing some idle experimentation in scratch buffers, etc. + Time spent in Emacs but not in an actual project (i.e. accounted by the [[https://github.com/ActivityWatch/aw-watcher-window][window watcher]] of ActivityWatch but not WakaTime, which watches for files). That includes reading RSS, writing emails, using messengers, doing some idle experimentation in scratch buffers, etc. -{{{num("config_hours_percent")}}}% of time spent to configuration is actually less than I expected. Unsurprisingly, the first month has the highest value of about 20% (I used Emacs without WakaTime for a few days). +The {{{num("config_hours_percent")}}}% of time spent to configuration is actually less than I expected. Unsurprisingly, the first month had the highest value of around 20% (I used Emacs without WakaTime for a few days). -By the way, I spent just 39.0 hours configuring Neovim, although the number is probably not representative anymore because Neovim changed a lot over these 2 years. +By the way, I spent just 39.0 hours configuring Neovim, although the number is probably not representative anymore because Neovim has changed a lot over these 2 years. * Switching from Neovim -The period of my switching from Neovim to Emacs seems particularly interesting. Fig 5 zooms in on that; the switch is represented by "Other Code (Emacs)" replacing "Other Code (Vim)". +The period of my transition from Neovim to Emacs seems particularly interesting. Fig 5 zooms in on that, with the switch represented by "Other Code (Emacs)" replacing "Other Code (Vim)". #+begin_export html #+end_export -It seems like getting from zero to somewhat productive took me about 11.1 hours over 4 days of just playing with Emacs, and one day with 3.8 hours on configuring and 4.4 hours on coding, apparently alternating between the two. +It appears that getting from zero to somewhat productive took me about 11.1 hours over 4 days of just experimenting with Emacs, and one day with 3.8 hours on configuring and 4.4 hours on coding, apparently alternating between the two. * Configuration -Now, let's see where these {{{num("config_hours_total")}}} hours went into. +Now, let's examine where these {{{num("config_hours_total")}}} config hours went. -Configuration sizes are a fairly common topic in Emacs discussions. I'd guess mine falls into the category of the longest, although maybe I'll do some research on that one day. Fig. 6 shows how my config size changed over time. +Configuration sizes are a common topic of discussion among Emacs users. I'd guess that mine falls into the category of the longest, although maybe I'll do some research on that someday. Fig. 6 shows how my configuration size changed over time. #+begin_export html @@ -127,44 +127,42 @@ Configuration sizes are a fairly common topic in Emacs discussions. I'd guess mi So, my Emacs.org is {{{num("emacs_org_length")}}} lines long, and the resulting init.el is {{{num("init_el_length")}}} lines long. -As you can see, I switched to [[https://leanpub.com/lit-config][literate configuration]] pretty early on; so far I didn't regret it. It's also interesting how the two sizes diverged as I was writing more elaborate commentary. +As you can see, I switched to [[https://leanpub.com/lit-config][literate configuration]] pretty early on, and so far, I have not regretted it. It's also interesting to note how the two sizes diverged as I was writing more elaborate commentary. -I also never had any substantial issues with maintaining that configuration. Perhaps [[https://www.emacswiki.org/emacs/DotEmacsBankruptcy][Emacs Bankruptcies]] are just not that common nowadays. +Also, I never had any substantial issues with maintaining that configuration. Perhaps [[https://www.emacswiki.org/emacs/DotEmacsBankruptcy][Emacs Bankruptcies]] are just not that common nowadays. -For the sake of completeness, let's compare that to my Neovim usage. Fig. 7 shows the config size dynamics for the first 400 days of using both programs. +For the sake of completeness, let's compare that to my Neovim usage. Fig. 7 shows the dynamics of config size for the first 400 days of using both programs. #+begin_export html #+end_export -As I said, Neovim seems to have changed a lot since the last time I was using it, so my number of {{{num("init_vim_length")}}} init.vim lines may no longer be relevant. Still, it's pretty interesting. +As I previously mentioned, Neovim (or rather its ecosystem) seems to have undergone significant changes since I last used it, so my number of {{{num("init_vim_length")}}} init.vim lines may no longer be relevant. Nonetheless, it's quite interesting. * Emacs packages -Working with Emacs packages was an interesting experience, not least because it was my first experience with Lisp. Fig. 8 shows the structure of the {{{num("package_hours_total")}}} hours I spent on that. +Working with Emacs packages was an interesting experience, not least because it was my first experience with Lisp. Fig. 8 shows the breakdown of the {{{num("package_hours_total")}}} hours I spent on that. #+begin_export html #+end_export -Unsurprisingly to me, my [[https://github.com/SqrtMinusOne/org-journal-tags][org-journal-tags]] tops the chart with {{{num("org-journal-tags_total")}}} hours. The most interesting part was implementing set logic on the [[https://github.com/bastibe/org-journal][org-journal]] entities in order to make a kind of query engine. But I use that package all the time. +As I expected, my [[https://github.com/SqrtMinusOne/org-journal-tags][org-journal-tags]] tops the chart with {{{num("org-journal-tags_total")}}} hours. The most interesting part was implementing set logic on the [[https://github.com/bastibe/org-journal][org-journal]] entities to create a query engine. I'm fairly certain that I'm the only user of this package, but I use it all the time. The second place, "Unknown project", stands for Emacs Lisp files that didn't belong to any project, which should be mostly built-in Emacs files. -My [[https://github.com/SqrtMinusOne/elfeed-summary][elfeed-summary]] ({{{num("elfeed-summary_total")}}} hours), [[https://github.com/SqrtMinusOne/lyrics-fetcher.el][lyrics-fetcher]] ({{{num("lyrics-fetcher_total")}}} hours) and [[https://github.com/SqrtMinusOne/reverso.el][reverso]] ({{{num("reverso_total")}}} hours) are also among the packages that I use almost daily. So I don't regret investing time in developing any of those. +My [[https://github.com/SqrtMinusOne/elfeed-summary][elfeed-summary]] ({{{num("elfeed-summary_total")}}} hours), [[https://github.com/SqrtMinusOne/lyrics-fetcher.el][lyrics-fetcher]] ({{{num("lyrics-fetcher_total")}}} hours) and [[https://github.com/SqrtMinusOne/reverso.el][reverso]] ({{{num("reverso_total")}}} hours) are also among the packages that I use almost daily. Thus, I do not regret investing time in developing any of those. * =org-roam= It's not directly related to Emacs, but I include it here because it's highly unlikely that I would have heard the term "Zettelkasten" outside the Emacs space. -And although I mentioned [[https://www.soenkeahrens.de/en/takesmartnotes][Sönke Ahrens' book]], I think the website called [[https://zettelkasten.de/posts/overview/][zettelkasten.de]] would be a better resource if you're curious what it's all about. And I was initially made curious by [[https://www.youtube.com/watch?v=-TpWahIzueg][this stream]] of David Wilson. +Although I mentioned [[https://www.soenkeahrens.de/en/takesmartnotes][Sönke Ahrens' book]], I believe the website [[https://zettelkasten.de/posts/overview/][zettelkasten.de]] would be a better resource if you are curious what it's all about. And I was initially made curious by [[https://www.youtube.com/watch?v=-TpWahIzueg][this stream]] of David Wilson. -Fig. 9 shows the dynamics of my [[https://github.com/org-roam/org-roam][org-roam]] nodes count over time. +Anyway, Fig. 9 shows the dynamics of my [[https://github.com/org-roam/org-roam][org-roam]] node count over time. A significant fraction of my {{{num("orgmode_hours_total")}}} hours spent on Org Mode went there. #+begin_export html #+end_export -A significant fraction of my {{{num("orgmode_hours_total")}}} hours spent on Org Mode went there. - * Some observations Let's see where all of that leads us.