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

help-circle






  • However, if attempt it on a remote file (opened over tramp) it says it can’t find the binary and prompts me to point it at it. I could do that, but then the language server would start on that same machine and that’s a no go since it’s a shared login machine.

    How would the local language server inspect a file which is on some other machine?

    You should start by establishing how that is going to work, and add that information to your question.



  • If you’re sold on sticking with Emacs, then learning elisp will unquestionably pay dividends, and the more you learn the more you’ll be able to do (but you don’t need to understand everything in order to do anything).

    and how exactly can i improve my emacs experience if i learned elisp?

    That’s the thing – it’s up to you. The ability to “scratch any itch” is what elisp give you. That doesn’t mean any given thing is easy to do (although it might be) but, to a significant extent, if you can identify a problem then implementing a solution is also a possibility.









  • I don’t use use-package, but I’ve seen a lot of questions from users who do use it but don’t understand how to use it, or what it’s going to expand to, or what the things that it expands to actually do. My conclusion has been that for some users it introduces as many problems as it solves. I think those users would be better off if they learned how to manage their config without it first, and only considered use-package after understanding the more fundamental building blocks upon which it is built.

    It’s certainly not something you need to use, in any case. It’s clearly an invaluable system to many users, but if you don’t get along with it, don’t use it.




  • Looks like a bug (whether documentation or code) as read-kbd-macro still claims to return a string if possible, but nowadays it forcibly returns a vector. Please M-x report-emacs-bug to get that clarified.

    You could extract a string of characters from the vector:

    (mapconcat (lambda (event)
                 (and (characterp event)
                      (char-to-string event)))
               (read-kbd-macro "C-c"))
    

    But if you look at the code for read-kbd-macro you’ll see that it calls this:

    (defun edmacro-parse-keys (string &optional _need-vector)
      (let ((result (kbd string)))
        (if (stringp result)
            (seq-into result 'vector)
          result)))
    

    Hence the string value you wanted is coming from kbd:

    (kbd "C-c") => "^C"
    

    There are of course arguments you can pass to kbd which won’t return a string, but that would always have been the case for your code, and presumably you’re not attempting to use any of those.