When I was typing a word, it showed suggestions in bracket, but hitting [tab] didn't do anything. I thought that is because the conflict between pabbrev-mode and the global usage of [tab].
How can I fix it?
This problem was solved by installing smart-tab and adding this line (global-smart-tab-mode 1) into .emacs.
Related
I'm new to Clojure, lein and spacemacs. I'm attempting to get the cider-jack-in repl going in spacemacs, but it's failing to load. After searching online, I think the solution to this issue is here. Specifically,
"For anyone else running into this issue, this can be fixed by setting cider-lein-parameters to "repl :headless :host localhost" (the default value is "repl :headless :host ::")"
My problem is that I have no idea where the cider-lein-parameters file is, or if it even is a file. And because I can't even locate it, I cannot edit it. I've done extensive searches on this, but haven't found anything useful. Can anyone guide me with a basic explanation of what this is and how I can edit it? Is this a spacemacs thing? Or a lein thing?
Any and all help would be greatly appreciated! Thank you!
Press M-x (Alt-x), then enter set-variable command
Select or enter cider-lein-parameters variable name
Enter its value in double quotes. e.g. "new value"
When I'm using emacs in windowed mode, everything seems fine. However, when in the terminal, Proof General's cursor (indicating where it is in the code) covers up the first two characters of the line it's on.
This looks like a bug, but perhaps it's some sort of setting? Has anyone encountered this before?
I found out that this is an emacs variable:
https://github.com/ProofGeneral/PG/issues/16
The overlaying of the arrow is intentional, and it can be "turned off" by setting the arrow text to "":
(setq overlay-arrow-string "")
As the title states, I'm relatively new to Emacs. I tried out several starter kits but went with Prelude and changed a lot of things around.
Anyway, I've been getting a good handle on everything...until this morning I was working and I typed double-quotes. Normally Emacs would insert a second double quotes right after ("") due to the auto-completion, but I must have accidentally changed something with a keystroke and now when I type ", I get \"\".
Thoughts?
Thank you.
This seems to be an issue with smartparens which prelude installs by default (see the file prelude-programming.el. This behavior is described in detail on smartparens wiki. To ensure that smartparens is causing problems you can can do C-h k" this would print about the command acutally run when " is pressed, if the command is sp--self-insert-command then the following should work
Paste this (setq sp-autoescape-string-quote nil) to your *scratch* buffer, go to the closing parenthesis and do C-xC-e, this will disable the behavior for current emacs session.
To disable the behavior for all future emacs session, assuming that you are using prelude, you will need to add the following to your personal config (basically some file inside /path/to/prelude/personal/).
(setq sp-autoescape-string-quote nil)
This will disable the auto-escaping of the string quotes, completely. If you like this behavior and do not want to disable it completely you can do what #steckerhalter suggests C-q" will insert just one parenthesis.
If the above does not solve the issue then try providing following info in your question which may help us debug the issue,
1) The list minor modes active (this can be obtained by doing C-hm).
2) Output of C-hk"
Hope that helps
this sounds a lot like smartparens (https://github.com/Fuco1/smartparens) which is included in Prelude. usually when you are inside "" then it will escape the quotes:
"hahah \"\" bah"
if you want to get a normal " inside quotes you have to use C-q " or disable smartparens with M-x smartparens-mode
If, as you say in a comment, " is bound to self-insert-command, then when you type " what happens is that a (single, unescaped) " character is inserted.
However, I suspect you have some mode turned on that does something additional whenever a " char is inserted. You mention automatic insertion of a second ", for example. That kind of behavior comes from a mode such as is provided by library smart-parens or electric-pair.
And you mention Prelude.
To find out what part of your init file (~/.emacs) is causing the behavior you see, bisect your init file recursively (first comment-out half, to see which half is responsible, then 3/4, to see which quarter is responsible,...). Then, if you still have a question about the responsible code, ask here, providing that info.
When you describe your problem here, it is important to be specific: what Emacs version, what mode(s), what libraries have you loaded,... Whatever might be pertinent. But first narrow down the problem by bisecting your init file to find the culprit.
I'm using python-mode.el, and when I try to indent comments, it always wants to put them all the way to the left. I want them indented in line with the rest of the code. Is there an easy way to achieve this?
Recent python-mode.el comes with a customizable variable
py-indent-comments
When t, comment lines are indented.
get it from
http://launchpad.net/python-mode
Also running python-mode.el and when I tab a comment it cycles through the indentation levels. What version of emacs are you using?
edit getting the behavior you describe if there is a non-space immediately following the #. I always put a space after, but it sounds like a bug to me. I'd ask on the python-mode.el list.
I've checked my elisp files to make sure that I do not have any bindings that contain Shift+R (and I have not found any). I expect SHIFT+R to print an uppercase character, but instead I get R R undefined inside of the Emacs command line. This is only in C/C++ major modes.
Any suggestions?
Update: Describing the key shows that it is undefined. How would I define it for the normal, expected use (capitalizing the letter R)?
I assume by the 'expected use' you mean to insert the 'R' character. For this, you'd need to bind the key to 'self-insert-command':
M-x global-set-key R self-insert-command
Or, in your .emacs or .emacs.d/init.el file:
(global-set-key "R" 'self-insert-command)
Of course, this should be the default....
I'm getting a little deja-vu here and if memory serves the behavior I encountered some years ago was that (on Windows) certain accessibility settings unset or changed the keycode for the right shift key. Sorry I cannot be more specific but maybe this will stimulate someone else to come up with the real answer. A test you can make: does the behavior work with both shift keys or just one? If the answer is just one shows the bad behavior, is that bad behavior shown with all keys?
Try C-h k (describe-key), then press Shift-R. describe-key will then tell you what is bound to that key. At least that will give you a hint as to whether or not there is an active binding. If there's a binding, perhaps it will give you a hint of something else to search for in your startup files.
You sound like you're having the same problem I had. Typing Re... in any html buffer would try to execute an R- command, when every single R-* command was undefined. Turned out that I had a typo in my .emacs file. I had a global-key-map set to (kbd "REF") instead of (kbd "RET"), and fixing it made the problem immediately vanish. So I'd recommend checking for anything similar in your .emacs file.