what am i doing wrong here? reddit / emacs ---------------------------------------------------------------------- -1Mbps · 2022-09-06 11:16 ---------------------------------------------------------------------- 7890yuiop · 2022-09-06 11:23 > what am i doing wrong here? Posting an image of text. ---------------------------------------------------------------------- -1Mbps · 2022-09-06 11:37 if you could help instead of saying this that would be better. ---------------------------------------------------------------------- EternalMigrainity · 2022-09-06 11:38 Make eshellpopup interactive ---------------------------------------------------------------------- alebrick · 2022-09-06 11:46 When you map the key, you have: ``` "s" #'(eshellpopup) ``` This is mapping the key to a list with one element, instead of the function directly. The fix is to remove the parentheses around the function: ``` "s" #'eshellpopup ``` This provides the symbol directly, not a list. The next issue is, as another answer said, your function is not interactive, so it can't be invoked directly by a keybinding. Add `(interactive)` to fix that: https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining- Functions.html ---------------------------------------------------------------------- dirtycimments · 2022-09-06 11:57 Getting help also involves writing clear posts. Yours is not clear at all. This is a pretty low effort post, generally frowned upon. ---------------------------------------------------------------------- -1Mbps · 2022-09-06 12:04 Thank you. I added the interactive but now it does not open eshell it says "symbol's value as variable is void" ---------------------------------------------------------------------- -1Mbps · 2022-09-06 12:04 Thank you. I added the interactive but now it does not open eshell it says "symbol's value as variable is void" ---------------------------------------------------------------------- alebrick · 2022-09-06 12:06 Maybe a dumb question, but I've made this mistake before: did you execute the `defun` before executing the map? Can you run `M-x eval- expression RET (eshellpopup)` and does it work? ---------------------------------------------------------------------- -1Mbps · 2022-09-06 12:10 So instead of eshell I added just shell and changed the display buffer argument to "*shell*" now it works but idk about eshell, I did not execute defun before executing the map, i ran eval expression and it does not work it gives the same error as symbol value as variable void ---------------------------------------------------------------------- EternalMigrainity · 2022-09-06 12:27 In your original screenshot eshell is passed to display-buffer as if it were a variable, not a string, that can be a problem, not only that but in order for display-buffer to work with eshell in your case you have to make "eshell" to "\*eshell\*" Idk, I'm just guessing at this point, ---------------------------------------------------------------------- -1Mbps · 2022-09-06 12:37 Yea i have to pass "*eshell*", but there doesn't exist a buffer called eshell because it was not opened in the above function call (eshell) so I got an error as I mentioned in the other comment ---------------------------------------------------------------------- EternalMigrainity · 2022-09-06 12:46 Add me on discord sperg#3320 ---------------------------------------------------------------------- [deleted] · 2022-09-06 13:29 [deleted] ---------------------------------------------------------------------- tangonov · 2022-09-06 14:12 Just to add to dirtycimments point, you've posted a screenshot of what looks like A "Doom Emacs" configuration in the Emacs community at large. Doom has its own configuration abstractions. Only a smaller percentage of us know what they do. I think you're trying to "pop-up" an eshell, but to be honest "what am I doing wrong here" is lost to me and many others. ---------------------------------------------------------------------- Walheimat · 2022-09-06 20:14 I think adding an entry to `display-buffer-alist` to have `eshell` do what you want might be an easier route. Check out the various `display-buffer-*` functions, there has to be a good fit (say popping up a window at the bottom). ---------------------------------------------------------------------- 7890yuiop · 2022-09-07 03:08 At a guess that's your call to `display-buffer` and there's no `eshell` variable. Where does that get defined? (Did you even mean to use a variable??)