PCE version 4C hlp_buffer first_fragment last_fragmenteditorsmodifiedundo_buffer_sizesyntax generationrequest_renumberfileOIxC hlp_fragment text_buffernextpreviousstylelabelOIxRIC hlp_header text_buffernextpreviousstylelabelOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOI xRIOI xRIOI xRIOI xRIOI xRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOI xRIOI!xRIOI"xRIOI#xRIOI$xRIOI%xRIOI&xRIOI'xRIOI(xRIOI)xRIOI*xRIOI+xRIOI,xRIOI-xRIOI.xRIOI/xRIOI0xRIOI1xRIOI2xRIOI3xRIOI4xRIOI5xRIOI6xRIOI7xRIOI8xRIOI9xRIOI:xRIOI;xRIOIxRIOI?xRIOI@xRIOIAxRIOIBxRIOICxRIOIDxRIOIExRIOIFxRIOIGxRIOIHxRIOIIxRIOIJxRIOIKxRIOILxRIOIMxRIOINxRIOIOxRIOIPxRIOIQxRIOIRxRIOISxRIOITxRIOIUxRIOIVxRIOIWxRIOIXxRIOIYxRIOIZxRIOI[xRIOI\xRIOI]xRIOI^xRIOI_xRIOI`xRIOIaxRIOIbxRIOIcxRIOIdxRIOIexRIOIfxRIOIgxRIOIhxRIOIixRIOIjxRIOIkxRIOIlxRIOImxRIOInxRIOIoxRIOIpxRIOIqxRIOIrxRIOIsxRIOItxRIOIuxRIOIvxRIOIwxRIOIxxRIOIyxRIOIzxRIOI{xRIOI|xRIOI}xRIOI~xRIOIxRIOIxRIOIxRInRINbuttonN34S RINbuttonN42NRI~NbuttonN33JRI}NbuttonN32? RI|NbuttonN31;RI{NbuttonN30(RIzNbuttonN29 RIyNbuttonN28RIxNbuttonN35RIwNbuttonN34RIvNbuttonN27RIuNbuttonN26 RItNbuttonN25RIsNbuttonN24RIrNbuttonN23 RIqNbuttonN22RIpNbuttonN21RIoNbuttonN20 RInNbuttonN19 RImNbuttonN18RIlNbuttonN17RIkNbuttonN16}RIjNbuttonN15wRIiNbuttonN14qRIhNbuttonN13d RIgNbuttonN12X RIfNbuttonN11L RIeNbuttonN10B RIdNbuttonN97 RIcNbuttonN8(RIbNbuttonN7RIaNbuttonN6RI`NbuttonN11RI_NbuttonN10RI^NbuttonN9 RI]NbuttonN5 RI\NbuttonN7RI[NbuttonN6RIZNbuttonN4RIYNbuttonN3RIXNbuttonN2RIWNbuttonN2RIVNbuttonN1 RIUNbuttonN0RITNsectionN8.__concept_indexRISNkeywordnRIRNsectionN+7.__server_(editing_for_other_applications)?+RIQNkeywordN18RIPNkeywordN27`RIONsectionN 6.__modes: RINNkeywordN8(RIMNkeywordN19 RILNkeywordN23 RIKNkeywordN13 RIJNkeywordN29~ RIINboldnzRIHNkeywordN25RIGNkeywordN17RIFN emphasizenRIENsectionNM-xRIDNbuttonNM-xRICNkeywordN11wRIBNkeywordN9 RIANkeywordN10 RI@N subsectionN4.2.__argument_history mRI?NkeywordN9 ^ RI>Nboldn <RI=N subsectionN4.1.__argument_completion RIRINbuttonN 1.__contents0 RINsectionN 1.__contents! nNtitleNmainRInaI'Adefault_syntax_tableIuCfilenamepathkindstatusfilterOIxN0/staff/jan/lib/pl-4.0.3/xpce/appl-help/emacs.hlpdNbinaryNwriten_ PceEmacs Bluffers Guide 1. Contents 1. Contents 2. Starting PceEmacs 3. Finding Commands 3.1. The Most Important Commands 3.1.1. Aborting commands 3.1.2. Undoing commands 3.1.3. Searching 3.1.4. Saving files 3.1.5. Quit PceEmacs window 4. Prompting for arguments 4.1. Argument completion 4.2. Argument history 5. Commands by Name 6. Modes 7. Server (Editing for other applications) 8. Concept Index 2. Starting PceEmacs PceEmacs is a general purpose text-editor largely compatible to GNU-Emacs. It is fully defined in and integrated with XPCE/Prolog. It can be started using the Prolog predicates ?- emacs. Start emacs, just opens the PceEmacs Buffer Menu and start the server for accepting edit requests from other applications. ?- emacs(+File). Start PceEmacs on the specified file. When running with SWI-Prolog, you may wish to load the library file ?- ensure_loaded(library('emacs/swi_prolog')). After which error messages from consulting Prolog code are forwarded to PceEmacs and the SWI-Prolog predicates ed(+Predicate) and edit(+File) both call PceEmacs. 3. Finding Commands Below the help button, the option ``Show Key Bindings'' displays the key-binding map for PceEmacs in the mode you are currently using. The Notation for keys is: \C- with the control-key held down \e , either with the meta-key held down or prefixed by the escape key. RET The RETURN key SPC The SPACE bar TAB The TAB key Thus \C-x\C-f means ``hold the control-key down while typing the letters `x' and `f'. 3.1. The Most Important Commands Some commands should not be forgotten: 3.1.1. Aborting commands # \C-g (i.e. control-g) aborts any ongoing command. It is sometimes necessary to hit this sequence multiple times to get back to the real toplevel. 3.1.2. Undoing commands # \C-_ (I.e. Control-underscore). Undo. Multiple undos goes further back into the history. Undo may be `undone' by giving any other command: \C-_ , \C-_, \C-_, \C-f, \C-_ Will first undo three commands, and then `redo' the last one. \C-f is just one harmless command (moving the cursor), any other command that does not modify the buffer is fine. 3.1.3. Searching # \C-s Start incremental search forwards. Further typing expands the search string and shows the current match inverted. Hitting anything else but a printable character aborts the search, except for: \C-s Search for next \C-w Expand search pattern for full word DEL Delete one character from search pattern ESC Stop searching. Put caret at end of match \C-g (abort). Stop searching, revert caret to start # \C-r Same as \C-s, but searches backwards to the start of the file. 3.1.4. Saving files # \C-x\C-s Save current buffer to its associated file 3.1.5. Quit PceEmacs window # \C-x\C-c Quit this window. PceEmacs as a whole cannot be quited. 4. Prompting for arguments Any command that requires an argument prompts for them one-by-one in the ``mini-window'' (little window at the bottom). While the prompt is there, all typing goes to the prompted-for value. When all arguments are collected, the command is executed. Again, \C-g aborts (entering) the command. 4.1. Argument completion If you don't know what to answer, type TAB to see possible alternatives (completion). 4.2. Argument history Each method (=command) maintains a history of arguments you entered before. The key-strokes \ep and \en move back- and forwards through this history list, allowing you to reuse previously entered arguments. This also applies for the command \ex (see "Commands by Name"). 5. Commands by Name All commands may be entered by name using the \ex command (i.e. escape-x or meta-x). You will first be prompted for the name of the command, followed by the required arguments. This way you can invoke any send-method defined on the current mode. You can use the PCE manual tools to find applicable methods. For example ``\ex fill_mode RET on RET'' switches the editor into auto-fill-mode. 6. Modes PceEmacs defines various ``modes''. A mode is a specialised environment for editing certain types of files. The modes are normally switched automatically on the file-extension, but may be switched by hand too using ``\ex mode'' or the mode menu. 7. Server (Editing for other applications) On Unix systems, PceEmacs can act as a server, so other processes can ask PceEmacs to edit files. This mode is started using the predicate emacs_server/0. The file /dotfiles/edit contains an example client script that asks PceEmacs to edit files for you or starts GNU-Emacs if it cannot contact PceEmacs. 8. Concept Index .xpce_emacs_server \C- \C-_ \C-g \C-r \C-s \C-x\C-c \C-x\C-s \e \en \ep \ex aborts argument auto-fill-mode completion control-g control-key control-key current mode emacs emacs escape escape-x file-extension fill_mode GNU-Emacs incremental search library('emacs/swi_prolog') manual tools meta-key meta-x mini-window modes Quit redo RET send-method Show Key Bindings SPC SWI-Prolog TAB Undo xpce-client rIxx