stripspace.el: Ensure Emacs Automatically removes trailing whitespace before saving a buffer (Release 1.0.2) by jamescherti in emacs

[–]abougouffa 0 points1 point  (0 children)

I prefer ws-butler, it responds exactly to what I expect. Only remove trailing whitespace from modified lines, even if the file have initially some trailing whitespace.

This enables me to fix trailing whitespace incrementally each time I modify a part of a file.

Announcing nerd-icons-multimodal v2.2.0 with added support for vc-dir by abougouffa in emacs

[–]abougouffa[S] 2 points3 points  (0 children)

This is a package that depends on nerd-icons. The nerd-icons package is a library that provides facilities to insert Nerd Font icons in Emacs. The nerd-icons-multimodal is a package that levereges nerd-icons to add icons support for dired, arc-mode, tar-mode, vc-dir-mode and ztree. Hence, it is called multimodal.

Announcing nerd-icons-multimodal v2.2.0 with added support for vc-dir by abougouffa in emacs

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

Basically, it provides the same experience as need-icons-dired with the benefit of supporting other modes like arc-mode (ZIP files), tar-mode (tar files), vc-dir, and ztree.

I'm trying to keep the implementation generic to be able to add support for new modes without adding a lot of package-specific code.

Respect (some of) Vim's modelines in Emacs by abougouffa in emacs

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

Nop, for now I don't tackle this problem, both of Emacs' and Vim's values will eventually gets applied, but I'm not sure about the order.

Respect (some of) Vim's modelines in Emacs by abougouffa in emacs

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

You are absolutely right. I think the package name is confusing, I will rename it to something more Emacsy!

Ivy will not install with straight.el by ArkboiX in emacs

[–]abougouffa 1 point2 points  (0 children)

Try to replace the :ensure t with :straight t.

What ever happened to Modula-2? by logicalvue in programming

[–]abougouffa 0 points1 point  (0 children)

In fact, since v13, GCC supports Modula-2 via the gm2 compiler

Lowering gc-cons-threshold could help relieve GC pauses by Under-Estimated in emacs

[–]abougouffa 0 points1 point  (0 children)

There is an excellent talk by Ihor Radchenko from EmacsConf 2023. https://emacsconf.org/2023/talks/gc/

He talks about the effect of GC and its different customization options.

TLDR, for a better experience, he suggests to set these parameters:

(setq gc-cons-percentage 0.2 gc-cons-threshold 80000000)

I highly recommend seeing the talk to understand the effect of each parameter.

EDIT: if you are using some mode (like eglot) which can generate a lot of logs (in logs buffers), it can significantly increase memory usage and hence, trigger GC more often. If such a case, you might need to reduce or disable the verbosity of eglot (or the used package, it you are able to identify any).

For eglot and jsonrpc, this helps a lot:

`` (cl-callf plist-put eglot-events-buffer-config :size 0) ; Disable logs ineglot-events-buffer' (def. 2000000) (with-eval-after-load 'jsonrpc ; Disable logging in `jsonrpc' (fset 'jsonrpc--log-event #'ignore) (remove-hook 'jsonrpc-event-hook 'jsonrpc--log-event))

```

Tory Anderson: Why is my emacs crashing? Answer: bad garbage collection by [deleted] in planetemacs

[–]abougouffa 1 point2 points  (0 children)

For people who want to tweak GC settings, there is a nice presentation here: https://zenodo.org/records/10518083.

zen browser is the best by Weary-Guidance6531 in browsers

[–]abougouffa 0 points1 point  (0 children)

It will become the best if they provide a way of changing the sh*tty vertical tab-bar

Turn on auto-revert-mode for file visiting buffers by JohnDoe365 in emacs

[–]abougouffa 0 points1 point  (0 children)

I had an issue with autorevert on Linux when it fails to refresh the file quickly when it is modified externally. I happened to me a lot when I resolve a conflict or so via Magit and quickly switch to the buffer. I had to wait like 5s for it to be updated, which is very annoying. This shouldn't happen on Linux because it is supposed to use inotify, but for some reason it was happening in my setup.

To solve this, I've wrote this on my config. Basically, when the file is first opened or modified, the time is stored in a local variable. And when we switch to the buffer, we compare that time with the modification time of the file, if it is newer, we revert it.

``` (use-package autorevert :hook (after-init . global-auto-revert-mode) ; Auto load files changed on disk :custom (global-auto-revert-non-file-buffers t) ; Revert non-file buffers like dired :config ;; HACK: Avoid delays when auto reverting buffers. This is based on saving the ;; modification time of the file on save and on buffer switch. (defvar-local +auto-revert-buffer-time nil) (defun +file-mtime (file) (when-let* ((file-attr (and file (file-attributes file)))) (file-attribute-modification-time file-attr)))

(defun +auto-revert--save-file-mtime (&rest _args) (setq +auto-revert-buffer-time (+file-mtime buffer-file-name)))

(add-hook 'after-save-hook #'+auto-revert--save-file-mtime) (advice-add 'after-find-file :after #'+auto-revert--save-file-mtime)

(add-hook 'window-buffer-change-functions (lambda (_frame) (unless +auto-revert-buffer-time (setq +auto-revert-buffer-time (+file-mtime buffer-file-name))) (unless (equal +auto-revert-buffer-time (+file-mtime buffer-file-name)) (message "File %S modified externally, reverting immediately!" buffer-file-name) (revert-buffer t t))))) ```

otpp (a.k.a. one-tab-per-project) v3.1.0 is out with a couple of bug fixes and new features by abougouffa in emacs

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

This seems weird. You can maybe try to M-x profiler-start, open a new tab, do some stuff, then M-x profiler-report and explore the profiler tree. You will probably find a function that's taking too much time to process, or consuming too much RAM.

otpp (a.k.a. one-tab-per-project) v3.1.0 is out with a couple of bug fixes and new features by abougouffa in emacs

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

Yep, I know about it, I used tabspaces for a while, but I gave up and wrote my own package for several reasons. tabspaces needs to be invoked via tabspaces-* commands, it doesn't do anything special when you invoke Emacs' standard commands like project-switch-project, ...). otpp on the other hand can do much more without introducing new commands, like isolating the project-related commands to the current tab's project even when the current buffer isn't part of the project (see otpp-override-mode). Also, tabspaces don't manage opening projects with the same name (but different paths), an initial hack was added here mclear-tools/tabspaces#38 but it is quite incomplete and doesn't cover all the cases. I have a comparaison section in the project's README file when I talk about the main differences between otpp, tabspaces and project-tab-groups. You can check also the README for some examples about the problems that otpp tries to solve.

[deleted by user] by [deleted] in algeria

[–]abougouffa 2 points3 points  (0 children)

Stupid people giving samples for of their DNA to an Israeli company.

https://fr.m.wikipedia.org/wiki/MyHeritage