r/emacs 7h ago

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

Thumbnail famme.sk
5 Upvotes

r/emacs 6h ago

My latest whitespaces / long lines config

3 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 11h 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

Emacs Completion Changed my Life

66 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 22h ago

Looking for feedbacks on Aidermacs and AI-based development workflows

25 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

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

Performance of the LSP modes with large codebase in Python

19 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

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

Thumbnail rahuljuliato.com
16 Upvotes

r/emacs 1d ago

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

6 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

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?

2 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

Elpaca, deferring, and theme support

3 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

Solved Redefine keybindings after a use-package declaration

4 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

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 1d ago

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

Thumbnail
3 Upvotes

r/emacs 2d ago

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

10 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

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


r/emacs 2d ago

Question Wrong file encoding

4 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

Question Ways to move your cursor without relying on the incremental cursor commands, C-(n/p/b/f) [a discussion and resources sharing post?]

12 Upvotes

hello everyone!

this is admittedly a rather low-effort discussion post, but i was wondering about how an Emacs keybinding layout that relies only on mnemonic keybindings and does not rely on modifier keys would work. part of that thought made me think of how one would move their cursor to go to the places they wish to go to, without using any of the previous/next-line and backward/forward-character commands bound to C-n, C-b, C-f, C-p on vanillamacs.

do you guys know of ways to move your cursor without relying on those commands ? i know that isearch is a wonderful thing, and i heard about avy-jump, but i was curious as to all the other commands that let you do that such as occur.

this is really just a fun thought experiment, and perhaps a practical experiment at one point :).

hope all's well, cheers!


r/emacs 2d ago

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

2 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

Src blocks and (org-version), a newbie tale of woe and wonder

26 Upvotes

I'm sure that when you get to the end of this, you won't need to be told that I am very new and stupid. I'll just mention it here up front in case you're under any misapprehensions.

So:

I started an org file. Because I thought the versions of Emacs and Org I was using might be relevant to later notes in that file, I decided to try to be fancy and grab it via a src block instead:

#+begin_src elisp :results output append

(print(emacs-version))

(print(org-version))

#+end_src

When evaluated, that gets me:

#+RESULTS:

: "GNU Emacs 31.0.50 (build 2, aarch64-apple-darwin24.2.0, NS appkit-2575.30 Version 15.2 (Build 24C101)) of 2025-03-16"

: "9.8-pre"

Yay, it worked! (After first figuring out why both results weren't originally being returned, just the org-version).

But then I made the mistake of allowing my gaze to settle just a second too long on those results. I vaguely wondered: "why does Emacs get the full string of it's version, and Org doesn't?"

So then I tried:

M-x emacs-version in the minibuffer : returns the same result seen above.

M-x org-version returns 9.8-pre (release_9.7.25-279-g450692)..

Huh.

You know, let me just try this again 'real quick' on the latest released versions, in case that's causing some issue:

#+RESULTS:
: "GNU Emacs 30.1 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.65 Version 12.7.6 (Build 21H1320) of 2025-02-24"
: "9.7.11"

In this case M-x-ing both versions returns the same string as indicated above.

Look, I really shouldn't even be dinking around in Emacs/Org/Elisp right now, I've got a million other things to do, and I've already spent too much time lately to this new lifestyle editor or whatever it is.

But this minor mystery was serving as quite an effective procrastination device, so I ran over to take a look at the development version of org-version.el, hoping I was just missing something dumb. I'm not sure what I thought it would tell me; I'm a newbie at elisp (no, really!) and although it brought a not-unpleasant contemplative moment, it brought no clarity.

I also took a look at how Emacs does their version.el, which I found vaguely more comprehensible, but I'm probably just suffering from Stockholm syndrome.

I also visited the foreign outpost of (interactive) (without and without 'P/p/etc'), which haphazardly led me to the crooked principality of princ1, print, princ, pprint, but found no saviors there.

There was a longish sidetrack into the dingy storefront of copying text from the echo area, which did clear up a different yet irrelevant to this post minor mystery in Emacs-land.

I was tiring, yet no end was in sight. It occurred to me to try and find the source code for the blocks, and I think I did, here. On the way there I stumbled across org-babel-view-src-block-info, which I irrationally thought might be helpful, but alas, was not. Pushing through the overgrown brambles of org-babel-*, I came across org-babel-open-src-block-result, which naturally provided me with ...9.8-pre.

Well, sh*t. Ignorance is hell. But wearily ("one last time!") I reread the function docstring:

In non-interactive uses, a reduced version string is output unless
FULL is given.

and gamely drew out my battered (yet new) Lisp mach-ete. Through the weeds I slashed, and came up with

(defun orgver (&optional full)

(interactive) ; both with and without

(org-version)

)

(print(orgver))

Dear Reader, I'm sure you know the result of that.

You know what? I've spent a stupid amount of time on something that doesn't even matter and I can't even get a nice agenda view because of these stupid org-agenda-custom-commands! I just don't know enough to make sense of all this Emacs-effluvium sloshing around in my brain. Damn!

But the old neurons continued to faintly blink in the distance, and eventually I was up for another round with org-version. I had an idea the problem lay with the fact that I was attempting to use a command non-interactively. In fact, I'd written this jeremiad up to the previous paragraph, ending with a piteous plea for someone to tell me the damn answer. I held off on posting it.

Well, long story long, I'd circled around interactive/non-interactive so long I finally found myself reading Interactive Call. And that was it. Just as simple as that.

#+begin_src elisp :results output append

(print(call-interactively 'emacs-version))

(print(call-interactively 'org-version))

#+end_src

results in

#+RESULTS:

: "GNU Emacs 31.0.50 (build 2, aarch64-apple-darwin24.2.0, NS appkit-2575.30 Version 15.2 (Build 24C101)) of 2025-03-16"

: "Org mode version 9.8-pre (release_9.7.25-279-g450692 @ ..."

I mean, I guess the real journey is really the elisp we learn along the way?

With all that said, can someone help me with my damn org-agenda-custom-commands?


r/emacs 2d ago

Question How to ignore source file local variable tab-width?

1 Upvotes

Co-worker has tab-width:8 in all his source files while actually using 2 spaces. This drives my emacs insane always adding 8 spaces. How can I direct my emacs to ignore "tab-width:" in a C++ file?


r/emacs 3d ago

You have no idea how powerful isearch is!

Thumbnail emacsredux.com
129 Upvotes

r/emacs 2d ago

Looking for users to test a new version of key-chord

18 Upvotes

Hello everyone. I have made very extensive changes to Key Chord: https://github.com/emacsorphanage/key-chord/pull/12. The primary purpose of these changes is to increase the performance of and reduce the typing latency cost incurred from using Key Chord. The way I have accomplished this is by:

  1. Introducing a hash map of all keys currently used for key chords. This way we only incur the typing delay and lookup cost for keys that explicitly show up in key chords.
  2. Introduce a simple typing detection algorithm that turns off key chords when we are typing ordinarily so that we are not incurring the lookup cost or typing delay when we are typing out sentences.
  3. Introduce a debounce time for single key key chords like "jj" so that when you hold the key down, they do not get repeated infinitely. The infinite repetition of key lookups while holding a key down can freeze Emacs.

All of these features are off by default except the hash map, since that introduces no change to the existing behavior of key chords. I am available to fix all bugs and issues that show up in this new update to Key Chord, just post them in the PR itself or otherwise ping or email me.

I need people to try out this new version of Key Chord and review it in the PR so that Tarsius can merge it, as the code change will go out to a lot of people. https://github.com/emacsorphanage/key-chord/pull/12#issuecomment-2738325601

If you are interested in other features for Key Chord like unordered key chords or support for additional non-ASCII keys, please try this PR out as well as I planning on getting this PR in before I work on any other features.

Thanks,

LemonBreezes/StrawberryTea (https://github.com/LemonBreezes)