• 0 Posts
  • 8 Comments
Joined 1 year ago
cake
Cake day: October 12th, 2023

help-circle

  • Have a look at the approach taken by the logos.el package. There’s a section in the manual called Leverage logos-focus-mode-hook.

    The idea there is that when you enable the logos-focus-mode, you’ll often want to change some other minor modes and variables too. But when you disable logos-focus-mode, you’ll want those other minor modes to revert to their previous value. The Logos package provides a few convenience functions to remember the previous values, and they are automatically restored when logos-focus-mode is turned off.

    Perhaps the code for that could be made generic, instead of being coupled to the logos-focus-mode?



  • The org-roam-timestamps package might be worth a look. It adds created/modified timestamp properties to org-roam nodes, and automatically updates these when saving the node.

    An interesting feature is that it can optionally keep a sequence of modification timestamps, not just the last-modified timestamp.

    It doesn’t actually change the SQLite schema though. All it does is update the properties in the Org file. (Org-roam considers the files to be canonical; the DB is really just a disposable index for speedy lookups.) The node table already has a properties column, so the created/modified timestamps end up buried in this.

    The org-roam-timestamps package is a bit lacking in features, I’d say. All it does is save and update the timestamp properties for each Org-roam node. It doesn’t provide any useful query functions. I’ve had this package installed for ages, but I don’t really do anything with it. For now, it’s just collecting timestamps for the sake of posterity.

    I have a vague idea to write some query functions, such as “what nodes did I create/modify on the same day as the current node?”. The results could populate a section in the Org-roam buffer (after the backlinks), or an Org dynamic block.




  • We’re expecting RET to perform minibuffer-exit. That’s the default keybinding from minibuffer-mode-map. Perhaps another keybinding (from another minor-mode keymap, say) is overriding the minibuffer’s RET binding.

    it just goes to the next line

    Hmmm, this sounds familiar. I had this problem last year.

    Do you have Paredit mode enabled in the minibuffer? (You might look at the value of eval-expression-minibuffer-setup-hook.)

    The paredit-mode-map has the paredit-RET command bound to RET instead. This command usually puts a new line in place.


  • For variables you created (i.e. named) yourself, you can also use defvar, which lets you give it a docstring.

    To set a different value according to the OS, you can conditionally set the value based on a system-type.

        (defvar fuzzbomb/startup-theme 'modus-vivendi-tinted
            "The theme to enable during startup.
    
        This variable should be set before the first call to `load-theme' in
    `init.el'.")
    
          (if (eq system-type 'windows-nt)
              (setq fuzzbomb/startup-theme 'ef-maris-light))