LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 12-15-2010, 01:16 PM   #16
jnojr
Member
 
Registered: Sep 2007
Location: San Diego, CA
Posts: 175

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by ntubski View Post
Emacs doesn't know about VBScript out of the box, so you will need to download to get that. See VisualBasicMode.
I'm back to working on this. I downloaded visual-basic-mode.el from that link to H:\emacs.d\ and have HOME=H: When I open a VBS file... no colors.

My .emacs file consists of:

(setq global-font-lock-mode t)
(setq font-lock-maximum-decoration t)

What am I missing?
 
Old 12-15-2010, 01:48 PM   #17
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,396

Rep: Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814
Code:
;; Installation instructions
;;  Put visual-basic-mode.el somewhere in your path, compile it, and add
;;  the following to your init file:

;;  (autoload 'visual-basic-mode "visual-basic-mode" "Visual Basic mode." t)
;;  (setq auto-mode-alist (append '(("\\.\\(frm\\|bas\\|cls\\)$" .
;;                                  visual-basic-mode)) auto-mode-alist))
Since you use .vbs as a suffix you'll want to do:
Code:
(autoload 'visual-basic-mode "visual-basic-mode" "Visual Basic mode." t)
(setq auto-mode-alist (append '(("\\.\\(frm\\|bas\\|cls\\|vbs\\)$"
                                . visual-basic-mode)) 
                              auto-mode-alist))
path refers to the load-path variable to which you should add H:\emacs.d like so:
Code:
(add-to-list 'load-path "~/.emacs.d")
 
Old 12-15-2010, 03:43 PM   #18
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Moved: This thread is more suitable in <GENERAL> as it is about Emacs on Windows, and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-16-2010, 07:04 AM   #19
jnojr
Member
 
Registered: Sep 2007
Location: San Diego, CA
Posts: 175

Original Poster
Rep: Reputation: 15
Still no go.

Quote:
;; Installation instructions
;; Put visual-basic-mode.el somewhere in your path, compile it, and add
;; the following to your init file:
Compile it??? I thought all of the emacs config was plain text. So I Google this, and find a couple of vague references to compiling "big" .el files because they take a long time to load. What is "big" or "too big"? I don't know. Is visual-basic-mode "too big"? I don't know. Why is something that's supposed to be "built in" to Emacs this long, cumbersome, drawn-out process that is only hinted at on weird web pages full of old, bad links and guesses? I don't know that either.
 
Old 12-16-2010, 09:12 AM   #20
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,396

Rep: Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814
Quote:
Still no go.
Need more info than that: please post your .emacs file. Also you said you downloaded to H:\emacs.d, but you actually meant H:\.emacs.d, right?


Quote:
Compile it??? I thought all of the emacs config was plain text.
Emacs config is Lisp code which can be represented by plain text.
Quote:
So I Google this, and find a couple of vague references to compiling "big" .el files because they take a long time to load. What is "big" or "too big"? I don't know. Is visual-basic-mode "too big"? I don't know.
You don't need to compile it, see CompiledFile for more info if you are interested.

Quote:
Why is something that's supposed to be "built in" to Emacs this long, cumbersome, drawn-out process that is only hinted at on weird web pages full of old, bad links and guesses? I don't know that either.
I imagine that Visual Basic isn't a language used by many Emacs users. Doesn't it come with its own IDE, being "visual" and all?
 
Old 12-16-2010, 09:30 AM   #21
jnojr
Member
 
Registered: Sep 2007
Location: San Diego, CA
Posts: 175

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ntubski View Post
Need more info than that: please post your .emacs file. Also you said you downloaded to H:\emacs.d, but you actually meant H:\.emacs.d, right?
Correct. H:\.emacs.d

My .emacs file:

;;(setq inhibit-startup-message t)

(setq global-font-lock-mode t)
(setq font-lock-maximum-decoration t)

(autoload 'visual-basic-mode "visual-basic-mode" "Visual Basic mode." t)
(setq auto-mode-alist (append '(("\\.\\(frm\\|bas\\|cls\\|vbs\\)$" .
visual-basic-mode)) auto-mode-alist))


Quote:
I imagine that Visual Basic isn't a language used by many Emacs users. Doesn't it come with its own IDE, being "visual" and all?
Well, there's at least one! :P

Part of why emacs was requested was as a replacement for another editor (UltraEdit?) that costs $$ The customer tries to keep the number of deployed apps down. And the individual who brought up the whole color coding thing probably wants to use one tool for as many things as possible.

I just replicated all of this on a standalone VM, so I took out the network, H: drive, etc. Just emacs, run it, use the .emacs and .emacs.d\ that it creates, copied in the above .emacs and copied in the visual-basic-mode.el... and it doesn't work. So it seems like there's a syntax issue, either in the .el file (maybe an incompatibility with the current version of emacs, since it looks like that file's been around for a while?) or maybe a typo or something in my .emacs file

BTW, thanks for all of your help with this, ntubski. I really appreciate it.
 
Old 12-16-2010, 10:04 AM   #22
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,396

Rep: Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814
Looks like you forgot
Code:
(add-to-list 'load-path "~/.emacs.d")
 
Old 12-16-2010, 10:37 AM   #23
jnojr
Member
 
Registered: Sep 2007
Location: San Diego, CA
Posts: 175

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ntubski View Post
Looks like you forgot
Code:
(add-to-list 'load-path "~/.emacs.d")
That did it!

I'm not sure why I would have to specify that, since .emacs.d/ is where Emacs is supposed to look for stuff by default (and it can find it to write the auto-save-list folder, but I'm certainly not going to argue with success!
 
Old 12-16-2010, 02:29 PM   #24
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,396

Rep: Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814
See Load Path.
 
  


Reply

Tags
emacs, visual basic


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vi or vim doesn't have color coding (highlighting) for c?? knockout_artist Linux - Newbie 4 02-06-2008 08:36 PM
Yast/You Color coding linda Suse/Novell 1 08-22-2005 06:07 PM
Emacs module for better perl coding rose_bud4201 Linux - Software 3 04-27-2005 02:39 PM
vim php color coding? Longinus Linux - Software 4 04-11-2004 05:56 AM
Shell and file/directory color coding? l0f33t Linux - General 9 08-07-2003 10:19 PM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration