Perforce/Emacs Integration

Perforce/Emacs Integration


This document will help you get up and running using Emacs and Perforce.

  1. Installing it

  2. First things first - add p4.el to your .emacs file

    (load-library "p4")

    Double check that your .cshrc file defines P4CONFIG, P4USER, and P4PORT. That's it! You should be all set to use p4.el!

  3. Using it

  4. Once you have p4.el installed and ready to go you can use emacs' built-in help to review p4.el's functions: C-x p ? will bring up the list. C-h f p4-xyz provides defun information for p4-xyz. Each Perforce command has a corresponding p4.el command. The vc model is not followed. Use 'C-x p help commands' for Perforce help.

    p4.el Key Mappings
    KeyMapping KeyMapping KeyMapping
    C-x p ap4-add C-x p Bp4-branch C-x p bp4-bug-report
    C-x p Cp4-changes C-x p cp4-client C-x p C-fp4-depot-find-file
    C-x p ?p4-describe-bindings C-x p =p4-diff C-x p -p4-ediff
    p4-ediff2 C-x p Xp4-fix C-x p xp4-delete
    C-x p Dp4-describe C-x p dp4-diff2 C-x p ep4-edit
    C-x p vp4-emacs-version C-x p Gp4-get C-x p gp4-get-client-name
    p4-group p4-groups
    C-x p fp4-filelog C-x p Fp4-files C-x p Hp4-have
    C-x p hp4-help C-x p Jp4-jobs C-x p jp4-job
    C-x p Ip4-integ C-x p i p4-info C-x p l p4-label
    C-x p L p4-labels C-x p C-lp4-labelsync C-x p n p4-notify
    C-x p o p4-opened C-x p qp4-pop-window-config C-x p pp4-print
    C-x p Vp4-print-with-rev-history C-x p Rp4-refresh C-x p mp4-rename
    C-x p Ep4-reopen C-x p rp4-revert C-x p sp4-set-client-name
    C-x p Pp4-set-p4-port C-x p Sp4-submit C-x p tp4-toggle-vc-mode
    C-x p up4-user C-x p Up4-users C-x p wp4-where
    p4.el Function Help
    FunctionHelp
    p4-describe-bindings
    C-x p ?
    A function to list the key bindings for the p4 prefix map
    p4-ediff
    C-x p -
    Use ediff to compare file with its original client version.
    p4-ediff2
    Use ediff to compare two different depot files.
    p4-diff-head
    Use diff-head to compare file (opened or unopened) with the latest revision in the depot.
    p4-diff
    C-x p =
    To diff the current file and topmost depot version, type C-x p =.
    
    Run diff (on the client) of a client file against the corresponding
    revision in the depot.	The file is only compared if the file is
    opened for edit or the revision provided with the file argument is
    not the same as the revision had by the client.
    
    If no file argument is given, diff all open files.
    This can be used to view pending changes.
    
    The -f flag forces a diff for every file, regardless of whether
    they are opened or if the client has the named revision.
    This can be used to verify the client contents.
    
    The -s flag outputs reduces the output of diff to the names of files
    satisfying the following criteria:
    
    	-sa	Opened files that are different than the revision
    		in the depot, or missing.
    
    	-sd	Unopened files that are missing on the client.
    
    	-se	Unopened files that are different than the revision
    		in the depot.
    
    	-sr	Opened files that are the same as the revision in the
    		depot.
    		    
    p4-fix
    C-x p X
    p4-fix is an interactive Lisp function in `p4'.
    
    To mark jobs as being fixed by a changelist number, type C-x p X.
    
    'p4 fix' marks each named job as being fixed by the changelist
    number given with -c.  The changelist may be either pending or,
    submitted and the jobs may be still be opened or already closed
     (fixed by another changelist).
    
    If the changelist has already been submitted and the job is still
    open then 'p4 fix' marks the job closed.  If the changelist has not
    been submitted and the job is still open, the job will be marked
    closed when the changelist is submitted.  If the job is already
    closed, it is left alone.
    
    The -d flag causes the specified fixes to be deleted.  This does not
    otherwise affect the named changelist or jobs.
    		    
    p4-delete
    C-x p x
    p4-delete is an interactive Lisp function in `p4'.
    
    To delete the current file from the depot, type C-x p x.
    
    Opens a file that currently exists in the depot for deletion.
    If the file is present on the client it is removed.  If a pending
    change number is given with the -c flag the opened file is associated
    with that change, otherwise it is associated with the 'default'
    pending change.
    
    If file is already open it is reopened for delete and moved into
    the specified pending change (or 'default' change if no change
    number is given.)
    
    Files that are deleted generally do not appear on the have list.
    		    
    p4-where
    C-x p w
    To show how local file names map into depot names, type C-x p w.
    
    Optional args [file ...] are passed as prefix arguments.
    
    Where shows how the named files map through the client map
    into the depot.	 If no file is given, the mapping for '...'
    (all files in the current directory and below) is shown.
    		    
    p4-print-with-rev-history
    C-x p V
    To Print a depot file with revision history to a buffer,
    type C-x p V
    		    
    p4-emacs-version
    C-x p v
    Return the current Emacs-P4 Integration version.
    p4-users
    C-x p U
    To display list of known users, type C-x p U.
    
    Optional args [user ...] are passed as prefix arguments.
    
    Reports the list of all users, or those users matching the argument,
    currently known to the system.	The report includes the last time
    each user accessed the system.
    		    
    p4-user
    C-x p u
    To create or edit a user specification, type C-x p u.
    
    Create a new user specification or edit an existing user
    specification. The specification form is put into a temporary
    file and the editor (given by the environment variable $EDITOR)
    is invoked.
    
    Normally, a user specification is created automatically the
    first time the user invokes any client command that can update
    the depot.  The 'user' command is generally used to edit the
    user's reviewing subscription list for change review.
    
    The user specification form contains the following fields:
    
    User:	     The user name (read only).
    
    Email:	     The user's email address (user@client default).
    
    Update:	     The date the specification was last modified (read only).
    
    Access:	     The date the user last issued a client command.
    
    FullName:    The user's real name.
    
    Reviews:     The subscription list for change review.  You may
    	     use wildcards:
    		 ...		matches any characters including
    
    		 *		matches any character except /
    	     There may be any number of review lines.
    
    The -d flag deletes the named user, but only if the user is not
    the owner of any branches, clients, jobs, labels, or opened files.
    
    The -o flag causes the named user specification to be written
    to the standard output.	 The user's editor is not invoked.
    
    The -i flag causes a user specification to be read from the
    standard input.	 The user's editor is not invoked.
    		    
    p4-toggle-vc-mode
    C-x p t
    In case, the P4 server is not available, or when working off-line, toggle
    the VC check on/off when opening files.
    		    
    p4-submit
    C-x p S
    To submit a pending change to the depot, type C-x p S.
    
    Submit commits a pending change with its associated files to the depot.
    With no argument submit sends the 'default' change.  With the -c flag
    the designated pending change is sent.	Before committing the change
    submit locks all associated files not already locked.  If any file
    cannot be locked the change is aborted.	 If submit is sending the
    default change it first provides the user with a dialog similar to
    'p4 change' so the user can compose a change description.  In this
    dialog the user is presented with the list of open files in change
    'default'.  Files may be deleted from this list but they cannot be
    added.	(Use an open command (open, edit, add, delete) to add
    additional files to a change or to move files between changes.)
    
    If the submit fails for any reason the files are left open in
    a newly created pending change.
    
    Submit is guaranteed to be atomic.  Either all files will be
    updated in the depot as a unit or none will be.
    
    The -i flag causes a change specification to be read from the
    standard input.	 The user's editor is not invoked.
    		    
    p4-set-client
    C-x p s
    To set the current value of P4CLIENT, type C-x p s.
    
    This will change the current client from the previous client to the new
    given value.
    
    Setting this value to nil would disable P4 Version Checking.
    
    `p4-set-client-name' will complete any client names set using the function
    `p4-set-my-clients'. The strictness of completion will depend on the
    variable `p4-strict-complete' (default is t).
    
    Argument P4-NEW-CLIENT-NAME The new client to set to. The default value is
    the current client.
    		    
    p4-refresh
    C-x p R
    Refresh the contents of an unopened file. C-x p R.
    
    Optional args [file ...] are passed as prefix arguments.
    
    Refresh replaces the files with their contents from the depot.	Refresh only
    refreshes unopened files; opened files must be reverted.  This command
    requires naming files explicitly.
    		    
    p4-revert
    C-x p r
    Revert all change in the current file.
    
    Argument SHOW-OUTPUT  displays the *P4 Output* buffer on executing the
    command if t.
    		    
    p4-pop-window-config
    C-x p q
    Pop `num' elements from the `p4-window-config-stack' stack and use
    the last popped element to restore the window configuration.
    		    
    p4-set-p4-port
    C-x p P
    To set the current value of P4PORT, type C-x p P.
    
    This will change the current server from the previous server to the new
    given value.
    
    Argument P4-NEW-P4-PORT The new server:port to set to. The default value is
    the current value of P4PORT.
    		    
    p4-print
    C-x p p
    To print a depot file to a buffer, type C-x p p.
    
    Retrieve the contents of a depot file to the client's standard
    output.	 The client's gotten list is not affected.  If file is
    specified as a client file name, the client view is used to
    find the corresponding depot file.  The -q flag suppresses the
    initial line that displays the file name and revision.
    		    
    p4-opened
    C-x p o
    To display list of files opened for pending change, type C-x p o.
    
    Optional args [-a] [file ...] are passed as prefix arguments.
    
    Shows files currently opened for pending changes or indicates for the
    specified individual files whether they are currently opened.
    If no file names are given, all files open on the current client
    are listed.  The -a flag lists opened files in all clients.
    		    
    p4-notify
    C-x p n
    To notify a list of users of a change submission manually, type
    C-x p n.
    
    To do auto-notification, set the notification list with `p4-set-notify-list'
    and on each submission, the users in the list will be notified of the
    change.
    
    Since this uses the sendmail program, it is mandatory to set the correct
    path to the sendmail program in the variable `p4-sendmail-program'.
    
    Also, it is mandatory to set the user's email address in the variable
    `p4-user-email'.
    
    Argument USERS The users to notify to. The default value is the notification
    list.
    		    
    p4-rename
    C-x p m
    To rename a file in the depot, type C-x p m.
    
    Perforce does not support a single 'rename' command, but files can
    be renamed by branching one file into another and then deleting the
    original file.
    
    The 'from' and 'to' file arguments may include wildcards as long as
    they are matched.
    
    Integrating from files require read access to the files, but deleting
    them requires write access.
    
    For further information, see the help for the individual commands.
    		    
    p4-labelsync
    C-x p C-l
    		      To synchronize a label with the current client contents, type C-x p C-l.
    		    
    p4-labels
    C-x p L
    To display list of defined labels, type C-x p L.
    
    Reports the list of all labels currently known to the system.
    Labels takes no arguments.
    		    
    p4-label
    C-x p l
    Edit a P4-label specification using C-x p l.
    p4-jobs
    C-x p J
    To display list of jobs, type C-x p J.
    
    Optional args [ -e jobview -i -l -m max ] [ file[revRange] ... ] are passed
    as prefix arguments.
    
    Reports the list of all jobs currently known to the system.  If a
    file (pattern) is given, only fixes for changelists affecting that
    file (or set of files) are listed.  The file pattern may include
    wildcards and/or a revision number range.  See 'p4 help revisions'
    for help specifying revisions.
    
    The -e jobview limits the output to jobs satisfying the expression
    given as 'jobview'.  See 'p4 help jobview' for a description of
    jobview syntax.
    
    The -i flag also includes any fixes made by changelists integrated
    into the specified files.
    
    The -l flag produces long output with the full text of the job
    descriptions.
    
    The -m max flag limits the output to the first 'max' jobs,
    ordered by their job name.
    		    
    p4-job
    C-x p j
    To create or edit a job, type C-x p j.
    
    'p4 job' creates and edits job specifications using an ASCII form.
    A job is a defect, enhancement, or other unit of intended work.
    The 'p4 fix' command can associate changelists with jobs.
    
    With no arguments, 'p4 job' creates a blank job specification form
    and invokes the user's editor.  When the form is saved, a job name
    of the form jobNNNNNN is created.  If a jobName is given on the
    command line either that named job will be created or, if the job
    already exists, the job can be modified.
    
    As jobs are entered or updated, all fields are indexed for
    searching by 'p4 jobs'.  Text fields are broken into individual
    alphanumeric words (punctuation and whitespace are ignored) and
    each word is entered, case folded, into the word index.  Date
    fields are converted to an internal representation (seconds
    since 1970/01/01 00:00:00) and entered into the date index.
    
    The fields of a job are defined by the 'p4 jobspec' command.
    There is a simple default jobspec that is used if no explicit
    one has been defined.
    
    The -d flag deletes the named job and any associated fixes.
    
    The -o flag causes the named job specification to be written
    to the standard output.  The user's editor is not invoked.
    
    The -i flag causes a job specification to be read from the
    standard input.  The user's editor is not invoked.
    
    The -f flag allows otherwise read-only fields to be set.
    		    
    p4-integ
    C-x p I
    To schedule integrations between branches, type C-x p I.
    
    Optional args [-n -r] [-c change#] [file ...] are passed as prefix
    arguments.
    
    Integ determines what integrations are necessary between related files,
    according to the branch named and its view.  These integrations, represented
    by a list of revisions of branch source files which need to be merged into
    the related branch target file, are scheduled for later action.	 The actual
    merge and any necessary conflict resolution is performed using the resolve
    command.  The -n flag displays what integrations would be necessary but does
    not schedule them.  A branch name is required.
    
    If the -r flag is present, the mappings in the branch view are reversed,
    with the target files and source files exchanging place.
    
    If no file names are given then the entire branch view is examined for
    needed integrations.  Files that are not mapped in the client's view are
    ignored.  Files scheduled for integration are opened for the appropriate
    action in the default change.  If -c change# is given the files are opened
    in the numbered pending change.
    
    Argument BRANCH is the branch to integrate into.
    		    
    p4-info
    C-x p i
    To print out client/server information, type C-x p i.
    
    Info dumps out what the server knows about the client (the user
    name, the client name, and the client directory) and some server
    		    
    p4-have
    C-x p H
    To list revisions last gotten, type C-x p H.
    
    Optional args [file ...] are passed as prefix arguments.
    
    List revisions of named files that were last gotten from the depot.  If no
    file name is given list all files gotten on this client.
    		    
    p4-help
    C-x p h
    To print help message , type C-x p h.
    
    Print a help message about command.  If no command name is given print a
    general help message about Perforce and give a list of available client
    commands.
    
    Argument ARG command for which help is needed.
    		    
    p4-get
    C-x p G
    To synchronise the local view with the depot, type C-x p G.
    
    Optional args [-n] [file ...] can be passed as prefix arguments.
    
    Synchronize a client with its view for the files named, or for the entire
    client if no files named.  Get handles the case where files have been
    updated in the depot and need to be brought up-to-date on the client as well
    as the case when the view itself has changed.
    
    Depot files in the clients view not currently gotten on the client will be
    added.	Client files that were gotten from the depot but that are no longer
    in the clients view (or have been deleted in the depot) will be deleted from
    the client. Client files that are still in the client view but which have
    been updated in the depot are replaced by the needed revision from the
    depot.
    
    If file gives a revision specifier, then retrieve the revision so indicated.
    
    The client view is used to map client file names to depot file names and
    vice versa.
    
    If -n is given show what revisions would need to be gotten to synchronize
    the client with the view, but do not actually get the files.  If no files
    are named show the result for the entire client view.
    		    
    p4-get-client-name
    C-x p g
    To get the current value of the environment variable P4CLIENT,
    type C-x p g.
    
    This will be the current client that is in use for access through
    Emacs P4.
    		    
    p4-group
    
        group -- Change members of user group
    
        p4 group name
        p4 group -d name
        p4 group -o name
        p4 group -i
    
    	Create a new user group or add/delete members from an existing
    	group.  A group's members can be users and/or other groups.
    	The group specification form is put into a temporary file and
    	the editor (given by the environment variable $P4EDITOR) is invoked.
    
    	A group exists when it has any users or other groups in it, and
    	ceases to exist if all users and groups in it are removed.
    
    	Each group has MaxResults and MaxScanRows fields, which limit
    	the data size for operations that the users in that group can
    	perform.  For either field, 'unlimited' means no limit for that
    	group.  A individual user's limit is the highest of any group
    	with a limit to which he belongs, or unlimited if he belongs to
    	no group with a limit.  See 'p4 help maxresults' for more
    	information on MaxResults and MaxScanRows.
    
    	The -d flag deletes all users and groups from the named group, thus
    	deleting the whole group.
    
    	The -o flag causes the named group specification to be written
    	to the standard output.  The user's editor is not invoked.
    
    	The -i flag causes a group specification to be read from the
    	standard input.  The user's editor is not invoked.  The new
    	group specification entirely replaces the previous.
    
    	All commands that require access granted by 'p4 protect' consider
    	a user's groups when calculating access levels.  Groups are also
    	used to calculate a user's MaxResults and MaxScanRows.
    
    	'p4 group' requires 'super' access granted by 'p4 protect'.
    		    
    p4-groups
        groups -- List groups (of users)
    
        p4 groups [ user ]
    
    	Displays the list of all groups of users created by the
    	'p4 group' command.  If a user argument is given, only groups
    	with that user are displayed.
    		    
    p4-files
    C-x p F
    List files in the depot. Type, C-x p F.
    
    Optional args [file ...] are passed as prefix arguments.
    
    List files named or matching wild card specification.  Display shows depot
    file name, revision, file type, change action and change number of the
    current head revision.	If client file names are given as arguments the view
    mapping is used to list the corresponding depot files.
    		    
    p4-filelog
    C-x p f
    To view a history of the change made to the current file, type
    C-x p f.
    
    List the revision history of the files named, working backwards
    from the latest revision to the most recent revision 'added'.
    If file is given as a client file, the depot file last gotten is
    listed.	 The -l flag produces long output with the full text of the
    change descriptions.
    		    
    p4-depot-find-file
    C-x p C-f
    Typically perforce files are on the file system in a client view, but it
    is easy to find a perforce file by perforce paths like
    //depot/some/path/to/file using this command, since it autocomplete the
    server paths.
    		    
    p4-reopen
    C-x p E
    To change the type or changelist number of an opened file, type
    C-x p E.
    
    Reopen takes an already opened file and moves it to a new changelist
    or changes its type (text, ltext, xtext, binary, xbinary, ktext,
    kxtext, symlink, or resource).
    
    Argument SHOW-OUTPUT  displays the *P4 Output* buffer on executing the
    command if t.
    		    
    p4-edit
    C-x p e
    To open the current depot file for edit, type C-x p e.
    
    Open an existing file for edit.  The server notes that the current
    user on the current client has the file opened, and then changes
    the file permission from read-only to read/write.
    
    If -c changelist# is given, the file is put into the pending
    changelist; the changelist must have been previously created by
    'p4 change'.  Otherwise the file is opened in the 'default'
    (unnumbered) changelist.
    
    If -t type is given the file is explicitly opened as the specified
    file type.  See 'p4 help filetypes' for a complete list.  If no type
    is specified, the type of the previous revision is reused.
    
    Argument SHOW-OUTPUT  displays the *P4 Output* buffer on executing the
    command if t.
    		    
    p4-describe
    C-x p D
    To get a description for a change number, type C-x p D.
    
    Display a changelist description, including the changelist number,
    user, client, date of submission, textual description, list
    of affected files and diffs of files updated.  Pending changelists
    are flagged as 'pending' and the list of affected files and
    file diffs is not displayed.
    
    The -d<flag> passes a flag to the built-in diff routine to
    modify the output: -dn (RCS), -dc (context), -du (unified).
    
    The -s flag requests a shortened form of describe that doesn't
    include the diffs of files updated.
    		    
    p4-diff2
    C-x p d
    Display diff of two depot files.
    
    When visiting a depot file, type C-x p d and
    enter the versions.
    
    Example:  (find-file "/us/rv/tag/main/Construct")
    	  C-x p d 
    	  First Version to diff: 113
    	  Second Version to diff: 100
    
    	  Will produce the diff between the two versions in the
    	  output buffer *P4 Output*
    
    Run diff (on the server) of two files in the depot.  Both files
    may optionally include a revision specification; the default is
    to compare the head revision.  Wildcards may be used, but they
    must match between file1 and file2 and they must be escaped from
    the user's shell by quoting or with backslashes ().
    
    The -d flag allows you to pass flags to the underlying diff
    program.
    
    -dc passes the -c (context diff) flag.
    
    -du passes the -u (unified diff) flag.
    
    -dn passes the the -n (rcs diff) flag.
    
    Other diff flags are not supported.
    
    Argument VERSION1 First Version to use.
    Argument VERSION2 Second Version to use.
    		    
    p4-changes
    C-x p C
    To list changes, type C-x p C.
    
    Optional args [file ...] are passed as prefix arguments.
    
    List pending and submitted changes of named files.  If no file name is
    given list all changes affecting the current directory and below.
    		    
    p4-client
    C-x p c
    To edit a client specification , type C-x p c.
    
    With no argument client creates a new client view specification or
    edits an existing client specification. The client name is taken
    from the environment variable $P4CLIENT if set, or else from
    the current host name.	The specification form is put into a
    temporary file and the editor (given by the environment variable
    $EDITOR) is invoked.  If a name is given, the specification of
    the named client is displayed read-only.
    
    The specification form contains the following fields:
    
    Client:	     The client name (read only.)
    
    Date:	     The date specification was last modified (read only.)
    
    Description: A short description of the client (optional).
    
    Root:	     The root directory of the client file workspace
    	     (given in local file system syntax), under which all
    	     client files will be placed.  If you change this, you
    	     must physically relocate any files as well.
    
    View:	     What files you want to see from the depot and how
    	     they map to locations on the client.  The left hand
    	     side specifies a depot path, which must begin with
    	     //depot/.	The right hand side gives the corresponding
    	     client path, given in canonical Perforce file syntax.
    	     On expansion to an actual local client file name the
    	     initial //client/ is replaced by the Root value, given
    	     above.  You may use wildcards:
    
    		 ...		matches any characters including
    		 *		matches any character except /
    		 %1 to %9	like *, used to associate wild cards
    
    	     Wildcarding must be congruent in both the client and
    	     depot paths.  You may have any number of view entries.
    	     A new view takes effect on the next 'get'.
    
    Normally, new clients are created with a default view that maps
    all depot files onto the client.  The -t flag uses the view from
    the named template client as a default instead.
    
    The -d flag causes the named client to be deleted.
    
    The -o flag causes the named client specification to be written
    to the standard output.	 The user's editor is not invoked.
    
    The -i flag causes a client specification to be read from the
    standard input.	 The user's editor is not invoked.
    		    
    p4-branch
    C-x p B
    Edit a P4-BRANCH specification using C-x p B.
    p4-bug-report
    C-x p b
    To report a bug in the p4.el program.
    		    
    p4-add
    C-x p a
    To add the current file to the depot, type C-x p a.
    
    Optional arguments like '-tktext' can be passed as prefix arguments.
    
    Open a new file for adding to the depot.  If the file exists
    on the client it is read to determine if it is text or binary.
    If it does not exist it is assumed to be text.	The file must
    either not exist in the depot, or it must be deleted at the
    current head revision.	Files may be deleted and re-added arbitrarily.
    
    If the -c flag is given the open files are associated with the
    specified pending change number; otherwise the open files are
    associated with the current 'default' change.
    
    If file is already open it is moved into the specified pending
    change.	 It is not permissible to reopen a file for add unless
    it was already open for add.
    
    If -t type is given the file is explicitly opened as the specified
    file type, which may be text, ltext, xtext, binary, xbinary, ktext
    kxtext, symlink, or resource.  Not all types are supported on all
    operating systems.  See the Users' Guide for a description of file
    types.	If no type is specified, the type is determined automatically
    by examination of the file's contents and execution permission bits.
    		    

    Most p4.el commands display information in a specialized buffer. These buffers have special key mappings designed to help browsing the information and to run related p4.el commands. The keys defined by the "basic" key map are active in all p4.el buffers unless overridden by more specialized key maps. Many of the navigation key bindings are inspired by vi and less.

    p4.el Basic Key Map
    KeyMapping
    qQuit current buffer.
    kScroll down one line.
    jScroll up one line.
    b
    [backspace]
    Scroll down one window.
    spaceScroll up one window.
    <Move to the beginning of the buffer.
    >Move to the end of the buffer.
    =Delete other windows, making the current buffer as large as possible.
    [button2]
    [return]
    Activate the item at the cursor location. Different things happen depending on what is under the cursor. Clicking on a change number invokes p4-describe. Clicking on a file revision number invokes p4-print for that file revision. Clicking somewhere in a unified diff jumps to the corresponding file and location.
    [button3] Invoke p4-diff or p4-diff2 on the item under the cursor. Clicking on a depot file name invokes p4-diff on the corresponding file. Clicking on a file revision number in a filelog listing diffs that file revision against the head revision of the same file.

    The "filelog" key map is used for p4-filelog and p4-changes buffers. This key map overrides many of the keys defined in the basic key map. The intent is to make it easy to browse a set of change descriptions related to a filelog or a changes buffer.

    p4.el Filelog Key Map
    KeyMapping
    dInvoke p4-diff2.
    fOpen the corresponding file in another window. This key has no effect in p4-changes buffers.
    sSwitch to short format, ie hide the change description texts.
    lSwitch to long format, ie show the change description texts.
    kScroll other window down one line.
    jScroll other window up one line.
    b
    [backspace]
    Scroll other window down one window.
    [space]Scroll other window up one window.
    <Move to the beginning of the buffer in the other window.
    >Move to the end of the buffer in the other window.
    nMove cursor to next change.
    p
    N
    Move cursor to previous change.

    The "opened" key map is used for buffers displaying a list of depot file names, such as p4-opened and p4-files.

    p4.el Opened Key Map
    KeyMapping
    nMove to the next file name.
    p
    N
    Move to the previous file name.

    The "diff" key map is used for buffers that display diff output, such as p4-diff and p4-describe.

    p4.el Diff Key Map
    KeyMapping
    nMove to next file diff.
    p
    N
    Move to previous file diff.
    dMove to next diff hunk.
    uMove to previous diff hunk.

    The "blame" key map is used for the p4-print-with-rev-history buffer.

    p4.el Blame Key Map
    KeyMapping
    nMove to next "interesting" line.
    p
    N
    Move to previous "interesting" line.
    lToggle line wrap mode on/off.
  5. Hacking it

  6. To hack p4.el, copy it from /your/path/to/emacs/lisp or visit the p4.el home page.

  7. Updates/Misc.

  8. New release announcements and discussion of this program take place on the Lisp/Emacs mailing list; to join, send email to emacs-lisp-discuss-request@yahoogroups.com with an email body of "subscribe".

  9. Thanks

  10. The perforce-emacs integration team would like to thanks Chris Patti for documenting p4.el usage in this nice document!


SourceForge Logo
Last Updated: $Revision: 1.10 $ on $Date: 2004/06/11 19:24:13 $