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 ...
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 ...
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.
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
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:
Returns non-nil if BUF's name starts and ends with an *.
You could just type in where you'd mention the language of the source block.
This should work:
#+begin_src in :tangle yes
Code goes here
If your file is named config.org, this will tangle to config.in.
Not sure whether this is good practice, but you could also use something generic like sh, and then provide a filename to tangle to:
#+begin_src sh :...
Put this in an appropriate place in your emacs configuration (not sure what file that is for doom):
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-...
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.
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 ...
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:
As you can see in the manual, what you store is either a link to a particular message (from message-view) or the last know query to it (from headers view). I guess the latter, the query, is what gives you trouble.
To avoid that, with the minimum fuss you can, either:
Link from the message view.
Refile first, then link.
or with a little work, pack ...
Either set treemacs-width explicitly by adding something like (setq treemacs-width 30) to ~/.doom.d/config.el
Otherwise press tw to toggle fixed-width mode in treemacs, then you can resize it.
Adding (setq treemacs--width-is-locked nil) to ~/.doom.d/config.el may work too
Doom is meant to be configured via ~/.doom.d/config.el. Try setting the org-tags-column in that file. E.g.:
;; in ~/.doom.d/config.el
(setq org-tags-column -80)
;; ... other org configuration here
You may need to restart emacs for these changes to be applied, and then SPC-u C-c C-c should properly align the tags.
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 in org-...
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 ...
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 ...
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.
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 ()
(let* ((rend (region-end))
(startl (line-number-at-pos (region-beginning)))
(endl (line-number-at-pos rend))
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 ...
This fixed the problem for me:
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.
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 ...
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.")
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.):
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 ...