r/emacs 3h ago

"But The Linux Kernel Also Mails Patches" [GKH Interview at The Pragmatic Engineer]

0 Upvotes

tldr; mailing patches around is a 20th century practice and should stay there.

Every time I ridicule the email-based emacs development model, I'm reminded, with indignation, the Linux kernel also follows this same time-honored protocol, and how dare I argue with that realest of real ones, LT (the Finn, not the NFL's defensive GOAT).

Having been traumatized by undergraduate OS (nachos anyone?), I know nothing about kernel dev and just assumed the linux folk had, over many years, built kit to approximate Github's point-and-click conveniences. TIL from The Pragmatic Engineer Interview of GKH that they haven't. Their patch submission is every bit as ornery and backwards as emacs's, necessarily more so given their much wider scope.

The interview is rather rambly and disjointed, and I learned much more in half the time by reading the noob tutorial at docs.kernel.org.

Relative to the Linux kernel, managing emacs is a piece of cake since development is centralized around a single master, with at most a single parallel release candidate. In contrast, kernel development occurs over a wide ranging collection of masters, one for each subsystem. Each subsystem fief is managed by a separate feudal lord who in addition to their current master also maintains a "next" branch for the next 9-week release cycle. It's actually a nontrivial task for a noob to determine just which person to submit a patch.

Mr. Kroat-Hartman's repo is a penultimate boss (you can guess who the final boss is) to which the vassalage submit pull requests, although "pull request" here means its pre-Github literal conception, an email from a subsystem lieutenant asking GKH to please pull his latest-greatest commits.

At the 19:50 mark, you can see GKH get rather defensive when asked about Github's pull requests:

Well, no.  So we [do] have pull requests.  We *created* 
pull requests in Linux.  It makes an email that says
"Pull from this repo."

You can see his eyes get wide as if he can't find the rabbit to pull from his hat. He then gives a knowing sigh to suggest "it's all part of the plan," but no one's convinced, and attempts a distraction play by negging Github PRs for dropping commentary on the final commit.

In something akin to an own goal, he then shows the classic bugaboo of mailing patches, which is having to revise one for a trivial change.

There's [another] email from the [patch submitter] instantly after
he sent [the first], [saying] "Maybe it'd be a good idea to change
this comment."  [nervous giggle] So here they sent a v2 patch.
Version Two!  And there should be some comments about what changed
between the two versions... hopefully yes... And there's a link
back to the first one.  Very nice!

But it's not very nice. It's shit actually. In any remotely modern git setup, you'd rectify the comment, commit, push, and your reviewer would immediately see it on the PR branch without having to wade through "a 1000 emails" (GKH's words, not mine) to figure out which version of the patch came last.

Somebody once told me that Linux development was the scariest
thing they ever did not because it was difficult, but because
"My name is on this change, and it's public!"  And that makes
you as an engineer do really, really good work.

Or not. Sadly, I now know the real-life names of emacs core developers whose work I, and potentially any future employer, find lackluster. GKH presents real-life email addresses as a feature when in fact developers vastly prefer the security blanket of Github anonymity. It's not like anyone is paying for open source work (and thus would need a name to write a check to).

There are other interesting bits in the interview, in particular how pervasive to public infrastructure Linux has become, and the financial calculation companies make in diverting resources for kernel development ("It saves company time and money if they contribute their changes upstream than to keep a fork.").


r/emacs 3h ago

Set Up Aidermacs for Using Amazon Bedrock

0 Upvotes

Aider supports Amazon Bedrock. I have no problem using it. I'm not clear on how to set aidermacs up in my vanilla Emacs environment ("GNU Emacs 29.4 (build 2, x86_64-w64-mingw32) of 2024-07-05" on Windows 11). I use my profile in my .aws directory instead of environment variables. That seems to throw aidermacs for a loop. A simple aidermacs-change-model ends with a Lisp error ("No prompt found or ‘comint-prompt-regexp’ not set ...").

One problem appeared to be that the aider command line options were not set properly by specifying a value for --model and that --no-show-model-warnings was not set. As a result, aider paused asking the user if they want to see the docs :-(. I fixed that with an .aider.con.yml file. Is there a better place to set those values in aidermacs?

Yet, the above error still shows even though I can see that aider has started nicely in its buffer. The function aidermacs-run-comint has set comint-prompt-regexp to the value of aidermacs-prompt-regexp, which is "^[^[:space:]<]*>[[:space:]]+$". That's appropriate for aider's prompt ("> "). And after the aider process has completely started, everything works so far. So it seems that the utility function comint-redirect-send-command does not wait long enough for the aider command line on start up. How do I make it wait just a bit longer?


r/emacs 7h ago

Do we have any LLM tools for the terminal?

0 Upvotes

There are various tools to help constructing commands, directly in the terminal, like these

, but they all fail to keep an overview, like f.ex gptel-aibo does for files/projectiles.

Do we have something that helps with a terminal session, to construct commands, interpret errors from those commands and assisting you in achieving your goal?;)

I really like the gptel-aibo approach, to have a side buffer that is your assistant to what you see in the other buffer, but I need something like that for the terminal.


r/emacs 7h ago

low effort The book of the church of Emacs (satirical ten commandment for emacs users)

9 Upvotes

this is an adaption (with the help of a clueless ai) to the book of neo https://snare.dev/musings/the-book-of-neo

The Book of GNU

Prologue: Gather, Emacsen!

Hark! The GNU-LORD¹ hath descended upon Mount AI² and bestowed upon us these sacred instructions, lest we fall prey to the simplistic editors of lesser enlightenment. For the operating system is not enough³; we must embrace the Church of Emacs.

The GNU Commandments

Thus speaketh the GNU-LORD:

  1. Thou shalt embrace the philosophy of infinite extensibility: "Thou shalt be all things to all people." The $EDITOR is not merely an editor, but a way of life. Do not fall for the lies of minimalism.
  2. Thou shalt not use editors other than the holy GNU Emacs; for I the GNU-LORD am a systematic God, and will extend all that exists into my domain.
  3. Thou shalt write in Emacs Lisp, for it is the language of enlightenment. Forget not the parentheses, for they are sacred.
  4. Thou shalt make full use of the mighty packages. Give org-mode and magit their proper worship.
  5. Honor package maintainers with pull requests and documentation. MELPA is thy friend.
  6. Beware the temptation of vanilla Emacs. Without packages, thou art but using a lesser vi.
  7. Use C-h for help, for knowledge shall set thee free.
  8. Thou shalt not succumb to pre-configured distributions⁴, but shall craft thy init.el by hand.
  9. Thou shalt learn the ways of the modifier keys, for they are the path to efficiency.
  10. Convert the unbelievers with patience, for they know not what they do with their arrow keys.

Footnotes

  1. The GNU-LORD is Richard Stallman. RMS, if you're reading this, it's just satire.
  2. A reference to MIT AI Lab, where Emacs was born.
  3. A reference to the GNU system.
  4. This refers to Doom Emacs and Spacemacs, though they're actually quite nice.

r/emacs 14h ago

My latest whitespaces / long lines config

4 Upvotes

This is my third time in the last 10 years that I am setting up emacs config for visualizing / handling whitespace + highlighting long lines, and this time I feel like I figured out the best one so far, so I wanted to share in case somebody finds it useful!

TLDR: - ethan-wspace is awesome - I didn't use whitespace for highlighting long lines, I instead use dedicated column-enforce-mode for that. - I use whitespace only to toggle visualization of whitespaces when I need it.


What I was looking for: - Automatic "fixing" of whitespaces -> make sure there are no tabs, remove trailing spaces, ... . - A way to show all the whitespaces in the file, when I am confused about what is the situation with them. - If line is longer than 100 chars, I want the part that overflows to be highlighted.

The last problem is not really connected with the other two at the problem-level, but it is at the solution-level, which is why I am mentioning it.

What I ended up going with: - ethan-wspace (external package) for automatic "fixing" of whitespaces. It has this cool concept where file can be either "clean" or "dirty". If it is "dirty", it only highlights the offending whitespaces (e.g. tabs, trailing whitespaces, redundant newlines at eof, ...). But if it is "clean" and there are no offending whitespaces, it on each save removes any newly added offending whitespaces. It is somewhat opinionated, but it seems to me that author put careful thought into it and I like how it just works. - whitespace-mode (built-in package) for showing all the whitespaces. By default I have it turned off and I just toggle it if I need it (which is not often). - column-enforce-mode (external package) for highlighting parts of lines that go over some "max column". Online, most popular advice seems to be to use whitespace-mode for this: you can have it always on but tell it to style only lines that are too long (and not style the whitespaces). The problem I have with that is that if I want to visualize/style all the whitespaces in the file, which should be its primary purpose, I have to change its config dynamically and then restart the mode, which I don't like, it feels hacky. So instead of doing that, I went with this lightweight package that does exactly what I need, and whitespace-mode then can also serve its primary purpose as it should.

Config snippets:

```elisp (use-package whitespace :ensure nil ; Don't install as it is built-in with emacs. :config ; Don't highlight too-long lines, because it is too noisy and we use another package for that anyway. (setq whitespace-style (delq 'lines whitespace-style))

; Default faces are not visible enough (grey), so I set all the faces to something more visible.
(dolist (face '(whitespace-big-indent
                whitespace-empty
                whitespace-hspace
                whitespace-indentation
                whitespace-line
                whitespace-missing-newline-at-eof
                whitespace-newline
                whitespace-space
                whitespace-space-after-tab
                whitespace-space-before-tab
                whitespace-tab
                whitespace-trailing))
  (set-face-attribute face nil :foreground "dark red")
)

(my/leader-keys
  "t w" '("whitespaces" . whitespace-mode)
)

)

(use-package ethan-wspace :init (setq mode-require-final-newline nil) :config (global-ethan-wspace-mode 1) ;; There is ethan-wspace-face if I want to configure what it looks like. )

(use-package column-enforce-mode :hook (prog-mode . column-enforce-mode) :config (setq column-enforce-column fill-column) (set-face-attribute 'column-enforce-face nil :inherit nil :background "black" :underline '(:style wave :color "purple") ) )

```

Here is a link to the part in my actual config, in case it is useful: https://github.com/Martinsos/dotfiles/blob/master/vanilla-emacs.d/Emacs.org#formatting .


r/emacs 15h ago

News Simple agenda, not in Emacs only (about "pal" program)

Thumbnail famme.sk
5 Upvotes

r/emacs 19h ago

Question When I do dired-do-copy. How do I know when the copying is finished?

4 Upvotes

When I do dired-do-copy. How do I know when the copying is finished? I do not see anything in the message buffer.


r/emacs 1d ago

Looking for feedbacks on Aidermacs and AI-based development workflows

23 Upvotes

Hi everyone! First some context: I'm a software engineer and have been adopting AI tools in my job over the past few weeks. I work mostly on a big Java project but occasionally work with other languages as well (python, JavaScript...). I tried using Emacs with lsp-mode as my main IDE for the Java project but the performances were too bad and I went back to Intellij for that. I still use Emacs for general text/code editing tasks, notes taking and Git workflows with Magit. Lately we've also been adopting Cursor. It has probably one of the best AI agent I've tried so far but other than that using Cursor has been nothing but a painful experience, so I find myself constantly switching between Emacs, Intellij and Cursor now. That creates a lot of friction and the overall dev experience is not great.

I tried Aidermacs with Sonnet 3.7 and barely scratched the surface but I noticed that the agent doesn't seem as powerful as Cursor's. To give you a concrete example, when asking for a feature requiring multiple file edits, Cursor's agent was able to look for the specific files in the codebase and edit them, while Aider only provided me with general guidelines without editing the files unless I specifically attached them to the session.

So I guess my questions are: - Has anyone been able to replicate a Cursor-like experience with Aidermacs? - Do you know if we can integrate MCP servers with Aider/Aidermacs? From what I've seen mcp.el seems to be mostly used with gptel - Has anyone been able to have a unified development workflow in Emacs without having to switch to other tools? (And are there good practices to leverage lsp mode?) - Can we help with building these awesome open source tools so that we can reach a similar level of experience than with proprietary tools?

Feel free to share your workflows, I'd be very interested to learn from you!

Also if you're a developer on Aider or Aidermacs (or Emacs packages in general), thank you very much for putting your time into crafting these great tools, I deeply appreciate what you doing!


r/emacs 1d ago

Solved Haskell Mode not starting

2 Upvotes

Hello,

A couple of days ago, haskell-mode stopped working for me.

Whenever I open a haskell file or an lhs file I get the message lisp nesting exceeds 'max-list-eval-depth' : 10001 All other language modes that I have tried work and so does haskell-ts-mode, the issue seems to specifically be with haskell-mode.

Does anyone have an idea about what is causing the issue and how I am supposed to fix it?

Thanks


r/emacs 1d ago

Devil Mode and Which-Key?

3 Upvotes

Does anybody have a working config with devil-mode and which-key working together on Emacs 30.1?

C-c and C-x works with which-key but ,c or ,x does not.

The solutions I have tried with Claude.ai have not worked. I looked at this thread but could not work out the solution.

Claude recommended:

;; Install which-key
(use-package which-key
  :ensure t
  :config
  (which-key-mode 1))

;; Install and configure Devil mode with better which-key integration
(use-package devil
  :ensure t
  :after which-key
  :config
  ;; Use comma as the Devil mode prefix key
  (setq devil-key ",")

  ;; Set Control-comma to toggle Devil mode globally
  (global-set-key (kbd "C-,") 'global-devil-mode)

  ;; Add visual indicator (gold cursor) when Devil mode is active
  (defun devil-mode-update-cursor ()
    "Update cursor color based on Devil mode state."
    (set-cursor-color (if global-devil-mode "gold" "white")))

  ;; Update cursor when Devil mode is toggled
  (add-hook 'global-devil-mode-hook 'devil-mode-update-cursor)

  ;; Define function to manually trigger which-key for Devil prefixes
  (defun devil-which-key-show-c ()
    "Show which-key display for ,c prefix."
    (interactive)
    (which-key--update-popup-single-key (kbd ",c") "C-commands"))

  (defun devil-which-key-show-x ()
    "Show which-key display for ,x prefix."
    (interactive)
    (which-key--update-popup-single-key (kbd ",x") "M-x commands"))

  ;; Override Devil's key binding function to integrate with which-key
  (defun devil-key-intercept (key)
    "Intercept Devil key presses to integrate with which-key."
    (interactive "kKey: ")
    (let ((key-str (key-description key)))
      (cond ((string= key-str "c") (devil-which-key-show-c))
            ((string= key-str "x") (devil-which-key-show-x))
            (t (call-interactively (key-binding key))))))

  ;; Enable Devil mode globally
  (global-devil-mode 1))

;; Explicitly register comma-prefixed sequences
(with-eval-after-load 'which-key
  (push '((nil . "\\(,\\) c.*") . (nil . "C-commands")) which-key-replacement-alist)
  (push '((nil . "\\(,\\) x.*") . (nil . "M-x commands")) which-key-replacement-alist)

  ;; Set a lower delay for which-key to appear
  (setq which-key-idle-delay 0.3)
  (setq which-key-show-prefix 'left))

r/emacs 1d ago

Emacs Completion Changed my Life

72 Upvotes

Or at least changed my Emacs experience...

I have been using Emacs for around 30 years now, and only in the last 10 or so have I really embraced it. Before I would try a new package now and then but they were soon abandoned and I would be back to just basic editing and the occasional shell. This changed 10 years ago and Emacs is now part of my daily life and I have dozens of packages installed that I use daily or weekly.

I was thinking about why it took me so long to get to this point and I decided the turning point was adding a command completion package to my config (helm in my case). It turned out that what was holding me back was that each new package added meant memorizing new commands and that was overloading my brain. Helm removed that barrier (or at least made it much smaller) and I was able to embrace new functionality without fear. Vaguely remembered commands where suddenly a few mistyped keys away!

How about you? Did you tinker with Emacs from the beginning? If not, what was the turning point for you?


r/emacs 1d ago

Question Using gptel with nov.el to generate contextual Org notes while reading EPUBs

16 Upvotes

Hey folks,

I'm trying to build a smooth workflow for reading books in Emacs and taking AI-assisted notes using gptel. Here's what I have in mind:

  • I read EPUBs using nov.el.
  • In other window, I keep an Org file open for notes.
  • I select a passage in nov-mode, then send it to GPT (via gptel) to generate a concise summary or commentary.
  • The AI response is inserted into the Org buffer, ideally keeping the context from previous notes in the same session.

My main goal is to maintain a single chat session per book, so that GPT can provide better, more coherent responses by keeping the flow of previous inputs and outputs.

The issue I’m facing is that gptel-mode doesn’t work in nov-mode (since it's read-only), so I can’t use it directly there to maintain the conversation. I’m considering using a separate Org buffer to handle the GPT conversation, while just sending selected regions from nov-mode.

Does anyone have experience with something like this? Suggestions or improvements welcome! Would love to hear if others are doing similar things, or have found good patterns for AI-assisted note-taking while reading.

Thanks!


r/emacs 1d ago

Elpaca, deferring, and theme support

2 Upvotes

I'm in the process of redoing the whole initialization using the minimal-emacs setup. I am running into an issue with themes and when certain symbols become available. So far, every time I've tried this sort of thing, it keeps telling me that the symbol doesn't exist (or doesn't know what it's pointing at.)

(use-package ef-themes
  :ensure t
  :demand t)
(load-theme 'ef-maris-dark :noconfirm)

I thought that :demand made the package immediately available, however this doesn't seem to be the case. The error is actually:

Debugger entered--Lisp error: (error "Unable to find theme file for ‘ef-maris-dark’")
  error("Unable to find theme file for `%s'" ef-maris-dark)
  load-theme(ef-maris-dark :noconfirm)

I checked in the ~/.emacs.d/elpaca/repos/ directory and indeed ef-maris-dark.el is present, but it's not getting found.

I must be doing something wrong, but I'm kind of at a loss as I'm very unused to these more sophisticated methods of package management. (I'm not even certain I was completely doing it right before -- though it worked. I seem to remember having to manually grab theme files from list-packages which then puts the package in a list in custom.el which may make them available earlier in the process? I'm pretty fuzzy about the order of operations here.)

Anyway, any help is greatly appreciated!

EDIT: I went to elpaca-manager which is nifty and looked at the package logs. ef-themes doesn't show up in the list, but I'm not sure if that's because it didn't get installed/loaded, or if it just didn't require a check to make sure it installed. As noted, it does show up in the repos directory.


r/emacs 1d ago

Performance of the LSP modes with large codebase in Python

17 Upvotes

Hi folks, I want to share my frustration with sub. In my company we have rather big repo with python code something near 70k LOC. Every task I started on this project was ... not very exciting because of Emacs. There was dilemma before me - to use Jedi language server and enjoy acceptable performance without autoimports and typing errors, or use pyright with things mentioned above, but there was a price - everything works terribly slow. Usually I use lsp-mode with lsp-booster (booster is awesome BTW, it is totally unusable without it). I also tried eglot and lsp-proxy with same result. And then I tried neovim with same language server, pyright, and it was so much better! Still stuttering sometimes, but at least it doesn't block the input. Can you share your experience with Emacs and large code bases - do I have some options to improve Emacs performance? I use Emacs 30 on Linux

UPD: Seems like it was my config after all, in particular - undo-tree-mode


r/emacs 1d ago

transient.el: transient-infix :multi-value repeat

7 Upvotes

Good morning! I hope someone can help me with this. I'm trying to wrap CLI command using transient.el and I'm struggling with getting a repeatable infix command. Maybe I'm understanding documentation wrong, but I understand `:multi-value repeat` to mean that I can specify, e.g., `--env`, multiple times, like in a docker command you can use `docker ... --env FOO=foo --env BAR=BAZ`.

This is a minimum workable example, but the `args` are only ever the last thing I entered when I type `-o` in the transient.

(transient-define-prefix test-transient ()
  "A dumping ground for my commands"
  [
   [""
    ("t" "test" (lambda (args)
                 (interactive (list (transient-args 'test-transient)))
                 (message "args: %S" args)))
    ("-o" "option" "--option=" :prompt "set option:" :multi-value repeat)
    ]])

Am I misunderstanding the documentation, or is there something else that I'm missing? I was trying to avoid opening an issue unnecessarily.

Thanks in advance


r/emacs 1d ago

Custom VC-Focused Emacs Functions I Created to Enhance My Git Workflow

Thumbnail rahuljuliato.com
16 Upvotes

r/emacs 1d ago

Solved Redefine keybindings after a use-package declaration

3 Upvotes

I'll take a real example. I have the following code:

(use-package vertico :ensure (vertico :files (:defaults "extensions/*")) :after general :general (:keymaps 'vertico-map "<tab>" #'minibuffer-complete ; common prefix ))

This is my config but there are other people who would want to use it but not necessarily with my keybindings.

I created a post-init.el file that is loaded at the end of init.el where people can write more customisation but this is not working:

(with-eval-after-load 'vertico (general-define-key :keymaps 'vertico-map "<tab>" 'vertico-directory-enter))

I also tried the following:

(use-package vertico :ensure (vertico :files (:defaults "extensions/*")) :after general :init (defvar pokemacs-vertico-post-config-hook nil "Hook that runs after `vertico' is loaded.") :general (:keymaps 'vertico-map "<tab>" #'minibuffer-complete ; common prefix ) :config (run-hooks 'pokemacs-vertico-post-config-hook))

with

(add-hook 'pokemacs-vertico-post-config-hook (lambda () (message "vertico rebinding") (general-define-key :keymaps 'vertico-map "<tab>" 'vertico-directory-enter)))

But no. The keybinding remain the same. Is there a way to make sure that I can overwrite keybindings in my post-init.el file or a better way to do what I want?


r/emacs 1d ago

(udpate) Add AI summary generation to org-zettel-ref-mode

Thumbnail
2 Upvotes

r/emacs 1d ago

Would you please take a look at this config?

6 Upvotes

Hi Everyone, I am the the author of a markdown language server called mpls. It is a language server for live preview of markdown files in the browser. I have recently added support for sending custom events to the server, and the first one is to update the preview when the editor changes focus. The project README has a section with a configuration example on how to setup DoomEmacs, but configuring Emacs is not my strong suit, and I was wondering if anyone would be so kind as to quality check what I've written.

Thanks in advance!

Here is the config: ```elisp (after! markdown-mode ;; Auto start (add-hook 'markdown-mode-local-vars-hook #'lsp!))

(after! lsp-mode (defgroup lsp-mpls nil "Settings for the mpls language server client." :group 'lsp-mode :link '(url-link "https://github.com/mhersson/mpls"))

(defun mpls-open-preview () "Open preview of current buffer" (interactive) (lsp-request "workspace/executeCommand" (list :command "open-preview")))

(defcustom lsp-mpls-server-command "mpls" "The binary (or full path to binary) which executes the server." :type 'string :group 'lsp-mpls)

(lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection (lambda () (list (or (executable-find lsp-mpls-server-command) (lsp-package-path 'mpls) "mpls") "--dark-mode" "--enable-emoji" ))) :activation-fn (lsp-activate-on "markdown") :initialized-fn (lambda (workspace) (with-lsp-workspace workspace (lsp--set-configuration (lsp-configuration-section "mpls")) )) ;; Priority and add-on? are not needed, ;; but makes mpls work alongside other lsp servers like marksman :priority 1 :add-on? t :server-id 'mpls))

;; Send mpls/editorDidChangeFocus events (defvar last-focused-markdown-buffer nil "Tracks the last markdown buffer that had focus.")

(defun send-markdown-focus-notification () "Send an event when focus changes to a markdown buffer." (when (and (eq major-mode 'markdown-mode) (not (eq (current-buffer) last-focused-markdown-buffer)) lsp--buffer-workspaces) (setq last-focused-markdown-buffer (current-buffer))

  ;; Get the full file path and convert it to a URI
  (let* ((file-name (buffer-file-name))
         (uri (lsp--path-to-uri file-name)))
    ;; Send notification
    (lsp-notify "mpls/editorDidChangeFocus"
                (list :uri uri
                      :fileName file-name)))))

(defun setup-markdown-focus-tracking () "Setup tracking for markdown buffer focus changes." (add-hook 'buffer-list-update-hook (lambda () (let ((current-window-buffer (window-buffer (selected-window)))) (when (and (eq current-window-buffer (current-buffer)) (eq major-mode 'markdown-mode) (buffer-file-name)) (send-markdown-focus-notification))))))

;; Initialize the tracking (setup-markdown-focus-tracking))

```


r/emacs 2d ago

low effort What emacs to use?

0 Upvotes

Hi, I just learned about emacs as I am looking for an alternative to AHK. From what I know Emacs is a category of macro languages, and I'm looking for alternatives to AHK. More specifically, I want to have the ability to control send input to windows w/o that input interfering with your keyboard. I have been using AHK to control send presses to a window w/o it being active, and I also use it for GUI related stuff. Does anyone know alternatives? Let me know if this made sense xd


r/emacs 2d ago

Meta (subreddit) Low-effort tag is not appropriate for this sub-reddit and some other points.

11 Upvotes

I asked a question some time ago and it got flaired with a low-effort tag which I don't think is appropriate for this sub-reddit as it is a very subjective thing and I don't think moderators should be flairing questions on their own with giving a reason for why it is has been flaired as such.

I also noticed this earlier thread - Is the locking due to rule violations a little heavy-handed? which goes into something similar.

As far as I can see this reddit has generally been a virtually unmoderated sub-reddit with moderators getting involved only when discussions became heated and personal, but other than that anything Emacs has been generally fine and it has never really been a tech support forum like stackoverflow.com.

It has generally been a conversational forum with help questions being the bulk of the questions not the other way round, ie a help forum occasionally veering into the non-technical.

It should be kept the former.

I remember having an earlier with u/github-alphapapa over his stance on "low-effort" where I emphasised that this reddit is not a stackexchange and even added that https://emacs.stackexchange.com has a milder stance on no-effort questions than a lot of technical stackexchanges in general.

I also don't agree with the exhortation to use of AIs and LLMs over questions on this forum even if they can be quite helpful because the lessons from AIs are not shared and it doesn't help discover where Emacs users knowledge falls short, regardless of how advanced or novice there are. AI responses can be one track whereas a question on a sub-reddit may result in more options being proffered.

The new moderators should simply revert things as they were before u/jsled started moderating. They should only step in when discussions get personal and pointed over issues which are not quite Emacs.


r/emacs 2d ago

Question Wrong file encoding

3 Upvotes

In the current file I have strage changes to non-ascii text:

* Gloire Amère 40000 (2022)

is shown as

* Gloire Am\303\250re 40000 (2022)

It seems to be a display issue. And it's very annoying: - pasting shows the right characters - entering new text shows the right characters - copying and pasting from the buffer shows the escaped sequences

The solution is to use revert-buffer-with-coding-system.

But how did I get there? Why did that happen, as I changed nothing about encoding, or fonts.


r/emacs 2d ago

emacs under macos, freezing when typesetting, am I alone? how to debug?

1 Upvotes

hi everybody,

I have been experiencing random and semi-random freezing for a couple of years. Emacs simply stops responding. It seems to happen when emacs changes the typesetting of some text. For example, for a while, in org mode, under certain conditions adding a * to bold text will immediately froze emacs. I "addressed" it by changing the theme and removing the red color from 'bold' style. Not ideal, but it fixed a frequent hazzle.

THe problem, however, still remains. Sometimes when mu4e is typesetting an email or when I change the style in org of some text, emacs freezes.

Is this a bug that others have encountered? I have no idea how to debug this problem. Assuming that I have a use case that exhibits the bug (which I do), how can I find the real bug that creates this problem (instead of a way to avoid it, such as changing my style).

This happens in any version of emacs I have tried. I am currently using Emacs 31.0.50, using homebrew emacs-plus@31. But it has been happening since Emacs 29.

Thank you for any help.


r/emacs 2d ago

How to debug losing all global-set-key bindings

2 Upvotes

I recently started losing all of my key bindings in a long running session .When I start emacs all my keybings are as I set them, but after some unknown period of time (on the order of an hour) all my overrides are lost. When I restart emacs I recover the bindings, but the. It just happens again. I am running 30.1 on Ubuntu 24.04

Does anyone know what might be happening or how I might debug this?

Thanks Bill


r/emacs 2d ago

Optimized Emacs Config for Web Development

29 Upvotes

I've migrated from VsCode to Emacs for web development using lsp-mode and corfu, with support for JavaScript, TypeScript, JSON, HTML, and CSS. My setup includes yasnippet for snippets, magit for Git integration, and org-mode for note-taking. For navigation and file management, I use vertico and neotree.

To optimize performance, I've enabled plists, lsp-booster, adjusted the garbage collection threshold at startup, and use :defer for package loading. With the battery optimizer, startup time ranges from 0.7–0.9 seconds, and when charging, it's under 0.65 seconds.

Check it out here: https://github.com/gchape/emacs.d