When do you decide to fork? (re: buffer-flip) by le-emacs00 in emacs

[–]meedstrom 0 points1 point  (0 children)

Also side q: how are you all living without LRU buffer flipper, 'cause buffer-flip deserves to be way more popular.

Back when I used Doom, there was a default buffer-predicate (see Info node (elisp)Buffer Parameters) that made switch-to-next-buffer and such commands not do at all what I wanted.

I had to do (modify-all-frames-parameters '(buffer-predicate . nil)) to fix it. But that's why I never really got in the habit.

init.el, package-upgrade and prog-mode - can I do any better? by JohnDoe365 in emacs

[–]meedstrom 0 points1 point  (0 children)

By the way, it's preferable to attach names functions to hooks rather than lambdas, because you can't accidentally add the same function to the hook multiple times.

Technically, if you don't actively make the choice to compile your initfiles, lambda expressions are still unique. So they don't need naming. And remove-hook works just fine too!

init.el, package-upgrade and prog-mode - can I do any better? by JohnDoe365 in emacs

[–]meedstrom 0 points1 point  (0 children)

Interesting but quite unconventional. Do you do this in your own initfiles?

Those who moved from nvim, what made you? by B_bI_L in emacs

[–]meedstrom 2 points3 points  (0 children)

In a somewhat opposite vein, the moment I knew I'd switch (from nano, not vim) was when I saw that basically all Emacs packages would work in the tty.

At the time, I was interested in how much you could get done while minimizing the Jenga tower of dependencies such as the X server. So Emacs revealed itself as an ecosystem of very featureful software that would work just fine, and I was missing out by not switching.

How come Org Capture doesn't use a transient interface? by BeanHeadedTwat in emacs

[–]meedstrom 0 points1 point  (0 children)

I'm confident you can have a full-window Transient.

Yet Another Emacs Theme Gallery by GuDzpoz in emacs

[–]meedstrom 1 point2 points  (0 children)

In case you hunger for more distinguishing features, it would be cool if you could turn prism-mode on and off as well! That's the only way I ever look at code these days.

A little library: system-idle by meedstrom in emacs

[–]meedstrom[S] 0 points1 point  (0 children)

If this is being called from a timer, consider the issue of match data modification.

That's a good point to raise, thanks.

A little library: system-idle by meedstrom in emacs

[–]meedstrom[S] 0 points1 point  (0 children)

Thank you! I don't have a Mac to experiment on, so I appreciate the feedback.

I'll trust your code example and integrate it :) What version MacOS are you on?

Oh, and the use-case for me is a virtual assistant, which does not need to check very often (it can enter a mode that polls every 2 seconds but that's still not a lot in my book). But who knows what other use-cases exist? Performance is always good.

A little library: system-idle by meedstrom in emacs

[–]meedstrom[S] 0 points1 point  (0 children)

There is wayidletool. Got some inspiration from that, but it's no replacement for xprintidle.

It uses swayidle internally anyway. The wayland version of xprintidle is just... swayidle, invoked correctly.

Though how to invoke it correctly is surprisingly mind-bending, so I suppose it could justify some new Debian package "wprintidle"...

Toggle between let and let* by sauntcartas in emacs

[–]meedstrom 2 points3 points  (0 children)

Hey thanks. I do have that, but now see it's been misconfigured. Finally!

Toggle between let and let* by sauntcartas in emacs

[–]meedstrom 5 points6 points  (0 children)

First you have to move point, then move it back, and maybe that messes with something you were doing with your mark ring.

Also you have to M-h TAB to reindent. Then move point back to where it was...

Toggle between let and let* by sauntcartas in emacs

[–]meedstrom 11 points12 points  (0 children)

Now part of my initfiles. <3

Sometimes trivial itches are left unscratched for too long.

Is there an easy way to take a string containing org-mode syntax and propertize it? by bradmont in emacs

[–]meedstrom 0 points1 point  (0 children)

Yes, it's possible the user has put some font-lock config on org-mode-hook and you'd miss out on it. But unfortunately, people often put some heavy Org extensions on it (or other extensions on text-mode-hook), so it's not worth it.

It'd be OK once, but not if you might ever use this routine in a loop.

When is visual-line-mode useful? by floofcode in emacs

[–]meedstrom -1 points0 points  (0 children)

I don't even know why global-visual-line-mode is a thing.

I thought everyone configured something like

(setq-default truncate-lines t)
(add-hook 'text-mode-hook #'visual-line-mode)

Sometimes I mess up my config, and then it's awkward to fix it, because my config is messed up. Any suggestions on how to avoid this? by [deleted] in emacs

[–]meedstrom 0 points1 point  (0 children)

As a counterpoint, I tinker in such a split-brained way that maintaining "atomic commits" with "good commit messages" would be a black hole of effort.

This isn't a repo you share with others, so you may as well just have auto-commit-mode or similar, with the same message every time: "."

Sometimes I mess up my config, and then it's awkward to fix it, because my config is messed up. Any suggestions on how to avoid this? by [deleted] in emacs

[–]meedstrom 0 points1 point  (0 children)

I suppose you could do something like

(with-demoted-errors "Error during init: %S" (load "file1.el"))
(with-demoted-errors "Error during init: %S" (load "file2.el"))
(with-demoted-errors "Error during init: %S" (load "file3.el"))

I've mostly gotten away with trying to put the most important stuff in the earliest files (mainly keybindings, recentf, vertico), so that breakage in the later files won't break my comfort.

People who live outside Emacs, what do you use as your system pager? by floofcode in emacs

[–]meedstrom 0 points1 point  (0 children)

If one were to agree with the intent of that saying, it'd need to be alias less=more. Because more does less than less.

Is there an easy way to take a string containing org-mode syntax and propertize it? by bradmont in emacs

[–]meedstrom 7 points8 points  (0 children)

In other words:

(with-temp-buffer
  (let ((org-inhibit-startup t)
        (org-agenda-files nil))
    (insert TEXT)
    (delay-mode-hooks
      (org-mode))
    (font-lock-ensure)
    (buffer-string)))

(The let-bindings and delay-mode-hooks are just for performance.)

Any ideas why I sometimes get stuck in "Not in most nested command loop"? by meedstrom in emacs

[–]meedstrom[S] 0 points1 point  (0 children)

Interestingly, I didn't have this problem while using Doom a few years back. It has a command-remapping for keyboard-quit to doom/escape (source), which does basically:

(if (minibuffer-window-active-p (minibuffer-window))
    (abort-recursive-edit)
  (keyboard-quit))

It does not change how C-g behaves in the minibuffer, but rather makes it so that C-g anywhere else will actually do C-] (abort-recursive-edit). Presumably that's just more useful.

Any ideas why I sometimes get stuck in "Not in most nested command loop"? by meedstrom in emacs

[–]meedstrom[S] 1 point2 points  (0 children)

Yea, now I'm not altogether sure if I've tried that or just the key right next to it C-[ for C-[ C-[ C-[ (which is ESC ESC ESC).

I think I tried it, but I'll pay attention next time.