Thank you for telling me about the different types of maps.
The issue is as @NickD pointed out in their answer https://emacs.stackexchange.com/a/59269/9874 and the example use-package code puts all the bindings into the global map.
ie org-mode puts the binding to "" in org-mode-map so you need to use that map.
Because my configuration is based on ...
It is not packages that use-package loads but features (which are things you can require and test for with featurep). From this point of view, use-package is essentially a fancy wrapper for require.
While use-package can often seem like magic, you can demystify by placing point after a use-package stanza and doing M-x pp-macroexpand-last-sexp. In the case ...
By chance, after commenting on this, hours later I ran into exactly the same issue. The cause was that spacemacs had for a while pinned its version of dash at 2.17.0, and -compose was introduced in 2.18.0 (moved over from the now obsolete package dash-functional). The latest lsp-mode.el uses that function.
I fixed it by updating my spacemacs checkout to ...
According to the manual (section 4.13), the car of the :hook form can be a list. So
((fundamental-mode js-mode) . git-auto-commit-mode)
should do the job.
The mode sets up its own keymap which overrides the global map. The :bind mechanism creates a binding in the global map, but in an Org mode file, the key is looked up in the mode map before the global map, so you get the definition in the mode map.
The usual way to override this is by using the mode hook. Add to your init file the following code:
use-package is a macro around require. Macros are expanded before code execution. The purpose of a macro is to create syntactic sugar to make code easier to read, understand, and maintain. Your different alternatives have minimal effect to the execution time. In the end, it is a personal choice which one you prefer.
I use mostly the :after key for terseness, ...
Using use-package's :bind by setting the binding to nil worked for me in similar cases, but I use it with :straight org-plus-contrib and I do not know if this approach applies the same with built-in org:
:bind (:map org-mode-map
("C-," . nil)
("C-'" . nil)))
use-package's :init block is run before the package has been loaded. Try putting the code inside a :config block instead, like:
I also removed the progn, as use-package allows multiple statements in the :config block.
EDIT: as requested in a comment, the desktop-save-mode use-package block:
Think of a package as a bunch of e-lisp and maybe other files. Many of these (such as the package package itself) come as part of your emacs (these are said to be built-in) and so need no further installation. Others, such as pdf-tools or helm are located in repositories on the interwebs such as melpa and so must be downloaded onto your computer before ...
I think something has gone wrong if you can't modify the use-package form -- AFAIK that macro is intended for use by end-users only.
That said, the documentation you've quoted:
all of the following are equivalent:
:hook (prog-mode . ace-jump-mode))
Look at the help for execute-extended-command (via C-h f execute-extended-command):
It is bound to , , M-x.
(execute-extended-command PREFIXARG &optional COMMAND-NAME TYPED)
This function is for interactive use only;
in Lisp code use ‘command-execute’ instead.
Read a command name, then read the arguments and call the command.
To pass a prefix argument ...
You need to do this:
:load-path (lambda () (concat user-emacs-directory "latex"))
(concat user-emacs-directory "latex") does not get evaluated in use-package, so you can use a function that returns what you need instead.
I am assuming ox-latex is already ...
You can find out what is going on yourself by putting the cursor after the use-package stanza and doing M-x pp-macroexpand-last-sexp. You will discover that the :hook line expands to
(add-hook 'TeX-after-compilation-finished-functions-hook #'TeX-revert-document-buffer)
which is not what you wanted.
Long story short: :hook only does what you want if the car ...
I would write it that way.
:bind (:map eshell-mode-map
("C-<backspace>" . my-eshell-mode-func))
:config (defun my-eshell-mode-func ()
For two reasons:
eshell-mode-map is provided by feature esh-mode (not eshell) see end of this file
You want to set that variable to a string. This ought to work:
(setq lsp-keymap-prefix "s-k"))
You had :ensure t in there as well, but it doesn't have anything to do with configuring the package; instead it causes use-package to try to install lsp-mode if it isn't available. You might want to include it, or you ...
The keybindings created with :bind expect a function name (not sure how lambdas are expanded) so you can define a named function in the :init clause of use-package which should work as expected...
(defun my-clear-shell ()
(message "I am some other function"))
dired-ranger doesn't provide a multi-column view. If you want that you should try ranger.el. Instead dired-ranger provides some helpful functions for copy and pasting as you can see from the description.
;; --- Ranger ---