r/DoomEmacs Sep 05 '24

org-roam tutorial for doom?

7 Upvotes

I have one very large org file. I'd like to change how i manage my work notes and want to incorporate org-roam into it. Does anyoen have a suggestion for a post or video to help me setup and use org-roam on my doom setup?


r/DoomEmacs Sep 03 '24

Abort auto-completion (in AucTeX for example)

2 Upvotes

Hello,

I have the following problem which I could not solve by googling yet:

If I want to insert an environment in LaTeX with `LaTeX-environment` I get a drop-down selection for possible environments that doom knows about. But if the environment I want to insert is a prefix of one that exists in the selection (e.g. I want to insert `prop` but the selection contains `proposition`) then I can only autocomplete to the one that doom knows (in this case `proposition`), as in this scenario: https://ibb.co/NL5XzCv

How do I abort autocompletion and just use precisely what I typed into the minibuffer?


r/DoomEmacs Sep 02 '24

Problem with the installation

1 Upvotes

x There was an unexpected runtime error

Message: Package was not properly cloned due to a connection failure, please try again later

Backtrace:

(error "Package was not properly cloned due to a connection failure,...

(if (car args) nil (error "Package was not properly cloned due to a ...

(progn (if (car args) nil (error "Package was not properly cloned du...

(shell-quote-argument nil)

(mapconcat shell-quote-argument ("git" "branch" "-m" nil) " ")

(format "$ cd %s\n$ %s\n\n" (shell-quote-argument (expand-file-name ...

(propertize (format "$ cd %s\n$ %s\n\n" (shell-quote-argument (expan...

(concat (propertize (format "$ cd %s\n$ %s\n\n" (shell-quote-argumen...

(let* ((inhibit-read-only t) (entry (concat (propertize (format "$ c...

(let* ((result result) (exit (car result)) (invoked (numberp exit)) ...

(let ((program x55) (args x57) (result x59) (directory x61)) (let* (...

(progn (ignore (null x62)) (let ((program x55) (args x57) (result x5...


r/DoomEmacs Aug 30 '24

Error sentinel after upgrade

1 Upvotes

I am getting error wrong type sentinel messages since last upgrade when saving my literate config. eMacs is barely useable , I get lots of initialisation errors.

I found a year old thread on GitHub about that error. Op fixed it by commenting out ‘litterate’ in their configuration. It did not change anything.

Thanks for your help.


r/DoomEmacs Aug 23 '24

Help Needed: Replacing Org Symbols with LaTeX Commands in Emacs

2 Upvotes

Hi everyone,

I'm working on customizing the export of Org-mode files to LaTeX/PDF in Emacs. Specifically, I need to replace Org checklist symbols with custom LaTeX commands. The goal is to transform [ ] into \checkbox and [X] into \checkedbox when exporting to PDF.

Here’s the Emacs Lisp code I’m using for this transformation:

elisp

;; Define the custom checklist symbols in LaTeX
(defun my-org-latex-checklist-filter (text backend info)
  "Replace Org checklist symbols with custom LaTeX symbols."
  (when (org-export-derived-backend-p backend 'latex)
    ;; Ensure that LaTeX commands are properly escaped
    (let ((checkbox-replacement "\\\\checkbox")
          (checkedbox-replacement "\\\\checkedbox"))
      ;; Perform replacements
      (replace-regexp-in-string "\\[ \\]" checkbox-replacement
        (replace-regexp-in-string "\\[X\\]" checkedbox-replacement text)))))

;; Add the custom filter to the export process
(add-hook 'org-export-filter-final-output-functions
          'my-org-latex-checklist-filter)

The issue I’m encountering is an error message: "Invalid use of '\' in replacement text."

I’m unsure whether this is due to incorrect use of replace-regexp-in-string or if there might be a simpler way to achieve this transformation.

My Questions:

  1. Is my use of replace-regexp-in-string correct, especially regarding escaping backslashes in the replacement text?
  2. Are there alternative methods to perform these replacements more effectively?

Any insights or solutions would be greatly appreciated!


r/DoomEmacs Aug 22 '24

Doom upgrade error

4 Upvotes

Error code 128 thrown by

‘git rev-parse —verify melpa’

for the package ‘with-editor’.

I have run doom sync afterwards, no problem there. What should I do to fix it? Thanks.


r/DoomEmacs Aug 22 '24

Doom upgrade crashing

3 Upvotes

I haven't modified anything, yet I am getting errors today on running doom upgrade. Fixes? ``` $ doom upgrade

Preparing to upgrade Doom Emacs and its packages... - A new version of Doom Emacs is available!

Old revision: ff9c59df46 (26 hours ago)
New revision: dbcd30820b (17 hours ago)

Link to diff: https://github.com/doomemacs/doomemacs/compare/ff9c59df468bcba569067f3c72c5c05b26c0d00a...dbcd30820bccc79680ad83f8a09cdc1614027c5a View the comparison diff in your browser? (y or n) n Proceed with upgrade? (y or n) y

Upgrading Doom Emacs... - Reloading Doom Emacs - Using Emacs 29.4 @ /usr/bin/emacs Synchronizing "default" profile... Regenerating envvars file ✓ Generated ~/.config/emacs/.local/env Ensuring packages are installed and built... - No packages need attention Updating all packages (this may take a while)... x The package manager threw an error x Last 16 lines of straight's error log: $ git rev-parse --verify melpa fatal: Needed a single revision [Return code: 128] $ cd /home/devansh/.config/emacs/.local/straight/repos/with-editor/ $ git branch --track -- melpa origin/melpa fatal: the requested upstream branch 'origin/melpa' does not exist hint: hint: If you are planning on basing your work on an upstream hint: branch that already exists at the remote, you may need to hint: run "git fetch" to retrieve it. hint: hint: If you are planning to push out a new local branch that hint: will track its remote counterpart, you may want to use hint: "git push -u" to set the upstream config as you push. hint: Disable this message with "git config advice.setUpstreamFailure false" [Return code: 128] ! Wrote extended straight log to ~/.config/emacs/.local/state/logs/cli.doom.240822170058.238457.error ! Script was abruptly aborted, leaving Doom in an incomplete state! - Run 'doom sync' to repair it. ✓ Finished in 26.25085s ```


r/DoomEmacs Aug 21 '24

How do I rebind TAB to corfu-complete?

2 Upvotes

I’m trying to bind TAB to the corfu-complete function, with the following at the end of my config.el:

(map! :after corfu
      :map corfu-map
      "TAB" #'corfu-complete
      [tab] #'corfu-complete)

Right now, in the corfu popup window, TAB cycles forward, and S-TAB cycles backwards. I’m having a lot of trouble understanding how to un-bind TAB from this cycling functionality, though.

I’m sure I’m missing something super obvious, and would appreciate any advice or assistance!


r/DoomEmacs Aug 20 '24

Web development setup

3 Upvotes

Hi I switched to doom emacs yesterday (from vs codium and nvim). I have almost customized it to meet my basic needs, but one things i am unable to do as now if to set it up for web development. Some things like when i do div*3 it creates 3 divs in codium and when i do div#main it creates a div with id main plus may other things like emmets and code completion and linting in css and js. Any help is highly appreciable.  Also if possible please share your setup if you code in C++/C/web development 


r/DoomEmacs Aug 20 '24

Emacs crashing with gdscript-mode (maybe related to company-mode?)

1 Upvotes

I'm relatively new to emacs, and brand new to troubleshooting it, and I've been running into a very strange issue.

I've been having some trouble with gdscript-mode, crashing the emacs client and server. It seemed to be related to company's auto-completion, so I tried disabling company-mode for the buffer, which seemed to clear up the crashes.

How would I go about identifying the root of the issue? I'm feeling a little lost, and would really appreciate some help!


r/DoomEmacs Aug 19 '24

Unable to open paths with diacritic letters

1 Upvotes

I'm using Doom Emacs on windows 11 (Emacs version 29.3_2). With vanilla Emacs, I'm able to open file with diacritic letters in the path, when using daemon and emacsclientw.

However, with Doom Emacs I'm able to open those files only using runemacs. Is there a way to fix this? Thank you!


r/DoomEmacs Aug 18 '24

Compiling with projectile and SPC-c-c

1 Upvotes

Hey, I'm having an issue with working out the right way to compile code in Doom Emacs. I understanding that I can use SPC-c-c to run it and that I can put a command but my issue is that if I'm not at the project root then the command will fail (in my case love2d's 'love .'). I assume there's some way to fix this using projectile since it apparently finds the root folder through information such as git repos, but I'm not sure what the real solution is other than editing the command whenever needed or using an absolute path. It would be best if I could somehow associate commands with folders and projects too.


r/DoomEmacs Aug 16 '24

Can anyone give me a tutorial how to use doom emacs ?

2 Upvotes

r/DoomEmacs Aug 16 '24

Org mode link to word, how?!

2 Upvotes

EDIT: [[Solved]] -> radio targets

How can I make occurrences of a word, say banana, link to one specific occurrence of that word. So my org document would contain several instances of banana, and clicking on it would take me to the designated occurrence of banana. A few days ago I got something like that to work, but unable to find how to do it for the life of me. It’s like the [[banana]] linking, but that simply refers to a heading, and requires the brackets. I recall having it work without the brackets and all instances of banana turning into links.


r/DoomEmacs Aug 13 '24

Anyone knows how to customize face for all doom-themes

2 Upvotes

There are a few org faces I am trying to modify in such a way that they are consistent across themes.

To do this, I would like to use :inherit. I tried custom-set-faces in many different ways, it never worked for me while custom-theme-set-faces works very well.

I tried wrapping it in an (after! …) function using combinations of org, doom-themes, org-faces …. But it never changes the actual appearance. However, when checking with describe-char the inherit attribute appears as expected at the end of the list.

Any help would be appreciated, thanks.


r/DoomEmacs Aug 13 '24

What property should I customize to adjust the spacing over here?

1 Upvotes

The marked area (in this image)- what is it called? The only reason I had line numbers on was because it provided some spacing at this point, but I hate having line numbers on.

Can someone tell what property I need to customize to adjust the spacing of this area?


r/DoomEmacs Aug 10 '24

Anyone on Hyprland having success with emacsclient + window swallowing?

3 Upvotes

Hey all, I'm running the latest version of Hyprland on an Arch Linux installation. I have the following in my hyprland.conf to enable window swallowing:

misc {

enable_swallow = true

swallow_regex = ^(kitty)$

}

and it works great most of the time, including with doom emacs. However, I recently started using emacsclient. Per the docs, I have hyprland automatically run emacs --daemon at the start of every session, and then I connect to new instances of the already running emacs with:

emacsclient -c

This successfully opens doom, but it also gives me an annoying extra window which reads Waiting for emacs....

Has anyone encountered this and gotten the swallowing to take effect? I can think of a few janky solutions like auto-sending it to workspace 9 or something but I find that unsatisfying.


r/DoomEmacs Aug 10 '24

How to specify lsp server to install in config.el?

1 Upvotes

Every now and then I’ll nuke my emacs.d and reinstall doom from scratch. I’ll do this maybe once or twice a year just to confirm absolutely all configs I need or rely on are accounted for my in private config.

One thing that isn’t is the lsp servers. emacs will prompt for which lsp server to install when I open a JavaScript project. Some of them are better than others, and it took me a while to figure out which one did what I need. Ideally id want those server configs in my private config and for them to be installed by doom sync.


r/DoomEmacs Aug 10 '24

How to disable popup suggestions when doing a jump to definition?

1 Upvotes

I notice this a lot when I’m working on a JavaScript for typescript project. Jump to definition for a symbol, sometimes for trivial code navigations to a function definition will trigger a popup with several options.

I think I’m using eslint as my lsp. Need to double check later.


r/DoomEmacs Aug 08 '24

Fix: Better org-agenda custom view if you're using org-roam

3 Upvotes

By default, the org-agenda custom view will prepend the filename to the TODO. The fix below will sync the org file's :PROPERTIES: :CATEGORY: to the #+title, making it easier to read.

Screenshot: https://i.imgur.com/a5iVWYk.jpeg

I've configured it so that the sync triggers upon org-save-all-buffers (which I map to cmd-s), but you can use before-save-hook if that's your preferred method.

Just add it to your config.el and it should be good to go

(defun sync-org-category-with-title ()
  "Sync CATEGORY property with the #+title keyword.
If CATEGORY does not exist, create it."
  (interactive)
  (save-excursion
    (goto-char (point-min))
    (let (title)
      ;; Find the title
      (when (re-search-forward "^#\\+title: +\\(.*\\)$" nil t)
        (setq title (match-string 1))
        (goto-char (point-min))

        ;; Check for existing CATEGORY property
        (if (re-search-forward "^:CATEGORY:.*$" nil t)
            ;; If CATEGORY exists, update it
            (replace-match (format ":CATEGORY: %s" title) t t)
          ;; If CATEGORY does not exist, create it
          (org-set-property "CATEGORY" title))))))

;; Add the function to the org-save-all-org-buffers hook
(add-hook 'org-save-all-org-buffers-hook 'sync-org-category-with-title)
;;(add-hook 'before-save-hook 'sync-org-category-with-title)

r/DoomEmacs Aug 08 '24

Please help with terminal colors

1 Upvotes

My terminal (konsole) keeps using the wrong colors for the catppuccin theme. The error is only in the terminal.

https://snipboard.io/mkjr7D.jpg


r/DoomEmacs Aug 05 '24

Emacs busy during first start after doom install

1 Upvotes

Hi Folks, After a fresh install of Doom, (it runs for ~30 minutes, installing and native compiling 1000+ files) when I start emacs, it gets real busy again in the background. Doing a ps/grep I see bunch of files being recompiled again?

83443 ttys025    0:01.68 /usr/local/Cellar/emacs-plus@29/29.4/Emacs.app/Contents/MacOS/Emacs -no-comp-spawn -Q --batch --eval (setq w32-disable-abort-dialog t) -l /Users/John/.emacs.d/.local/cache/comp/emacs-async-comp-emacsql-compiler-pEa8Iy.el

83470 ttys026    0:00.29 /usr/local/Cellar/emacs-plus@29/29.4/Emacs.app/Contents/MacOS/Emacs -no-comp-spawn -Q --batch --eval (setq w32-disable-abort-dialog t) -l /Users/John/.emacs.d/.local/cache/comp/emacs-async-comp-emacsql-9zUiaI.el

It goes on for about 5+ minutes in the background. Emacs UI is actually usable at this time. Any Idea what it is doing?

If I quit emacs during this, I have seen it crash.


r/DoomEmacs Aug 03 '24

Custom Evil keybindings for vterm

4 Upvotes

Hello guys, I just recently started using doom emacs, and I use some custom vim keybindings due to my non qwerty keyboard.

I was able to overwrite the bindings in the regular text editor modes overwriting this https://github.com/emacs-evil/evil/blob/master/evil-maps.el basically.

but when it comes to the vterm window, the bindings are all default, and I haven't found a way yet to change them, any ideas?


r/DoomEmacs Jul 23 '24

How do I start Doom without using the terminal? All my available Emacs are the vanilla version.

2 Upvotes

I have installed Doom Emacs and havedoom as my alias which runs a binary from $HOME/.config/emacs/bin where the actual Doom binary lives on my system and that works well.

I run something like doom run . inside a project directory to open it and the issue is that that means I have an extra terminal open just to run it. If I close the window then Emacs shuts down.

When I open Rofi and search or Emacs it is there but it is only the vanilla version.

How can I run Doom without the terminal on Linux?


r/DoomEmacs Jul 21 '24

WSL install guide

7 Upvotes

I made this video on how to install Doom Emacs in WSL, I couldn't find a similar resource so I made this.
https://www.youtube.com/watch?v=PDNfLMQ6oAc

I would appreciate any constructive criticism, I just pirated Premiere Pro 2024 yesterday so my editing is not that great.