Changes between Version 5 and Version 6 of HemlockUser/FilesBuffersAndWindows


Ignore:
Timestamp:
11/05/07 16:46:37 (6 years ago)
Author:
rme
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HemlockUser/FilesBuffersAndWindows

    v5 v6  
    1111 File:: 
    1212  A file provides permanent storage of text. Hemlock has commands to 
    13   read files into buffers and write buffers out into files.  
     13  read files into buffers and write buffers out into files. 
    1414 
    1515 Buffer:: 
     
    2525  any position in any buffer. It is thus possible, and often useful, 
    2626  to have several windows displaying different places in the same 
    27   buffer.  
     27  buffer. 
    2828 
    2929== 3.2 Buffers == 
    3030 
    31 In addition to some text, a buffer has several other user-visible attributes:  
     31In addition to some text, a buffer has several other user-visible attributes: 
    3232 
    3333 A name:: 
    34  A buffer is identified by its name, which allows it to be selected, destroyed, or otherwise manipulated. 
     34 A buffer is identified by its name, which allows it to be selected, 
     35 destroyed, or otherwise manipulated. 
    3536 
    3637 A collection of modes:: 
    37  The modes present in a buffer alter the set of commands available and otherwise alter the behavior of the editor. For details see page 8.  
     38 The modes present in a buffer alter the set of commands available and otherwise alter the behavior of the editor. For details see page 8. 
    3839 
    3940 A modification flag:: 
    40  This flag is set whenever the text in a buffer is modified. It is often useful to know whether a buffer has been changed, since if it has it should probably be saved in its associated file eventually.  
     41 This flag is set whenever the text in a buffer is modified. It is 
     42 often useful to know whether a buffer has been changed, since if it 
     43 has it should probably be saved in its associated file eventually. 
    4144 
    4245 A write-protect flag:: 
    43  If this flag is true, then any attempt to modify the buffer will result in an error.  
     46 If this flag is true, then any attempt to modify the buffer will 
     47 result in an error. 
    4448 
    4549Select Buffer   (bound to C-x b)         [Command] 
    46                  
    47 This command prompts for the name of a existing buffer and makes that buffer the current buffer. The newly selected buffer is displayed in the current window, and editing commands now edit the text in that buffer. Each buffer has its own point, thus the point will be in the place it was the last time the buffer was selected. When prompting for the buffer, the default is the buffer that was selected before the current one.  
    48  
     50 
     51This command prompts for the name of a existing buffer and makes that 
     52buffer the current buffer. The newly selected buffer is displayed in 
     53the current window, and editing commands now edit the text in that 
     54buffer. Each buffer has its own point, thus the point will be in the 
     55place it was the last time the buffer was selected. When prompting for 
     56the buffer, the default is the buffer that was selected before the 
     57current one. 
    4958 
    5059Select Previous Buffer          (bound to C-M-l)         [Command] 
    5160 
    5261Circulate Buffers       (bound to C-M-L)         [Command] 
    53                  
    54 With no prefix argument, Select Previous Buffer selects the buffer that has been selected most recently, similar to C-x b Return. If given a prefix argument, then it does the same thing as Circulate Buffers.  
    55  
    56 Circulate Buffers moves back into successively earlier buffers in the buffer history. If the previous command was not Circulate Buffers or Select Previous Buffer, then it does the same thing as Select Previous Buffer, otherwise it moves to the next most recent buffer. The original buffer at the start of the excursion is made the previous buffer, so Select Previous Buffer will always take you back to where you started.  
    57  
    58 These commands are generally used together. Often Select Previous Buffer will take you where you want to go. If you don't end up there, then using Circulate Buffers will do the trick.  
    59  
    60  
     62 
     63With no prefix argument, Select Previous Buffer selects the buffer 
     64that has been selected most recently, similar to C-x b Return. If 
     65given a prefix argument, then it does the same thing as Circulate 
     66Buffers. 
     67 
     68Circulate Buffers moves back into successively earlier buffers in the 
     69buffer history. If the previous command was not Circulate Buffers or 
     70Select Previous Buffer, then it does the same thing as Select Previous 
     71Buffer, otherwise it moves to the next most recent buffer. The 
     72original buffer at the start of the excursion is made the previous 
     73buffer, so Select Previous Buffer will always take you back to where 
     74you started. 
     75 
     76These commands are generally used together. Often Select Previous 
     77Buffer will take you where you want to go. If you don't end up there, 
     78then using Circulate Buffers will do the trick. 
    6179 
    6280Create Buffer   (bound to C-x M-b)       [Command] 
    63                  
    64 This command is very similar to Select Buffer, but the buffer need not already exist. If the buffer does not exist, a new empty buffer is created with the specified name.  
     81 
     82This command is very similar to Select Buffer, but the buffer need not 
     83already exist. If the buffer does not exist, a new empty buffer is 
     84created with the specified name. 
    6585 
    6686 
    6787Kill Buffer     (bound to C-x k)         [Command] 
    68                  
    69 This command is used to make a buffer go away. There is no way to restore a buffer that has been accidentally deleted, so the user is given a chance to save the hapless buffer if it has been modified. This command is poorly named, since it has nothing to do with killing text.  
     88 
     89This command is used to make a buffer go away. There is no way to 
     90restore a buffer that has been accidentally deleted, so the user is 
     91given a chance to save the hapless buffer if it has been 
     92modified. This command is poorly named, since it has nothing to do 
     93with killing text. 
    7094 
    7195 
    7296 
    7397List Buffers    (bound to C-x C-b)       [Command] 
    74                  
    75 This command displays a list of all existing buffers in a pop-up window. A "*" is displayed before the name of each modified buffer. A buffer with no associated file is represented by the buffer name followed by the number of lines in the buffer. A buffer with an associated file are is represented by the name and type of the file, a space, and the device and directory. If the buffer name doesn't match the associated file, then the buffer name is also displayed. When given a prefix argument, this command lists only the modified buffers.  
    76  
    77  
     98 
     99This command displays a list of all existing buffers in a pop-up 
     100window. A "*" is displayed before the name of each modified buffer. A 
     101buffer with no associated file is represented by the buffer name 
     102followed by the number of lines in the buffer. A buffer with an 
     103associated file are is represented by the name and type of the file, a 
     104space, and the device and directory. If the buffer name doesn't match 
     105the associated file, then the buffer name is also displayed. When 
     106given a prefix argument, this command lists only the modified buffers. 
    78107 
    79108Buffer Not Modified     (bound to M-~)   [Command] 
    80                  
     109 
    81110This command resets the current buffer's modification flag---it does 
    82111not save any changes. This is primarily useful in cases where a user 
    83112accidentally modifies a buffer and then undoes the change. Resetting 
    84113the modified flag indicates that the buffer has no changes that need 
    85 to be written out.  
    86  
    87  
     114to be written out. 
    88115 
    89116Check Buffer Modified   (bound to C-x ~)         [Command] 
    90                  
     117 
    91118This command displays a message indicating whether the current buffer 
    92 is modified.  
    93  
    94  
     119is modified. 
    95120 
    96121Set Buffer Read-Only             [Command] 
    97                  
     122 
    98123This command changes the flag that allows the current buffer to be 
    99124modified. If a buffer is read-only, any attempt to modify it will 
    100125result in an error. The buffer may be made writable again by repeating 
    101 this command.  
     126this command. 
    102127 
    103128 
    104129 
    105130Set Buffer Writable              [Command] 
    106                  
    107 This command ensures the current buffer is modifiable.  
    108  
     131 
     132This command ensures the current buffer is modifiable. 
    109133 
    110134 
    111135Insert Buffer            [Command] 
    112                  
     136 
    113137This command prompts for the name of a buffer and inserts its contents 
    114138at the point, pushing a buffer mark before inserting. The buffer 
    115 inserted is unaffected.  
    116  
    117  
     139inserted is unaffected. 
    118140 
    119141Rename Buffer            [Command] 
    120                  
     142 
    121143This command prompts for a new name for the current buffer, which 
    122 defaults to a name derived from the associated filename.  
     144defaults to a name derived from the associated filename. 
    123145 
    124146== 3.3 Files == 
     
    129151 
    130152Find File       (bound to C-x C-f)       [Command] 
    131                  
     153 
    132154This is the command normally used to get a file into Hemlock. It 
    133155prompts for the name of a file, and if that file has already been read 
     
    159181 
    160182 Delete, Backspace, n:: 
    161   Forego reading the file.  
     183  Forego reading the file. 
    162184 
    163185 r:: 
     
    168190 
    169191Save File       (bound to C-x C-s)       [Command] 
    170                  
     192 
    171193This command writes the current buffer out to its associated file and 
    172194resets the buffer modification flag. If there is no associated file, 
     
    184206 
    185207Save All Files Confirm          (initial value t)        [Variable] 
    186                  
     208 
    187209Save All Files does a Save File on all buffers which have an 
    188210associated file. Save All Files and Exit does the same thing and then 
     
    194216 
    195217Visit File      (bound to C-x C-v)       [Command] 
    196                  
     218 
    197219This command prompts for a file and reads it into the current buffer, 
    198220setting the associated filename. Since the old contents of the buffer 
     
    203225 
    204226Write File      (bound to C-x C-w)       [Command] 
    205                  
     227 
    206228This command prompts for a file and writes the current buffer out to 
    207229it, changing the associated filename and resetting the modification 
     
    211233 
    212234Backup File              [Command] 
    213                  
     235 
    214236This command is similar to Write File, but it neither sets the 
    215237associated filename nor clears the modification flag. This is useful 
     
    226248 
    227249Revert File Confirm     (initial value t)        [Variable] 
    228                  
     250 
    229251This command replaces the text in the current buffer with the contents 
    230252of the associated file or the checkpoint file for that file, whichever 
     
    241263 
    242264Insert File     (bound to C-x C-r)       [Command] 
    243                  
     265 
    244266This command prompts for a file and inserts it at the point, pushing a 
    245267buffer mark before inserting. 
     
    248270 
    249271Write Region             [Command] 
    250                  
     272 
    251273This command prompts for a file and writes the text in the region out 
    252274to it. 
     
    255277 
    256278Add Newline at EOF on Writing File      (initial value :ask-user)        [Variable] 
    257                  
     279 
    258280This variable controls whether some file writing commands add a 
    259281newline at the end of the file if the last line is non-empty. 
    260282 
    261283 :ask-user:: 
    262   Ask the user whether to add a newline.  
     284  Ask the user whether to add a newline. 
    263285 
    264286 t:: 
    265  Automatically add a newline and inform the user.  
     287 Automatically add a newline and inform the user. 
    266288 
    267289 nil:: 
    268  Never add a newline and do not ask.  
     290 Never add a newline and do not ask. 
    269291 
    270292Some programs will lose the text on the last line or get an error when 
     
    273295 
    274296Keep Backup Files       (initial value nil)      [Variable] 
    275                  
     297 
    276298Whenever a file is written by Save File and similar commands, the old 
    277299file is renamed by appending ".BAK" to the name, ensuring that some 
     
    288310 
    289311Auto Save Mode                   [Command] 
    290                  
     312 
    291313This command turns on Save mode if it is not on, and turns off when it 
    292314is on. Save mode is on by default. 
     
    297319 
    298320Auto Save Key Count Threshold   (initial value 256)      [Variable] 
    299                  
     321 
    300322These variables determine how often modified buffers in Save mode will 
    301323be checkpointed. Checkpointing is done after Auto Save Checkpoint 
     
    308330 
    309331Auto Save Cleanup Checkpoints   (initial value t)        [Variable] 
    310                  
     332 
    311333If this variable is true, then any checkpoint file for a buffer will 
    312334be deleted when the buffer is successfully saved in its associated 
     
    318340 
    319341Auto Save Pathname Hook         (initial value make-unique-save-pathname)        [Variable] 
    320                  
     342 
    321343These variables determine the naming of checkpoint files. Auto Save 
    322344Filename Pattern is a format string used to name the checkpoint files 
     
    349371 
    350372Last Resort Pathname Defaults   (initial value (pathname "gazonk"))      [Variable] 
    351                  
     373 
    352374These variables control the computation of default filename defaults 
    353375when the current buffer has no associated file. 
     
    437459 
    438460Process File Options             [Command] 
    439                  
     461 
    440462This command processes the file options in the current buffer as 
    441463described above. This is useful when the options have been changed or 
     
    449471 
    450472New Window      (bound to C-x C-n)       [Command] 
    451                  
     473 
    452474This command prompts users for a new window which they can place 
    453475anywhere on the screen. This window is in its own group. This only 
     
    457479 
    458480Split Window    (bound to C-x 2)         [Command] 
    459                  
     481 
    460482This command splits the current window roughly in half to make two 
    461483windows. If the current window is too small to be split, the command 
     
    467489 
    468490Previous Window         (bound to C-x p)         [Command] 
    469                  
     491 
    470492These commands make the next or previous window the new current 
    471493window, often changing the current buffer in the process. When a 
     
    479501 
    480502Delete Next Window      (bound to C-x 1)         [Command] 
    481                  
     503 
    482504Delete Window makes the current window go away, making the next window 
    483505current. Delete Next Window deletes the next window, leaving the 
     
    491513 
    492514Go to One Window                 [Command] 
    493                  
     515 
    494516This command deletes all window groups leaving one with the Default 
    495517Initial Window X, Default Initial Window Y, Default Initial Window 
     
    502524 
    503525Line to Center of Window        (bound to M-#)   [Command] 
    504                  
     526 
    505527Line to Top of Window scrolls the current window up until the current 
    506528line is at the top of the screen. 
     
    514536 
    515537Scroll Next Window Up   (bound to C-M-V)         [Command] 
    516                  
     538 
    517539These commands are the same as Scroll Window Up and Scroll Window Down 
    518540except that they operate on the next window. 
     
    521543 
    522544Refresh Screen          (bound to C-l)   [Command] 
    523                  
     545 
    524546This command refreshes all windows, which is useful if the screen got 
    525547trashed, centering the current window about the current line. When the