Emacs

2194 readers
1 users here now

Our infinitely powerful editor.

founded 5 years ago
MODERATORS
176
177
 
 

Originally posted on https://emacs.ch/@yantar92/110571114222626270

Please help collecting statistics to optimize Emacs GC defaults

Many of us know that Emacs defaults for garbage collection are rather ancient and often cause singificant slowdowns. However, it is hard to know which alternative defaults will be better.

Emacs devs need help from users to obtain real-world data about Emacs garbage collection. See the discussion in https://yhetil.org/emacs-devel/87v8j6t3i9.fsf@localhost/

Please install https://elpa.gnu.org/packages/emacs-gc-stats.html and send the generated statistics via email to emacs-gc-stats@gnu.org after several weeks.

178
 
 

I made a material you theme for emacs that uses this rust utility called matugen to make a generated theme.

It’s not quite ready for humans to use yet….

179
 
 

Hi!

I know that there is SPC x to open the scratch buffer, but is there also a similar shortcut to quickly close/hide it again? Of course I can always CTRL x 0, but that feels clunky.

180
181
182
 
 

Here's a meme about emacs :)

183
184
185
 
 

I've always found solarized themes nice to look at from afar but way too low contrast to actually work with them. Some of the ef-themes remind me of solarized with improved contrast.

186
 
 

Devil is interesting minor mode for Emacs (not my package). I have been using it for a while and it works very nicely. Earlier I have mapped Caps Lock to control, and Enter to Enter or Control, depending whether it is pressed alone.

But Devil-mode offers similar nice, non-modal symmetric touch typing experience, without a need for dynamic keyboard remapping, and using only elisp.

The Emacs subreddit had a post about Devil-mode few days ago, so I try to be active and Post here. Hopefully Lemmy will get more active Emacs users and posts, Reddit being now what it is.

187
 
 

The lack of keyboard interface on Lemmy is killing me, but really what I want is a good client in Emacs. However, it's beyond my Elisp to design and start such a project, but I could probably help. Anyone on it?

188
 
 

I have been using Emacs for 15 years. In that time, I have had large configs, spacemacs, doom, evil/non-evil. This is my current configuration. Package installation is managed via a home-manager nix flake.

I am surprised that I was able to remove everything surrounding vertico and go with fido-mode easily.

I have a parallel configuration that removes lsp and uses eglot, but it's not as fleshed out. I need to be able to use both eslint and typescript language servers and I don't have a reliable way to do that in eglot.

I am currently using emacs-head. I know I don't need to use-package builtin emacs packages but I do anyway.

(use-package isearch
  :init (setq isearch-allow-motion t
              isearch-motion-changes-direction t
              isearch-allow-scroll t
              isearch-lazy-count t))

(use-package frame
  :bind (("C-z" . nil))
  :config (set-frame-font "Iosevka-12" nil t))

(use-package icomplete
  :config (fido-vertical-mode 1))

(use-package minibuffer
  :init (setq completion-cycle-threshold t))
(use-package battery :config (display-battery-mode 1))
(use-package cus-edit :init (setq custom-file "~/.emacs.d/custom.el"))
(use-package custom :config (load-theme 'modus-vivendi-tinted t))
(use-package ediff-wind :init (setq ediff-window-setup-function 'ediff-setup-windows-plain))
(use-package files
  :init (setq make-backup-files nil
              confirm-kill-emacs 'y-or-n-p
              find-file-visit-truename t))
(use-package menu-bar :config (menu-bar-mode -1))
(use-package mouse :init (setq mouse-yank-at-point t))
(use-package tool-bar :config (tool-bar-mode -1))
(use-package savehist :init (savehist-mode))
(use-package scroll-bar :config (scroll-bar-mode -1))
(use-package grep :config (grep-apply-setting 'grep-find-command '("rg -n -H --no-heading -e '' $(git rev-parse --show-toplevel || pwd)" . 27)))

(use-package magit
  :init
  (setq git-commit-summary-max-length 50)
  :config
  (add-to-list 'git-commit-style-convention-checks 'overlong-summary-line))

(use-package git-timemachine)

(use-package minions
  :config (minions-mode 1))

(use-package js
  :after apheleia
  :init
  (setq js-indent-level 2)
  (when (featurep 'treesit)
    (add-to-list 'apheleia-mode-alist '(js-ts-mode . prettier-javascript))))

(use-package js
  :bind
  (:map js-ts-mode-map ("M-." . nil))
  (:map js-mode-map ("M-." . nil)))

(use-package nix-mode)

(use-package markdown-mode)

(use-package project)

(use-package apheleia
  :config
  (apheleia-global-mode +1)
  (defalias 'format-mode 'apheleia-mode))

(use-package go-mode)

(use-package deadgrep :bind ("<f5>" . deadgrep))

(use-package org-roam
  :init
  (setq org-roam-directory (file-truename "~/org/roam"))
  :config
  (org-roam-db-autosync-mode))

(use-package treesit
  :if (featurep 'treesit)
  :init
  (setq treesit-font-lock-level 4))

(use-package treesit-auto
  :if (featurep 'treesit)
  :config
  (global-treesit-auto-mode))

(use-package webpaste)

(use-package copilot
  :hook (prog-mode . copilot-mode)
  :bind (("C-c c" . copilot-complete)
         (:map copilot-completion-map
               ("C-g" . copilot-clear-overlay)
               ("C-c a" . copilot-accept-completion)
               ("C-c n" . copilot-next-completion)
               ("C-c p" . copilot-previous-completion))))

(use-package lsp-mode
  :init
  (setq lsp-headerline-breadcrumb-enable nil
        lsp-enable-snippet nil
        lsp-completion-provider :none)
  :hook ((js-ts-mode . lsp-deferred)
         (go-mode . lsp-deferred)
         (typescript-ts-mode . lsp-deferred))
  :commands (lsp lsp-deffered))

(use-package flycheck
  :init (global-flycheck-mode))

(use-package all-the-icons
  :if (display-graphic-p))
189
 
 

Just to make this official: use-package has now landed on the emacs-29 branch. This means, barring any major world disasters, solar storms, or similar, use-package will officially be a part of Emacs 29.

190
 
 

I've been exploring Emacs vanilla and found some gems. I'll list those and would like you to list as well in special those that you migrated to from a non built-in package.

  • fido: minibuffer completion
  • tab-bar: flexible tabs for frames and windows
  • desktop.el: saving/restoring sessions
  • rgrep: grep recursively
  • ibuffer: has filtering functionality
  • vc: frontend to git, mercurial, but very limited in comparison to magit
191
 
 

This is a fairly niche thing, but maybe there's a couple others out there who can use it. I wrote this several years back and still use it regularly, so thought it was time to make it public.

I use Org Mode to manage my calendar, but I also need:

  • Access to it on my phone, in some kind of mobile-friendly way. Unfortunately, Emacs isn't that, so I use org-export's iCalendar backend to generate and upload .ics files, which I subscribe to on my mobile calendar.
  • I often put appointments that need to occur at a physical location on my calendar (dentist, interview, etc), and need to easily get directions to those places on my phone.

If you set the LOCATION property of an entry in Org Mode, that gets put into the location of that appointment in the .ics file, which makes it very easy to bring up navigation from the calendar.

org-street is a tool to make populating those locations easy. It uses OSM's free Nominatim geocoding service (by way of another library I wrote) to transform text like "ground kontrol" into its physical address, and automatically put it in the LOCATION property. Nominatim is completely free and requires no account, API keys, or other such barrier to entry nonsense, so there's zero setup required.

I'm sure there are other interesting things that can be done with the nominatim and/or org-street packages as well.

192
193
194
195
 
 

Emacs eww cannot handle JS, which lemmy requires for function.

196
 
 

I decided to use emacs calc for my School assignments instead of a TI calculator.

calc is my favorite calculator I have used; it is versatile and efficient. It has useful features that are not in other calculators that I have used.

197
198
199
200
view more: ‹ prev next ›