POV-Ray : Newsgroups : povray.unix : povray mode for emacs update? Server Time
9 Dec 2021 07:58:37 EST (-0500)
  povray mode for emacs update? (Message 1 to 4 of 4)  
From: Jonathan Bush
Subject: povray mode for emacs update?
Date: 14 Oct 2021 09:30:00
Message: <web.61682f654008b668d80ced0afde6c206@news.povray.org>
In lieu of a GUI, some Linux users use Emacs to develop POVray code.

This is greatly facilitated by the povray mode for emacs, the latest version of
which is on Github: https://github.com/melmothx/pov-mode This is written in
emacs Lisp. The text gets color coded, automatic indenting, and general user
friendliness occurs. It even adds a POVray related menu for running the code at
various resolutions. This is effectively close to using a GUI.

This mode works well, even though the last change to this code was
5 years ago, when the keyword for was incorporated.

Unfortunately, another keyword, elseif, has not yet been similarly incorporated.

I posted an issue about this on the Github page a few days ago. It's entirely
possible, even likely, that the current author, melmothx, will respond
eventually. In the meantime I wonder if anyone here would be interested in
taking a look. Or perhaps you could provide a link about emacs Lisp.

Is there some other coding platform which works better for POVray on Linux?

Thanks for any clue.


Post a reply to this message

From: jr
Subject: Re: povray mode for emacs update?
Date: 14 Oct 2021 10:10:00
Message: <web.616839a5f99d6e745bd1b3ba6cde94f1@news.povray.org>
hi,

"Jonathan Bush" <djb### [at] gmxcom> wrote:
> In lieu of a GUI, some Linux users use Emacs to develop POVray code.
> ...
> Is there some other coding platform which works better for POVray on Linux?
>
> Thanks for any clue.

not sure about "better", but Vim does a good job syntax-highlighting etc.  Vim
will also use 'tags' files to aid navigation within a project, and I've written
a simple extension to the 'ctags' utility which allows it to parse *.{pov,inc}
files; see thread:
<https://news.povray.org/povray.binaries.utilities/thread/%3Cweb.5e0e133572d06ba48c662f470%40news.povray.org%3E/>


regards, jr.


Post a reply to this message

From: Harald Jörg
Subject: Re: povray mode for emacs update?
Date: 14 Oct 2021 12:57:22
Message: <87ee8ny26m.fsf@oook.m.uunet.de>
Jonathan Bush writes:

> In lieu of a GUI, some Linux users use Emacs to develop POVray code.

Guilty, your Honor.  I'm only a casual user of POV-Ray, but a regular
Emacs user (and more software engineer than artist).

> [...]

> This mode works well, even though the last change to this code was
> 5 years ago, when the keyword for was incorporated.
>
> Unfortunately, another keyword, elseif, has not yet been similarly incorporated.

I also found a the 'pavement' pattern and the 'albedo' keyword for
diffuse reflection not yet included in the keyword list - but I haven't
done a comprehensive check.  The "Keywords" section in the docs would
provide the relevant test cases, it contains many I've never used and
some I've never heard of.

> I posted an issue about this on the Github page a few days ago. It's entirely
> possible, even likely, that the current author, melmothx, will respond
> eventually. In the meantime I wonder if anyone here would be interested in
> taking a look. Or perhaps you could provide a link about emacs Lisp.

Adding keywords for highlighting isn't that difficult.  I found the
Emacs Lisp tutorial (comes with Emacs) helpful to get started.

If Marco (melmothx) doesn't reply within decent time, I could give it a
try and provide a pull request for his repository.
-- 
Cheers,
haj


Post a reply to this message

From: Jonathan Bush
Subject: Re: povray mode for emacs update?
Date: 15 Oct 2021 11:15:00
Message: <web.616999c2f99d6e74d80ced0afde6c206@news.povray.org>
=?utf-8?Q?Harald_J=C3=B6rg?= <haj### [at] posteode> wrote:
>
> I also found a the 'pavement' pattern and the 'albedo' keyword for
> diffuse reflection not yet included in the keyword list - but I haven't
> done a comprehensive check.  The "Keywords" section in the docs would
> provide the relevant test cases, it contains many I've never used and
> some I've never heard of.

Here is a passage with regards to elseif, taken from the changes list at
<http://www.povray.org/download/changes.txt>
------------------------------
Other SDL Changes/Enhancements
------------------------------

  Added #elseif statement; the #if, #ifdef and #ifndef directives syntax is
  changed as follows:

    IF_DIRECTIVE:
      #if ( Cond ) TOKENS... [ELSE_DIRECTIVE] #end
    IFDEF_DIRECTIVE:
      #ifdef ( IDENTIFIER ) TOKENS... [ELSE_DIRECTIVE] #end
    IFNDEF_DIRECTIVE:
      #ifndef ( IDENTIFIER ) TOKENS... [ELSE_DIRECTIVE] #end

    ELSE_DIRECTIVE:
      #else TOKENS... |
      #elseif ( Cond ) TOKENS... [ELSE_DIRECTIVE]

  Example:

    #if (Foo)
      #debug "Foo is true\n"
    #elseif (Bar)
      #debug "Foo is false, but Bar is true\n"
    #else
      #debug "Foo and Bar are both false\n"
    #end


> Adding keywords for highlighting isn't that difficult.  I found the
> Emacs Lisp tutorial (comes with Emacs) helpful to get started.
>
> If Marco (melmothx) doesn't reply within decent time, I could give it a
> try and provide a pull request for his repository.
> --
> Cheers,
> haj

I am grateful for your offer!


Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.