• 3 Posts
  • 20 Comments
Joined 3 years ago
cake
Cake day: August 8th, 2023

help-circle





  • The problem I have which which-key is that it applies only after a prefix.

    There are commands which-key-show-major-mode and which-key-show-top-level, which you could use. On the embark side, there is embark-bindings which by default gives you bindings from the major mode and minor modes, but with C-u will give you global bindings.

    Mutating a keymap with setc[ad]r is evil!

    Agreed.

    why not use (menu-item “dummy” KEYMAP :filter FUNCTION) instead?

    Only because I didn’t think of it!





  • There are a couple of functions that web apps almost always have and that native apps tend to lack: (1) selecting and copying text from anywhere in the app to the clipboard; (2) bookmarking individual views within the app. Of course, natives apps in principle could be faster and use more of your hardware —in practice though, they tend to be horribly bloated electron crapps. 😅 So yeah, a decent native app can be better than a web app, but good luck finding one for your purpose.









  • As you say, they are basically just window configurations, so I do use them ocassionally. If, in addition to remembering an Emacs window configuration I also want to remember whether the frame is maximized or not, I will use frames instead of tabs. I used to put window configurations into registers, before tabs existed, but tabs are better because when you put a window configuration into a register it even remembers the location of point in every buffer. This means that when you restore the window configuration from the register, points get restored to where they were when you stored the configuration, not to the last time you were using it. In this sense tabs are like window configuration registers that automatically update every time you switch away from them.





  • By default undo does work in the scratch buffer so it is something in your configuration that is keeping this from working. As a quick way to check, try running emacs -q, which skips loading your configuration, and see if you have undo in the scratch buffer there; if so, it’s definitely something you have in you configuration.

    You can bisect your configuration to figure out how you are deactivating undo. You can do this manually or with the help of the bug-hunter package.


  • I looked at the macro expansion of the form you wrote and it looks like gibberish, so I don’t think the :hook keyword allows expressions to be used as hooks, you need to define a function and use the function name:

    (use-package pascal ; presumably
      :init
      (defun remove-pascal-completions ()
        (remove-hook 'completion-at-point-functions
                     'pascal-completions-at-point t))
      :hook (pascal-mode . remove-pascal-completions))
    

    Also, the weird single quote character you used probably doesn’t work in Emacs (but maybe you have normal single quotes in your file and it’s just lemmy’s markdown messing things up).