Scripts quick access edit this

  • Author: Jeremy Hankins <nowan at nowan dot org>
  • License: GPL v2
  • Download: Emacs.jl (upload)

Synopsis[edit | edit source]

Provides greater integration with emacs.

Description[edit | edit source]

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[edit | edit source]

Just put it in your lisp directory and:

(require 'emacs)

Configuration[edit | edit source]

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:"))

There's also a emacs-call-info function which will open an emacs frame to browse the requested info document. So, for example, if you have this in your .sawfishrc:

(setq help-display-info-function emacs-call-info)

the help menu will give you access to the info documents via emacs.

See also[edit | edit source]

Community content is available under CC-BY-SA unless otherwise noted.