User Tools

Site Tools


ease:fallschool_cpo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ease:fallschool_cpo [2020/07/01 11:31] – Add another mini-buffer command cpollokease:fallschool_cpo [2020/07/01 13:08] (current) cpollok
Line 5: Line 5:
  
 ===== Definitions ===== ===== Definitions =====
- 
  
 An Emacs buffer is the equivalent of window / tab in other editors. It can have a file associated with it that you can (or cannot depending on the privileges) edit, or it can be running a process (e.g. when you open the shell: M-x shell). The minibuffer is usually a one-line part of the screen at the bottom of the Emacs window.  An Emacs buffer is the equivalent of window / tab in other editors. It can have a file associated with it that you can (or cannot depending on the privileges) edit, or it can be running a process (e.g. when you open the shell: M-x shell). The minibuffer is usually a one-line part of the screen at the bottom of the Emacs window. 
  
 The cursor in Emacs is called the point. Dired is the directory explorer mode of Emacs. When in the following we talk about "closing" a buffer it's not generally meant as really clsoing it, but only the window for it. The buffer is then still active in the background and can be switched to. To really close a buffer you need to "kill" it. The cursor in Emacs is called the point. Dired is the directory explorer mode of Emacs. When in the following we talk about "closing" a buffer it's not generally meant as really clsoing it, but only the window for it. The buffer is then still active in the background and can be switched to. To really close a buffer you need to "kill" it.
 +
 +===== Window Overview =====
 +
 +When first opening Emacs you will be welcomed by this screen:
 +
 +{{ :ease:emacs:overview.png?direct&600 |}}
 +
 +There are the two tool bars (markers 1 and 2), but we will not be using them much. You can explore them if you want, but everything in them can be done with key bindings as well.
 +
 +The main window currently occupies most of the screen (3). At the top of this window there's the prompt and cursor (4). The prompt (CL-USER>) also indicates, that the window's current buffer is the REPL. This can also be seen in the bottom bar just below the window (grey bar at marker 5). There it says "slime-repl sbcl", which is the current buffer's name.
 +
 +Just below the window there is another white bar. This is the so-called "mini-buffer", where you can type in commands for various purposes.
  
  
Line 32: Line 43:
   * **M-R**: regex-search in the previously executed commands (can step through with **C-Up** and **C-Down**)   * **M-R**: regex-search in the previously executed commands (can step through with **C-Up** and **C-Down**)
  
-==== Handling multiple buffers: ==== +==== Handling multiple windows: ==== 
-  * **C-x 2**: Splits the currently selected buffer horizontally +  * **C-x 2**: Splits the currently selected window horizontally 
-  * **C-x 3**: Splits the currently selected buffer vertically +  * **C-x 3**: Splits the currently selected window vertically 
-  * **C-x 0**: Closes the currently selected buffer (the other buffer in the split is scaled back to it's full size) +  * **C-x 0**: Closes the currently selected window (the other window in the split is scaled back to it's full size) 
-  * **C-x 1**: Close any buffer other than the currently selected+  * **C-x 1**: Close any window other than the currently selected 
 + 
 + 
 +=== Example configurations === 
 + 
 +Through this feature you can arrange windows arbitrarily in any way you want: 
 + 
 +{{:ease:emacs:overview_3-split.png?direct&400|}} 
 +{{:ease:emacs:overview_extreme_split.png?direct&400|}} 
  
 ==== Opening files, switching and killing buffers: ==== ==== Opening files, switching and killing buffers: ====
Line 64: Line 84:
   * **ros-load-system**: Then enter the ROS package, hit Return, enter the LISP system, hit return.   * **ros-load-system**: Then enter the ROS package, hit Return, enter the LISP system, hit return.
  
-> Example: **r-l-s TAB**, autocompletes to **ros-load-system**, hit Return, enter **cram_mobile_pick_place_plans** for the ROS package (note the underscores), hit Return, enter **cram-mobile-pick-place-plans** for the LISP system (note the dashes), hit Return again. Voila, you loaded a CRAM lisp system.+> Example:
  
 +> Press **,** on an empty prompt in the REPL to start a command in the mini-buffer.
 +
 +> {{ :ease:emacs:mini_buffer:0.png?nolink |}}
 +
 +> Enter **r-l-s TAB** so it tab-completes to ros-load-system.
 +
 +> {{ :ease:emacs:mini_buffer:1.png?nolink |}}
 +
 +> {{ :ease:emacs:mini_buffer:2.png?nolink |}}
 +
 +
 +> Enter **cram-mobile-pick-place-plans** for the ROS package (note the udnerscores). (You can use tab-completion here as well.)
 +
 +> {{ :ease:emacs:mini_buffer:3.png?nolink |}}
 +
 +> Enter **cram-mobile-pick-place-plans** for the LISP system (note the dashes). You have also just pressed **TAB** to choose the default system (as indicated in the prompt text).
 +
 +> {{ :ease:emacs:mini_buffer:4.png?nolink |}}
 +
 +> After entering the system, Emacs will load the package and after it has completed loading, it will say so in the mini-buffer as well.
  
  
Line 72: Line 112:
  
  
-When starting out with using Emacs, it can be useful to have a fixed window configuration to not get overwhelmed with having to constantly open and close new buffer windows. When opening Emacs, use the **C-x 2** command to split the window in two and just leave the bottom one as the REPL and use the top one for viewing files (**C-x f** and **C-x b**).+When starting out with using Emacs, it can be useful to have a fixed window configuration to not get overwhelmed with having to constantly open and close new buffer windows. When opening Emacs, use the **C-x 2** command to split the window in two and just leave the bottom one as the REPL and use the top one for viewing files (**C-x f** and **C-x b**). Like so: 
 + 
 +{{ :ease:emacs:overview_split_working.png?direct&600 |}}
  
  
ease/fallschool_cpo.1593603066.txt.gz · Last modified: 2020/07/01 11:31 by cpollok

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki