[REBOL] Re: Rebol and vim: (was lost the case ...)
From: nitsch-lists::netcologne::de at: 5-Nov-2003 19:31
Am Mittwoch, 5. November 2003 18:20 schrieb Tim Johnson:
> * Volker Nitsch <[nitsch-lists--netcologne--de]> [031105 07:13]:
> > Am Dienstag, 4. November 2003 03:17 schrieb Tim Johnson:
> > > Now, given that scenario, suppose I've got rebol imbedded in my
> > > editor (which is VIM), just as python is imbedded in vim.
> > > If that were that case, I could program rebol to automate
> > > the writing of "C".
> > >
> > > That would make for a remarkable plugin, and I'm sure that the vim
> > > developers and the vim community would work with RT to make that
> > > happen. that would be just awesome and give rebol that much more
> > > exposure.
> > >
> > > And BTW, I don't believe that RT would have to provide source code. Vim
> > > doesn't care about python binary source.
> > ===Rebol as emacs-plugin:
> > http://www.frozen-north-linuxonline.com/Howto/REBOL+Emacs.html
> > http://www.frozen-north-linuxonline.com/Howto/REBOL+RMAIL.html
> Hi Volker:
> Small World! That's an article that my partner and I
> published, written by Sterling Newton. :-).
Thanks for publishing :)
> > I guess vim can work similar.
> Sorry, I don't believe I made myself clear there. What Sterling
> writes about in that article is using 'plugins' *for* rebol.
> I'm talking about using rebol *as* a plugin.
> I have extensive plugins *for* rebol in vim, as do many others
> on this list. Those plugins are written in either native
> vim script or imbedded python..... read on:
I think you made yourself clear :)
Sterling describes in
http://www.frozen-north-linuxonline.com/Howto/REBOL+RMAIL.html how he uses
emacs + rebol to filter his email. thats not a tool to write rebol-scripts.
Its more like one would process python-scripts with rebol.
The differecence to vim+python: rebol works more like a cgi-script. my typical
use is: emacs stores file, calls rebol with filename to process and reads
file back. the rebol-script can do anything, even process python-source. The
interaction with emacs may not be as good as in elisp, but for preprocessing,
indexing and such quite ok.
> Your emacs code below is elisp script, and the elisp interpreter
> is imbedded 'inside' of emacs. Vim has the 'hooks' to actually
> compile the following interpreters:
> ruby, python, perl,tcl (at least)
> into the vim executable - just as elisp is in emacs. Therefore one
> can write an editor plugin in any language that has it's binary
> "inside of" vim, just as you have writen the elisp code below,
> which is processed by the elisp interpreter, which is imbedded
> in emacs.
> This is comparable to the apache 'language modes', which essentially
> do the same thing for the perl, python, php etc.
elisp is only the glue, keymapping, save file, call rebol, load file. rebol
could even general the glue *.el -files.
> One of the neat things about Vim (and it's developers), is that
> it is a very inclusive design that is conceived to closely interact
> with other systems and applications. (One of the gnu-est of the gnu
i guess cloesely interact would be more tricky. in emas there is a way to send
it elisp AFAIK, so rebol could control emacs remotely. but thats to high
level for my emacs-knowledge till now.
> Wouldn't it be cool if the 'emacs' (actually elisp) code could be
> written in rebol? I'd love it. For instance, yhere are extensive
> plugins 'for python' written 'in python' that turn vim into a
> full-fledge python IDE.
What means IDE? if its lots of buttons producing code, i prefer to do that in
rebol. fire it up from emacs, click the buttons, shut it down and emacs pops
up. have to learn more emacs to make it really comfortable, currently it
tells me all the time the file has changed and i shall enter "yes" for
reload, but basically it works. usually i don't switch to often, i complete
either a "lots of editing" job or "change and run" or a gui-thing. so the
occasional "yes" is not such a big problem.
> BTW: Volker, I'm really interested in learning to program rebol in
> emacs, perhaps someday I could prevail upon you to share some of your
> elisp plugins with me. I orginally wanted to learn emacs, but I
> frequently would ask questions of comp.emacs and often those questions
> would go unanswered
> - unlike this ML and the vim ML - which is why I went with vim.
I use emacs because of the elisp-rebol-similarity too. thanks again for
sterlings elisp-intro :) to me emas .rebol has its strong points on entering
snippets with /vid and writing forms for that and sending it through the web.
and copying files for more "real work" applications. emacs does this based
on a strong editor, doing everything with text. both can access the web well,
search and link.
Related to a current discussion, emacs has all the bells and whistles rebol
lacks. people complain its to complex. which i agree. i code in rebol. when i
lack bells or whistles there i switch to the emacs-maual. Study a bit and
find a way to do it nonwhistling in rebol and call it, usually ;)
> For instance, emacs can't distinguish my imbedded keypad, where
> vim and Xemacs can...... and no one can tell me why or how to fix
> it. :-(
Don't know that too. have you asked on the newsgroup mentioning "vim can!"?
eventually that helps? :)
> And rebol and lisp are quite similar.
> Good thread!
I agree :)
> > ===some of my beginners emacs-code.
> > it saves, calls a script, reads result and jumps to old position. in this
> > case it prettyprints the sourcecode with rebols own cleaner.:
> > (defun cleans () "clear rebol script"
> > (interactive)
> > (progn
> > (save-buffer)
> > (shell-command (concat"rebol -cs ~/xenv/cleans.r " (buffer-file-name
> > (current-buffer))))
> > (let((old (point)))
> > (find-alternate-file (buffer-file-name (current-buffer)))
> > (goto-char old)
> > )
> > ))
> > ===a rebol-script in the background:
> > this o(not presented) script uploads the file with ftp. or downloads.
> > or shows date and size and header of both. since its a shared ftp-site i
> > want to check before. all actions are on hotkeys, so its "c-x c-g c-u"
> > from emacs. (the c-u goes to the rebol-window ;)
> > (defun run-uni () "run rebol-buffer through emacs.r"
> > (interactive)
> > (progn
> > (save-buffer)
> > (shell-command
> > (concat rebol-binary " -s ~/xenv/uni.r emacs "
> > (buffer-file-name (current-buffer)) "&" ))
> > ;;(other-window 1)
> > (delete-other-windows)
> > ))
> > ===using emacs for the real editing from rebol (view 1.2.10 beta)
> > line: length? parse/all
> > copy/part d-area/text system/view/caret "^/"
> > set-browser-path "emacsclient"
> > browse probe join "+" [line " " a-file]
> > wait 1 quit
> > -Volker
> > --
> > To unsubscribe from this list, just send an email to
> > [rebol-request--rebol--com] with unsubscribe as the subject.