I have two windows open in my Emacs session. Both are remote files opened using tramp. I make a change in window A and switch to window B without saving file in window A. When Emacs decides to autosave, the buffer displayed in window B is switched to the buffer from window A that was autosaved. This only happens when using tramp, not local files.
Another thing I have noticed is, that if I have the same file opened in two windows, because I need to reference something at another position in the file and save the file, the buffer I'm in sometimes jumps to the position that the point is in the other window, so I have to move around to get back to the place where I was editing.
Is this a bug or is there some setting that I have(n't) set? I suspect it is something related to refreshing the windows when saving.
i'm using Emacs 24.3 on OSX, but I have seen this using Linux too.
Sounds very much like a bug, to me. Can you reproduce this starting from emacs -Q (i.e., with no init file)?
If so, use M-x report-emacs-bug to give Emacs Dev the recipe. If not, bisect your init file recursively until you locate the culprit code. Then ask for more help here, if it's not clear how to fix the problem.
Related
I am very new to emacs. I just started using it. After a fresh install of spacemacs on my macbook when I opened a file from neo tree or command line it used to appear in a new window. Now it's opening in the same window and the file that was already open gets hidden. I don't know what I did wrong. I even reinstalled spacemacs from scratch but it is of no use.
Also, I can't find a way to open a file in a new frame and close it in the frame that it's already in.
it used to appear in a new window. Now it's opening in the same
window and the file that was already open gets hidden.
I don't know about spacemacs, but for Emacs generally it's completely
normal when visiting a file for the current window to be re-used.
The pop-up-windows user option would affect this some of the time,
but that's non-nil by default, so you probably have that enabled
already?
M-x customize-option RET pop-up-windows RET
Naturally there are other rules and settings around this behaviour
(which is very flexible), so I would also recommend reading about it
in the manual:
C-hig (emacs)Window Choice
You can use the command find-file-other-window to make Emacs display
the buffer in the 'other' window (creating a new window if necessary).
This is usually bound to C-x4f but
spacemacs may be different?
Refer to: C-hig (emacs)Pop Up Window
Also, I can't find a way to open a file in a new frame and close it
in the frame that it's already in.
Similarly to the above, by default:
C-x5f calls find-file-other-frame
C-x50 calls delete-frame
Refer to: C-hig (emacs)Creating Frames
I would like to change few things in my .emacs configuration file. The problem is that I cannot find it.
Does anyone have any idea where it could be on Windows bash?
Is it even called .emacs on windows Bash? Do I have to create it myself?
Thanks in advance
After some researches, here is what I understood :
As Varro said in the commnent, .emacs file will not be created by default, since it will only contain cuztomizations you want. So you have to create it yourself. By the way, apparently it is a good practice to call it init.el. To find where to create it, type env in the terminal and look for the HOME variable. This value will show you the path considered as the home directory, where emacs created .emacs.d/ folder. You must create init.el file in this folder, and emacs will load it automatically.
This is not related to the question but it might help you :
I needed this file in order to change the cursor on emacs. At first, I thought that emacs was not loading the file correctly, because the cursor was not changing. I made some tests, and I was able to change background color, so it was not the problem. But, in fact, you can NOT change the cursor, since it is defined by the terminal itself, not emacs.
It has been like one year or so since I started to learn Emacs, and I do like its power and flexibility as a general text editor. When I had tried its Auctex mode for LaTeX/TeX, I knew I will never go back to read which TeX editor I should use. When I had tried its Pyhon mode, I knew I will never be bothered to choose a Python editor/IDE. Well, the same feeling for the VHDL mode of Emacs.
I do not intend to implement Emacs as a whole FPGA design solution (although I tried that). Instead, I prefer to use Emacs just as an external editor (Xilinx ISE in my case) and follow the design sequence according to the ventor's specific IDE. So according to this Editor Options, I set the editor options in my ISE {C:\Program Files (x86)\emacs\bin\emacsclient.exe} +$2 $1. However if I use runemacs.exe as suggested by Xilinx, everytime I clicked a file in ISE a new Emacs will be started. With the emacsclient.exe it helps a bit.
When I clicked a file in ISE now, its corresponding buffer will be opened in Emacs. But the buffer remains invisible and I have to C-x b to it by my self.
Also if I clicked the error information in ISE's console, the file containing the error will be opened in the background of Emacs with the cursor in the error position.
While it is not a big deal if I compare the benefits and drawbacks brought by Emacs VHDL mode, I do like Emacs can change the file I opened in ISE to the current buffer. So the question is how to set Emacs or Xilinx ISE to change Emacs's current buffer to the one I opened or clicked in ISE?
I suppose it should be some configuration related to Emacs rather than settings in ISE (obvious there is not too much choice in ISE's options). It maybe a simple question but it's beyond my current knowledge of Emacs configuration. I really appreciate if someone here could help me on this issue. Thank you guys in advance:)
P.S. Sorry for my poor English expression. Hopefully you can understand my quesition.
With some configuration it's possible to tell Emacs to switch to the related buffer. However, you might want to consider opening a new window (frame in Emacs term) when you call the editor in ISE.
The command line parameter -c tells Emacs client to open a new frame
{C:\Program Files (x86)\emacs\bin\emacsclient.exe} -c +$2 $1
(Emacs newbie here)
Sometimes a Help buffer gets opened in my emacs editor. It opens in a different pane, splitting the current window into two halves vertically.
When I use C-k buffer-name, to kill a buffer (say Help), some other buffer (say scratch) gets opened automatically in that pane.
Is it possible to revert to my previous configuration, after a random buffer (Help or Debug..) gets opened.
My previous configuration would be to go back to a single window with no panes
To revert to the previous window configuration after any arbitrary change(s), you should enable winner-mode in your .emacs file:
(winner-mode 1)
Then you can use C-c<left> (repeatedly, if necessary) to undo window configuration changes with winner-undo.
C-c<right> calls winner-redo which returns you to the most recent configuration (immediately; not in single steps the like the 'undo' command).
Winner mode is the key to never ever getting annoyed by Emacs creating an unwanted window, but it also lets you do things you wouldn't have done before (for instance C-x1 to maximise one of your windows temporarily for easier reading, because getting back all the windows you just deleted is now trivial).
Obviously this is also incredibly useful if you accidentally mess up your window config!
Hello to revert back to one buffer you must hit C-x1 while standing in the buffer you want to keep. And to switch between frames C-xo
I recently switched to using GNU Emacs 24 from 23, and I notice that whenever I enter gud the *input/output* buffer is open. I have close it manually with C-x 0 everytime I debug. Can anyone point me to the correct variable which needs to be configured in order to stop displaying this buffer by default?
There is a 'gud-gdb' in new emacs releases that implement the old behavior of gdb/emacs interaction (no dedicated-windows and no I/O buffer). If you don't want to call M-x gud-gdb when you use it you can define an alias for M-x gdb
I have this problem as well. After a quick look at the source code, the problem appears to be that GUD dedicates most of its windows (that is, it calls set-window-dedicated-p on them). A dedicated window is one that cannot be switched away from. I guess more and more young guns are using GUD in many windows mode and want GUD to manage their window layout, and those of us that like to do that manually are in the minority. There doesn't seem to be anything obvious in gdb-mi.el that disables this behavior (for example, gdb-set-window-buffer seems to always do a set-window-dedicated-p to t for all windows it manages).
For now, this solution is more or less the one I'm using -- I manually deactivate the window dedication. This seems suboptimal, though. There ought to be some way to get GUD to let you manually manage the window layout. This question is related.
You can disable window dedication altogether like this: (in Emacs 24.4+)
(defun set-window-undedicated-p (window flag)
"Never set window dedicated."
flag)
(advice-add 'set-window-dedicated-p :override #'set-window-undedicated-p)
Note that this doesn't affect already dedicated windows.