7890yuiop

joined 1 year ago
[–] 7890yuiop@alien.top 1 points 11 months ago

If you ensure that everything that you want to be compiled is currently compiled, you can let https://github.com/emacscollective/auto-compile manage it from there.

[–] 7890yuiop@alien.top 1 points 11 months ago
  • Updates Magit and Transient
  • Plays with C-x a in Magit's menus
  • Very nice! I love that it highlights the changes. Thanks!
[–] 7890yuiop@alien.top 1 points 11 months ago
  • They used to be hard to remove. As mentioned, M-x remove-hook has alleviated that to an extent.
  • They are still harder to update because you need to remember to remove the old one when adding the replacement. I've seen any number of cases where people were inadvertently adding lots of slightly different versions of their function to a hook variable, and wondering why they were still having problems.
  • They are very unhelpful when you inspect the hook variable. Rather than seeing a function name (from which you could jump to the nicely-formatted function definition), you see at best the lisp code all jammed into a single line, and at worst a heap of unreadable byte-code.

Use named functions. It's just better.

[–] 7890yuiop@alien.top 1 points 11 months ago

You mean "as opposed to using term.el" ?

Performance, mostly. (I'm still using term myself, but suspect I'll switch to eat at some point.)

[–] 7890yuiop@alien.top 1 points 11 months ago

This is 100% expected behaviour. save-excursion has nothing to do with windows.

Perhaps you are confused about the phrase "...and the current buffer [is] restored". The "current buffer" is independent of the buffer in the selected window, and moreover need not be displayed at all. The current buffer is simply the buffer which is being acted on at the time.

[–] 7890yuiop@alien.top 1 points 11 months ago

This is 100% expected behaviour. save-excursion has nothing to do with windows.

Perhaps you are confused about the phrase "...and the current buffer [is] restored". The "current buffer" is independent of the buffer in the selected window, and moreover need not be displayed at all. The current buffer is simply the buffer which is being acted on at the time.

[–] 7890yuiop@alien.top 1 points 11 months ago (1 children)

There is a thing which provides zsh completions. It's zsh. If that's what you're wanting, then maybe don't stop using it?

[–] 7890yuiop@alien.top 1 points 11 months ago

And in case the video doesn't say it:

Ediff has its own user manual: C-h i g (ediff)

[–] 7890yuiop@alien.top 1 points 11 months ago (1 children)

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.

[–] 7890yuiop@alien.top 1 points 11 months ago

Awesome; thank you.

[–] 7890yuiop@alien.top 1 points 11 months ago

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.

view more: next ›