No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
{{Script info |
{{Script info |
||
+ | |author=Jeremy Hankins <nowan at nowan dot org> |
||
− | |author= |
||
|version= |
|version= |
||
− | |license= |
+ | |license=GPL v2 |
|homepage= |
|homepage= |
||
}} |
}} |
Revision as of 22:04, 14 March 2009
Scripts quick access edit this |
Synopsis
Provides greater integration with emacs.
Description
This module is designed to allow greater integration between emacs and sawfish. Using emacs-eval
you can run emacs lisp, with emacs-edit
you can have emacs pop up a frame to edit a file, or (if it's already displayed) pop you to that window. It's meant to be fairly open-ended; have fun.
NOTE: This is designed to work with emacs version 23 (i.e., emacs-snapshot) because it uses the daemon-mode support which is new with emacs 23.
Installation
Just put it in your lisp directory and:
(require 'emacs)
Configuration
You may want to take a look at the emacs-path
, emacsclient-path
, and the emacs-check
variables to see if they should be adjusted. Then you're free to set up whatever key bindings or whatever that you wish. A few examples:
To start emacs with hyper-shift-t:
(define-command 'emacs (lambda () (emacs-run "t" 'frame))) (bind-keys global-keymap "H-T" 'emacs)
To have sawfish prompt for a file to edit with emacs on hitting hyper-f:
(define-command 'edit emacs-edit #:spec "FEdit file:") (bind-keys global-keymap "H-f" 'edit)
For a more complicated use of this script to start or switch to gnus, see the page on App.
Another option, if you have Prext, will prompt you with a list of emacs buffers to switch to:
(bind-keys global-keymap "H-F" '(prext-menu (emacs-buffers-menu) "Emacs buffer:"))