I am new to emacs(spacemacs), and I follow this article to learn spacemacs.
Once you are done editing, save the file and either press C-c C-c in the file to reload it or just restart Spacemacs.
But after I save the .spacemacs and then press C-c C-c, the powerline told me C-c C-c is undefined.
How can I reload .spacemacs file after editing without restart emacs?
I found the solution: SPC f e R
It is from "Dotfile Configuration" in the Spacemacs Docs.
SPC f e R doesn't work for me so I personally use SPC q R. It completely restarts spacemacs though - but if you maintain sessions (dotspacemacs-auto-resume-layouts t) in config), spacemacs will restart with same buffers. Hope it'll help someone.
dotspacemacs-auto-resume-layouts is a config option which can be found in setq-default section of your .spacemacs file. It comes with default spacemacs setup, it's default value is nil.
For those who work in emacs mode, it might be little difficult to get this done with keybindings. In such case, do M-X then type dotspacemacs/sync-configuration-layers
SPC q r or (restart-emacs-resume-layouts) will restart emacs whilst preserving the layout.
Another way to do this is press space twice (SPC SPC) which brings you into the emacs command mode.
Then type: sync-config and press Enter which will execute the dotspacemacs/sync-configuration-layers command and reload your config.
Related
I'm running GNU Emacs 24.3.1 on Windows 7. As mentioned in this manual page, I can type
C-x d ~/ RET
to determine the location of my home directory. In my case, Emacs returns:
e:/EmacsDocs
which, according to Windows Explorer, indeed contains a file .emacs. When I open .emacs with Emacs, the file appears to be empty.
Now, I want to set Emacs so that it is in overwrite mode by default. According to this page, that can be done by adding the following to .emacs:
(setq-default overwrite-mode t)
But when I make this change to .emacs and close and reopen Emacs, Emacs does not overwrite when I select text and start typing. (Rather, it still operates in insertion mode, with new characters inserted before the cursor.)
I also tried, for example, adding this command to .emacs, which according to this page will disable cursor blinking:
(blink-cursor-mode 0)
but again, there is no change when I restart Emacs.
How can I tell if Emacs is actually reading the .emacs in the home directory (upon restarting Emacs)?
You are confusing what Emacs calls overwrite-mode with the requested behavior "overwrite when I select text and start typing".
In Emacs, the latter behavior is called delete-selection-mode, and overwrite-mode means that when you type text (without selecting anything), any existing text that follows the cursor is overwritten by what you type.
Most Emacs users do not turn on overwrite-mode by default, and they just hit the insert key (typically to the left of the home key) to toggle `overwrite-mode on/off when they need/want to.
One way to turn on delete-selection-mode by default is to put one of the following in your init file (.emacs):
(setq delete-selection-mode t)
or
(delete-selection-mode)
Another way is to customize the option delete-selection-mode using M-x customize-option RET delete-selection-mode RET and save the customized value.
Instead of editing the file outside of Emacs, just type
C-x C-f ~/.emacs
and add your configurations there. Save with
C-x C-s
and restart. This should work, since ~ in Emacs defaults to the home directory.
I'm trying to learn Emacs, and I've installed MELPA as a package manager. The only problem is that the only way I know how to exit MELPA is by quitting Emacs entirely. I'm sure there's a better way to do this. What is it?
Killing buffers with C-x k RET is generally good advice, but it is much easier to quit the package-list-packages screen by simply pressing q.
This also works to exit dired buffers, magit, and many other types of buffers that aren't text-oriented.
C-x C-f open file
C-x C-b open buffer list
C-x b open buffer
M-x execute command
C - ctrl and M - alt
Also take a tour here
I recently installed cygwin and emacs, and when I try to exit the program (by pressing C-x C-c) the minibuffer reads "C-x C-g is undefined". When I type C-c the minibuffer reads "Quit" just like if I had typed C-g. To the best of my knowledge, it's just reading the c key as a g in the minibuffer. However, if I type c into a scratch buffer it correctly displays c. Or if I type M-x c, it correctly reads as c in the minibuffer.
Is this a common problem? How do I fix this?
Thanks so much for any help! It's driving me crazy. Right now, I have to exit out of Cygwin when I want to quit emacs because C-x C-c won't close the program!
This is a problem with the default Cygwin console, but it doesn't happen with other Cygwin terminals such as mintty, rxvt, or xterm, so you might want to try one of those. Also, I believe the issue with the console is fixed in recent Cygwin snapshots.
I reciently switched to emacs starter kit which includes the ido package.
ido has a nice feature that suggests paths when find-file which is usually very handy except when trying to create a new file. When the new file name matches a suggestion in another path ido automatically switches to that path assuming that's what I wanted, but usually its not and I find it annoying.
To workaround the issue I either touch newfile from shell, create a new buffer and save as, or M-x find-file to get the original behavior. I could of course rebind C-x C-f to find-file again but must of the time I like ido-find-file, I just want it to stop automatically switching paths when I type the path explicitly.
I figure there is probably some simple key I can press during ido-find-file to tell it that the file I'm looking for does not exist and to stop making suggestions, or some var I can set to get more desirable behavior?
Try:
C-x C-f C-f
It should kick you out of ido mode into "normal" find file mode
C-j is the key combination you are seeking.
As mentioned: being fast, using C-j to confirm immediately, and using and additional C-f to temporarily switch to the traditional mode are all useful.
Also, when ido has already selected an alternate file path, you can hit C-z to return where you were and temporarily disable that behavior.
A solution for a related problem - ido not asking overwrite confirmation.
http://lists.gnu.org/archive/html/bug-gnu-emacs/2010-11/msg00226.html
On Fido, M-j does the trick.
It's bound to icomplete-fido-exit by default.
Where I can find current example of configuration and using Distel with Emacs 23 (on Mac Snow Leaoprd). I have problem with debugging (interpret mode), I cant mark brakepoint.
If anyone have working configuration of distel on emacs 23, please share with me.
one problem with using the debugger in distel is that I always need to ensure distel is loaded before setting one.
load a file, put io:format("",[]), then press M-. to navigate to io.erl, that makes sure distel is loaded
now make sure the file is intepreted, C-c, C-d, i, the minibuffer will show
now C-SPACE your line, the mark should appear
try this steps:
C-c C-d g
Then
C-c C-d i
C-c C-d m
C-x 4 0
C-c C-d m
Or in other order, but you should kill monitor buffer, until get not empty buffer with line like this:
PID Initial Call Status Info
After try mark line for breakpoint
I've started with the same version of Emacs. I had a similar problem.
Here's what worked for me:
1 In .emacs file I specify the name of the node with which the erlang shell is executed in Emacs
(setq inferior-erlang-machine-options '("-sname" "emacs"))
2 In Emacs in Erlang mode (just open an erl file):
2.1 I set the node name for Distel C-c C-d n
2.2 Load the Distel to the node with C-c C-d g
After this I am able to set the breakpoint.