Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I just started to use EMACS, it's amazing.
So I had this question, what's the difference between a window and a frame ?
my understanding is :
you can press a 'q' to quit a frame not a window.
frame is composed of a series of windows
frame will contain a subset of all buffers.
frame is more like the concept of project while window is the for each file.
3 and 4 are not correct seemingly, as when I try to jump between frames I still saw all the buffers.
so are my understanding correct? or I am not doing it in a correct way ?
is there project like function for EMACS to organize buffers into different projects, so that when I jump between buffers, I only saw the buffers localize to that project?
can some one talk more about the project concept in EMACs related with the frame and window?
This is a bit confusing, but it's all due to history. Emacs was first created back in the days of text terminals, before the GUI was common. All you had was lines of monospaced text, usually around 80 columns by 24 rows. Emacs had the ability to split the screen into multiple windows, so you could see more than one file at once.
Then graphical terminals and the GUI came along, and "window" came to mean the GUI variety. But Emacs had dozens of functions and variables with "window" in their names, which dealt with its split-screen type of window. Renaming those functions would break all the Emacs Lisp code that used them. Therefore, when Emacs gained a GUI interface, its designers decided that it would be easier to come up with a new term to mean "GUI window", and keep "window" to mean "old-style Emacs window". The new term they came up with was "frame" (because frames are what surround windows).
So when Emacs talks about a "frame", it means the same thing that other programs would call a "window". In Emacs, a frame is basically a terminal emulator that can be resized on demand. Each frame acts pretty much like an Emacs running in a text terminal; the frame can contain one or more old-style Emacs windows.
However, all the frames of a single Emacs process are linked. Any buffer can be displayed in any window of any frame, and you can have the same buffer displayed in multiple windows and/or frames at the same time.
You can find more details in the chapter of the Emacs manual on "Frames".
So your (3) is not correct; every buffer is available in every frame. (4) is not really correct either; it's up to you how many frames and/or windows you want to use. Personally, I normally use 1 frame with 1 or 2 windows. I occasionally use a second frame if I want more space to display one file while working on 1 or 2 other files.
Related
I mean if I type in c-x 2, then for comparasion I want it to scroll the other window synchronously when I scroll the temporary window.
Try Follow Mode:
M-x follow-mode
Follow mode is a minor mode that makes two windows, both showing the same buffer, scroll as a single tall “virtual window”.
Note that follow mode can only synchronize scrolling windows which content a same file. For scrolling windows with diffrent files synchronously, here's an answer for it.
Follow mode can only synchronize scrolling windows which content a
same file. Does it possible to scrolling windows with diffrent files
synchronously? – 9307420654
There is a minor mode to apply all scrolling commands to all visible
windows in the current frame. Check scroll-all-mode for that. Or else,
if you want to scroll together only 2 windows and only when you use a
specific keystroke, you can do something like a function that scrolls
the current window (scroll-up or scroll-down) and then the “other
window” (i.e., the next one in the list of windows), with
scroll-other-window (with argument '-, i.e., the symbol “minus”, for
scrolling down). Then you can assign this to a keystroke, e.g., C-M-up
/ down.
scroll-all-mode:
Use M-x scroll-all-mode to scroll multiple buffers together.
Very useful for visually comparing two files which are hard to diff
because of lots of trivial changes amongst the changes you are looking
for.
Another solution might be the scroll-all-mode:
M-x scroll-all-mode
Of course, if the windows you want to compare are somehow similar (like different versions of the same file), you probably would like to use a "diff" tool, like M-x ediff-buffers which compares the buffers with colors and keeps them scrolling in sync.
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
This question already has answers here:
is it possible to move the emacs minibuffer to the top of the screen?
(4 answers)
Using getopts to process long and short command line options
(32 answers)
Closed 9 years ago.
I'm tired to move my eye to minibuffer that is bottom of Emacs.
So I want to minimize eye movement. Is there any solution for this? I want something like as following.
Setting minibuf location on top of current frame.(I don't know It's effective or not. )
If I typed M-x, minibuf show up center of current frame.(I think it's effective.)
I find it helps to have the minibuffer always in the same place on my screen --- IOW, a standalone minibuffer frame. Yes, that involves eye movement, but always to the same place. You might find that this helps. See library oneonone.el for an implementation that is easy to try.
I am using emacs and usually have multiple buffers open using horizontal and vertical splits. Sometimes I need to view one of the buffers in full screen and press ESC for that. However is it possible to restore the previous screen placement ? ie if I had 4 frames open, then can I restore them back ?
http://www.emacswiki.org/emacs/WinnerMode
^ is the best
C-c left to restore previous window placement
You can use window-configuration-to-register or frame-configuration-to-register to save the window and frame configurations to a register and restore them. You can use this along with a little elisp to give you the functionality you need.
I have some more details about how to use registers posted in this screencast.
How do I customize which window GUD will use when i issue commands - 'up', 'down', etc ? It seems to use an arbitrary window, sometimes even the window with gdb in it - I want to be able to specify a specific window to be used.
Have you considered borrowing the key bindings mentioned in the following question?
Emacs, switch to previous window
This question implies that GUD steps on some things if you don't add a parameter. Maybe your command bindings are being affected similiarly.
Using gdb in Emacs 23
I asked a buddy of mine about this issue and here is what he said.
Well, we used xemacs and so it's not exactly apples to apples here. I
do have gnu-emacs installed on cygwin and I can't replicate his
problem. I think he definitely needs to list a version # for emacs
and the version # for all his installed packages.
When you press up/down it calls 'previous-line' and 'next-line'
respectively which both move the cursor in the default buffer. The
only thing I can think is that he has something running that switches
buffers (lisp 'set-buffer') temporarily and maybe doesn't set it back
or errors b/f restoring the buffer? Better to use
'with-current-buffer' (or one of the other with-* forms) that saves
the current state of the ui runs your lisp code and restores the ui
state.