• 0 Posts
  • 14 Comments
Joined 1 year ago
cake
Cake day: October 1st, 2023

help-circle




  • M-x find-library python, followed by C-s outline- shows what’s happening: python-base-mode sets the local outline variables locally, in its mode body. Since mode hooks always run after the body of their mode definitions, you could add a bit of code to the python-base-mode-hook (or a parent of it, like prog-mode-hook) setting your desired outline config there (i.e. overwriting what python mode did).

    I do that using outli simply (in a use-package stanza):

     :hook ((prog-mode text-mode) . outli-mode))
    

    BTW, here’s a handy guide (from this epic answer) to what runs in which order upon invoking a derived major mode like python-ts-mode:

    So when we call (child-mode), the full sequence is:
    
    (run-hooks 'change-major-mode-hook) ;; actually the first thing done by
    (kill-all-local-variables)          ;; <-- this function
    ,@grandparent-body
    ,@parent-body
    ,@child-body
    (run-hooks 'change-major-mode-after-body-hook)
    (run-hooks 'grandparent-mode-hook)
    (run-hooks 'parent-mode-hook)
    (run-hooks 'child-mode-hook)
    (run-hooks 'after-change-major-mode-hook)
    







  • When I hear of a package that may be interesting, I immediately check its repo page to see how many issues and PRs are still open. I look to see whether they have garnered any responses, especially if the submissions are of high quality. Years of issues building up isn’t a good sign. This isn’t 100% reliable, as different skilled developers approach issues and PRs quite differently, but it gives you some information. And there are outliers, like multiple-cursors, whose developer is very skilled and motivated, but whose popularity overwhelmed his resources.

    For simple package, “no updates” for 5 years is usually fine. But before investing energy in a larger new package, I want to know whether it will still be working well in the next 5 years.