Povray stuff

Hi all.

Update 2011-05-04:

It seems like Marco Pessotto has taken ownership (at least he did some heavy updating to get the mode running on more modern Emacsen) of the mode. Thank you Marco. The updated mode is available here: http://xahlee.org/3d/povray_emacs.html.

---

I have stopped used PoV-ray and emacs since several years, so if someone is willing to take over this project I'm willing to let him/her do so. I will not continue developing it and it would be a shame to see it vanish completely.

I am sorry for those who has sent me mail asking for assistance and not got any but life is taking to much of my time.

Regards Peter Toneby



pov-mode v2.10 for Emacs

Released Aug 29 2003

This mode has been updated to 3.1-standard by me, Peter Toneby.

Christoph Hormann has provided updates to 3.5, I've tried to retain as much of 3.1 compatibility as possible

Pov-mode does now have a nice configurationpage reachable from the options, use that to change most of the defaults. To change keybindings you need to change the .el-file.

See the .el-file for a changelog.

Here is a list of default keybindings.

KeycomboDescription
S-F1keywordhelp, looks in povuser.txt.
C-c C-cGive a command see list below.
M-tabExpand the current keyword.
C-c C-lShow the result of the render.
C-c iLoads a default includefile.
CommandDescription
RenderRender the image.
Test quality renderRender a test image.
Low quality renderRender a low quality image.
Medium quality renderMake a medium quality render.
High quality renderguess what this does!!!
Internal viewShow the image internally in emacs.
External viewSpawn an external image viewer.

Recommended .emacs changes

This has been tested with XEmacs 21.4 and with Emacs 21.2

All info here is also in the pov-mode.el file, which you can get here

The following two statements, placed in your .emacs file or site-init.el, will cause the PoV-mode to be loaded and invoked when visiting .pov and .inc files:

;; Where did you install the POV-mode? Change the path to whatever 
;; it's supposed to be
(setq load-path (cons "/home/peter/lib/emacs/" load-path))
;; Set autoloading of POV-mode for these file-types.
(autoload 'pov-mode "pov-mode.el" "PoVray scene file mode" t)
(setq auto-mode-alist
	(append '(("\\.pov$" . pov-mode) 
		  ("\\.inc$" . pov-mode)
                 ) auto-mode-alist))

Most of these elisp statements below should not be necessary anymore

Use this to turn on font-lock:
(add-hook 'pov-mode-hook 'turn-on-font-lock)
These variables can be set in your .emacs (defaults given):
(setq pov-indent-level '2)
(setq pov-autoindent-endblocks t)   ;; Automatically reindents else/end/break
(setq pov-indent-under-declare '2)  ;; Try it!  Tell me if you like it...
(setq pov-fontify-insanely t)       ;; When it's non-nil, we fontify *every*
                                    ;; Povray keyword.  Careful!
(setq pov-home-dir "/usr/local/lib/povray31/")  ;;Where the pov-helpfile is 
                                    ;; located
(setq pov-help-file "povuser.txt")  ;; What the helpfile is called

Possible Problems:

If you have problems with:

File mode specification error: (error "Variable binding depth exceeds max-specpdl-size")
Then you have to add something like:
(setq max-specpdl-size 1000)
Before the auto-mode-alist statement.
(Thanks Viktor Horvath for the info) This is a technique you can use for all max-*-size-type values if your emacs complains about it, just bump it up a notch.


Peter Toneby (woormie@acc.umu.se)