💾 Archived View for tilde.pink › ~denn › posts › Jan2521.gmi captured on 2023-12-28 at 15:35:38. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

We survived! Also, nerdery...

So, we survived Inauguration Day. And without any serious shenanigan even. Trump ha wandered off to Mar-a-Lago (at least until Palm Beach throws him out), and is threatening to form a new political party. If he does that all he'll do is drag quite a lot of votes from the GOP and insure they never win another election. That'd just be *terrible*. Really. I'd be sooooooo sad.

Anyway, on the nerdery front... I mentioned to a friend of mine that I'd tried to like emacs a few times, but couldn't get used to it. They suggested I try spacemacs because it's got a lot of useful things pre-installed, the config is done by emacs geeks that know more about emacs than I ever will, and it fixes a lot of emacs' terrible keybindings. That was a few days ago. I've been using spacemacs ever since. Yeah, spacemacs has made it *MUCH* easier to get into. And god help me, I've discovered org-mode. It's pretty handy and amazingly flexible. And I really like org-capture. A lot. And I'm picking up elisp whether I want to or not, it seems.

On that note, I wanted to be able to have journal stuff in files with one month per file instead of just one universal journal file. I like journalling and was worried my journal file would get impractically large. Fortunately templates let you specify the target in a variety of ways including calling an elisp function to select the right file and place the cursor appropriately. Turned out to not be too hard. I found a bit of code on Stackoverflow that did most of the work with a bit of modification. This was the end result...

 ;; Yoinked from https://stackoverflow.com/questions/56274067/how-to-use-the-function-option-of-org-capture-correctly and modified a bit.
  (defun my-visit-timestamped-file ()
    "Visit a journal file whose name and path are based on the current timestamp."
    (interactive)
    (let* (
           (curr-date-stamp (format-time-string "%Y/%b.org"))
           (file-name (expand-file-name curr-date-stamp "~/Documents/orgfiles/journals/")))
      (set-buffer (org-capture-target-buffer file-name))
      (goto-char (point-max))))

In the future I may look into writing some tutorials for spacemacs, or at least some reports of my flailing around...