Allows to:
It is quite useful when one needs to quickly switch between different places in one or several buffers, typically when programming.
It is very light, as emacs provides something called "registers" which mainly does the work.
The file circul-keys-pc.el is an example of key assignation for circul.el, it makes use of the keypad on the right of a standard pc keyboard (I never use it). Modify it as you want, a good idea is to use f(1-10) keys instead.
Is inspired from other interactive programs ( Pcoq ). It allows to defines "holes" in your buffer. A hole is a piece of text (highlighted) that may be replaced by another part of text later. This feature is useful to build complicated expressions by copy pasting several peaces of text from different parts of a buffer (even from different buffers).
There is always one or zero active hole, highlighted with a different color.
To define a hole, two methods:To activate a hole, click on it with the button 1 of your mouse.
To forget a hole without deleting its text, click on it with the button 2(middle) of your mouse.
To destroy a hole and delete its text, click on it with the button 3 of your mouse.
To replace the active hole first make sure it is active, then two methods:
It is also useful in conjonction with abbreviations, for example in c-mode I use "f" as an abbreviation for for(#;#;#) {#}, where each # is a hole, then hitting meta-return goes from one hole to the following and I can fill-in each hole very quickly. This last trick needs some very simple manipulation on your abbrev file. Ask me by mail if you don't know how to do this. I may give my abbrev.el file as an example.
There are four files in this archive, three of them are used to deal with this f... Emacs/Xemacs incompatibility.
To use these two files, download them and put them (untar
holes.tgz with the command tar xvfz holes.tgz
, you
get a directory with four files) somewhere Xemacs can find
them. Then put this in you initialization file:
(require 'holes)
(require 'circul)
The files span.el, span-extent.el and span.el are from the ProofGeneral mode. Everything is under GPL. It should work on both FSF Emacs(21) and Xemacs. Ideas for improvement and bug reports are welcome.
(add-hook 'LaTeX-mode-hook '(lambda () (turn-on-reftex); Turn on RefTeX Minor Mode for all LaTeX files (define-key LaTeX-mode-map [(control f12)] 'TeX-next-error) (define-key LaTeX-mode-map [(control f11)] '(lambda () (interactive) (TeX-command-menu "LaTeX")))Now hit (control f11), it compiles, if there are some errors, type (control f12) and it goes straight to the error and shows the message.
(defun send-sig (process-string sig)
"sends sig to every process having name process-string"
(interactive)
(shell-command (concat "killall " sig " " process-string) nil))
(defun wait-latex-xdvi ()
"wait for the latex process to stop, and send the USR1 signal to all
running xdvi.bin processes, which makes xdvi watch the file it shows."
(if (TeX-active-process) (start-itimer "wait latex" 'wait-latex-xdvi 1)
(send-sig "xdvi.bin" "-USR1")))
(add-hook 'LaTeX-mode-hook '(lambda ()
(define-key LaTeX-mode-map [(control f11)]
'(lambda () (interactive)
(TeX-command-menu "LaTeX")
(start-itimer "wait latex" 'wait-latex-xdvi 1)))))