Hot answers tagged

5

Credit to @henrik: You need to use a popup rule. The default is defined here: (set-popup-rule! "^vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0) Just add side: right and have the regex match the buffer you want, in this case *doom:vterm-popup:main and put this in your config.el inside an after! vterm block. So, the final result for my ...


5

After I open a Magit status buffer and make a commit, I commonly also want to copy that commit's hash With vanilla Emacs bindings in the Magit status buffer: M-w (magit-copy-buffer-revision) saves the latest commit hash to the kill-ring: M-w runs the command magit-copy-buffer-revision (found in magit-status-mode-map), which is an interactive compiled Lisp ...


3

To describe a key sequence SPC h k runs helpful-key and will describe what the key sequence does in the current context. This will take the full key sequence, e.g. SPC h k then g g , and describe what the key sequence does (in this case, run evil-goto-first-line) To show the key sequence for a known function M-x <function name> To see all keybinds SPC ...


3

I found that the behavior is caused by two of the functions in doom-unreal-buffer-functions and can be prevented by redefining the variable without those functions, like this: (setq doom-unreal-buffer-functions '(minibufferp)) These are the two functions that were removed: (doom-special-buffer-p BUF) Returns non-nil if BUF's name starts and ends with an *. ...


3

TL;DR Go to path/to/.emacs.d/elpa/pdf-tools-xxx/build and run make clean to clean previously compiled contents manually. Restart emacs and let it build pdf-tools. Then, pdf-tools works again :) I have also met this problem. Follow the error message, we can tell the problem is epdfinfo cannot find the library it wants, which is libpoppler.so.101. After check ...


3

As explained by @NickD, org-duration-format isn't a safe variable: (get 'org-duration-format 'safe-local-variable) ; nil So there are two ways: Set enable-local-variables to t for getting asked if to trust that variable when the file is opened: (setq enable-local-variables t) Push org-duration-format into safe-local-variable-values: (add-to-list 'safe-...


2

Doom's :emacs dired module has a +ranger flag. Enable it and run doom sync on the command line. i.e. uncomment :emacs (dired +ranger) in ~/.doom.d/init.el. Then ranger will be the default UI for dired. See this entry in the manual for details on what Doom modules (and flags) are.


2

In the end, putting the following in config.el worked: (set-formatter! 'erlfmt "erlfmt -" :modes '(erlang-mode))


2

Ex-vimmer also. As Dan pointed out in the comment of OP, binding to C-c is too devastating in emacs. What I do is instead binding to C-c C-c so I can hit C-c like a crazy person to get back to normal. (Just like hitting C-s 10 times is the proper way to save MS Word documents, I do this a lot: C-c C-c C-c ... C-c C-g C-g ... C-g to make sure I'm in normal ...


2

This fixed the problem for me: ~/.emacs.d/bin/doom build Doing doom build recompiles and symlinks all installed packages. I figured this out after seeing a comment on a Github issue about this exact error: This is caused by lsp-treemacs byte-compiled against old treemacs.


2

The variable which you are looking is org-roam-db-location It's defined in org-roam-db.el The full path to file where the Org-roam database is stored. If this is non-nil, the Org-roam sqlite database is saved here. It is the user's responsibility to set this correctly, especially when used with multiple Org-roam instances. References References in org-...


2

I use the following to hide "Wrote ..." messages. I use regular GNU Emacs though. (defun sb/inhibit-message-call-orig-fun (orig-fun &rest args) "Hide messages appearing in ORIG-FUN, forward ARGS." (let ((inhibit-message t)) (apply orig-fun args))) (advice-add 'write-region :around #'sb/inhibit-message-call-orig-fun) I use ...


2

You should look at emacs --help. The switch to use here should be "-l" instead. Additionally, you also need "-q" so that Doom's init.el won't be loaded.


2

Add (require 'org-inlinetask) to your init.el file.


2

So after comparing the TLS related variables between vanilla Emacs and Doomemacs, and playing around with some of the settings, the following allows me access to gemini websites: (setq gnutls-verify-error 'nil) I have no idea what security implications that has, but that gets things working at least.


1

Put this in an appropriate place in your emacs configuration (not sure what file that is for doom): (custom-set-variables '(display-line-numbers-widen nil)) I think you could use setq-default instead if you like, but I hear there are some subtleties that make custom-set-variables a better choice for customize-able variables -- it's OK to use custom-set-...


1

One possibility is to use term.el M-x term term is a full-featured terminal emulator, within which you can run your OS preferred shell, meaning that terminal escape characters will be handled in input and output generally (including your prompt). The main complication is that some keybindings conflict with emacs bindings, and so there are two modes of ...


1

Found it; the package was objed! As quoted from the Github README: A global minor-mode to navigate and edit text objects. Objed also enables modal editing and composition of commands. It combines ideas of versor-mode and other Editors like Vim or Kakoune and tries to align them with regular Emacs conventions.


1

In doom.d/init.el disable loading of evil and do the usual "doom sync". This way the evil module is not loaded and keybindings are "back to normal".


1

I found the answer. Doing this does the trick: (use-package! mixed-pitch :hook (org-mode . mixed-pitch-mode) :config (setq mixed-pitch-set-heigth t) (set-face-attribute 'variable-pitch nil :height 1.3)) I have set the height for my normal font to 1.0: (setq doom-font (font-spec :family "Fira Code" :style "Retina" :size 14 :height ...


1

I presume you have global-prettify-symbols-mode enabled, which is a globalized minor mode. They can be a bit tricky. Calling (prettify-symbols-mode -1) in c-mode-hook wouldn't work because the mode isn't being enabled until later. Using (setq prettify-symbols-alist '()) in c-mode-hook might work? It won't prevent the buffer-local mode being enabled, but it ...


1

The cleanest way is to not reuse Evil-specific commands or keystrokes unless absolutely necessary. Looking at the definition of :w, which happens to be the evil-write command, one can see that it parses the file name argument and calls shell-command-on-region if it starts with a bang. Here's the equivalent specialized command: (defun my-evil-run-python-...


1

Emacs comes with some preconfigured C/C++ Styles. You can change the indentation style of the current buffer with C-c . When you have chosen a style and only want to temporary/test adjust a few offsets C-c C-o helps. Emacs indentation styles can be modified very fine grained. You can also set a default style by changing the alist c-default-style Given the ...


1

Having this is your init file will make s function as it does in Vim: (define-key evil-normal-state-map (kbd "s") 'evil-substitute) But this will replace the current functionality of s, so you will have to map its current value (C-h k s) to something else.


1

Maybe check if region-end and the beginning of the line at region-end are the same position, and if so, subtract one from the end line number? Something like this perhaps: (defun test-linenos () (interactive) (let* ((rend (region-end)) (startl (line-number-at-pos (region-beginning))) (endl (line-number-at-pos rend)) (real-endl (...


1

This error was related to magit with emacs 28.0.50 (see issues on magit repo for further info). I installed emacs 27.1 via homebrew emacs-plus@27 formula and everything is working as expected.


1

Type C-hl to run view-lossage which will show you the last several keystrokes, and which commands they are bound to in the current buffer (which might not be the same as the commands they were bound to in the buffer which was active when they keys were typed -- only the keystrokes themselves are actually recorded). n.b. Older Emacsen will display only the ...


1

You may want to try the package super-save, which auto saves files when idle or Emacs lose focus. My own auto save function saving when idle or lose focus, built from Emacs built-ins (github link in case I'm missing anything): (defvar jester-auto-save-idle 1 "Time in seconds before auto-saving all buffers.") (run-with-idle-timer jester-auto-save-...


1

Emacs has some built in functionality for this already, so there is no need to write your own function. In case you do want to use your function, I would suggest adding a check for 'prog-mode. Programming modes should all be derived from prog-mode, so: (when (derived-mode-p 'prog-mode) ;; Do stuff ) or, to include text-mode (org-mode, md, etc.): (when (...


1

From the swiper search, type C-c C-o That will open a separate buffer with the search results. From there you can copy whatever you like just like you can from any other buffer.


Only top voted, non community-wiki answers of a minimum length are eligible