
If your system is supported by the keyring Python module, then
#Emacs commands password
P4-password-source and select “Fetch password from OS X Then in Emacs, customize the user setting Perforce user name ( P4USER) and “Where” is the Perforce server For each Perforce account, use KeychainĪccess to create an application password where the “Account” is the On OS X, p4.el can automatically fetch your Perforce passwordsįrom the login keychain. Password, but it can be configured to fetch your password from your

The user setting p4-password-source tells p4.el what to do You are prompted for a pending changelist number (with TABĬompletion) each time you open a file. You may wish to turn on the option p4-open-in-changelist, so that If your workflow makes heavy use of numbered pending changelists, then P4-modify-args-function #'modify-args-for-my-p4-wrapper) (setq p4-executable "/usr/bin/my-p4-wrapper" ForĮxample: (defun modify-args-for-my-p4-wrapper (args) The low-level p4-modify-args-function customization option. If you run Perforce through a wrapper script or want to modify theĬommand line arguments passed to p4 in some other way, you can use Key bindings, in case the default C-x p is unsuitable). PATH), and p4-global-key-prefix (the prefix for all Perforce Perforce client executable, in case it can’t be found on your Most important options are p4-executable (the location of the Type M-x customize-group RET p4 RET to see all the options. Submit the change (instead of saving it). Pending changelist (instead of submitting it) in the special case ofĪ change form, you can change your mind and type C-c C-s to Your mind and type C-c C-p to save the change description as a In the special case of a submit form, you can change When done, submit the form to the Perforce server by typingĬ-c C-c. Identify differences between the workspaceĬommands like submit and client open a form for editing inĮmacs. Move (rename) a file that’s open for edit. These are the most useful commands: Perforce commandĪnnotate each line with the revision it was (“Entities” includeīranches, pending changelists, clients, filespecs, groups, jobs, But C-u C-x p e * RET opens all files inĬommands that prompt you for a Perforce entity name provide TABĬompletion on the available entity names. For example C-x p e opens theĬurrent file for edit. But if they are given a prefix argument then you canĮnter any arguments to the command.

Is the file you’re visiting in the current buffer, if any the markedįile(s) in a Dired buffer, if any or the file on the current line inĪ Dired buffer. You can typeĬ-x p C-h to see a list of all key bindings (but not everyĬommands in p4.el operate on the “current” file by default - this P4.el provides an Emacs command for nearly all Perforce commands,Īnd they have the same name: for example the Perforce command p4Įdit corresponds to the Emacs command p4-edit. If you’ve customized p4-global-key-prefix, then Note: This section assumes that you are using the default key Strings for each command, you must byte-compile p4.el: $ emacs -Q -batch -f batch-byte-compile p4.el To compile the Perforce help text into the Emacs documentation

Prefer a different key prefix, then you should customize the setting (If, on the other hand, you are already familiar with the Emacs VC interface, and want to add Perforce as a VC backend, then you might look at Jonathan Kamens’ VC-P4.) InstallationĮnsure the directory containing p4.el is on your load-path: (add-to-list 'load-path "/full/path/to/dir/containing/p4.el")īy default, the P4 global key bindings start with C-x p.

It provides Emacs interfaces that map directly to Perforce commands, and so is most useful if you are already familiar with Perforce and want to access it from Emacs.
#Emacs commands software
P4.el integrates the Perforce software version management system into GNU Emacs.
