How to use emacs? Also how to open existing emacs files with .cgi format?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to use emacs? Also how to open existing emacs files with .cgi format?
# 1  
Old 04-20-2013
Display How to use emacs? Also how to open existing emacs files with .cgi format?

Hi All,
I am new to this forum and a beginner in unix. Please correct me if I put the question in a wrong way..
How to use emacs editor? Also how to open existing emacs files with .cgi format?

I have the following link :-

http link i.e. url and path : /abc/xyz.dev/xyz/documents

What do I click to get there?

Also, have a couple of cgi scripts.. abc.cgi etc.. how do i open them and understand the scripts without making any changes to the script..

Any suggestions appreciated.

Thanks,
# 2  
Old 04-20-2013
If you don't know enough about emacs to even know how to start it, I would be very wary of editing a real file. You might get stuck, or damage it by mistake. Smilie Learn how to use the editor on some test files.

------------------

If you get past the learning stage, are you in a command window or using some kind of GUI? If a command window, how about:
Code:
cd /abc/xyz.dev/xyz/documents
emacs abc.cgi

Quote:
how to open existing emacs files with .cgi format
There is no such thing as an "emacs file", to my understanding. It is just a text file you are editing. Any text editor, including emacs, will edit the file. And there is no such thing as ".cgi format". If a cgi file is a text file, you can edit it. If it's a binary file, you will just see gobbledy-gook.
This User Gave Thanks to hanson44 For This Post:
# 3  
Old 04-20-2013
Thanks so much for your reply.

Since you meant damage Smilie .. Can you pls let me know dos and donts while i edit a file?
From your post i understand that in emacs editor- we edit text.. and it is just another editor in unix..

so given a unix path-
we type cd and - followed by that path mentioned /ab/c...docs

and then we type

2) emacs space and then name of file .cgi

correct me if i am wrong..

Once i open a .cgi file how do i understand the code??
# 4  
Old 04-20-2013
Yes, you are correct, the emacs editor just edits text, it's just another unix editor.

I should disclose that I do not normally use emacs. I use vi (vim). But there is nothing wrong with emacs. emacs works fine. But it's probably a good idea to pick one or other other (vi or emacs), really concentrate on it, get it into your fingers. There is a topic about "favorite editor" that seems to indicate a strong preference for vi, so just possibly it might be a good idea to consider learning vi instead:

https://www.unix.com/unix-dummies-que...ryone-use.html

Yes, you just type cd, space, path, and then press Enter key. And the same thing for the file: emacs, space, then abc.cgi or whatever the name is.

Do's and dont's are just to make sure you don't mess anything up. For example, even besides being very counter-intuitive for new users, vi is infamous because it's easy to press the CAPS-LOCK key by mistake, and then all the commands are totally different and extremely confusing. Once it's happened a few times, the user knows about it. But the first time, it can be pretty scary. Smilie

Quote:
Once i open a .cgi file how do i understand the code?
That is a very complicated topic. You probably know that the CGI program sits on the server. The CGI program can be written in a compiled language, bash, perl, python, etc. The CGI program reads data from the browser (using either POST or GET), and then sends data back to the browser (for example, sends a new web page). The only way you are going to understand the CGI code is start with something simple, and read a book about CGI. I should note that CGI is pretty complex, especially because it can be hard to troubleshoot, because there are multiple things going on (client, server, CGI program). CGI is very useful and important.
This User Gave Thanks to hanson44 For This Post:
# 5  
Old 04-20-2013
Ok awesome reply! Thanks so much for crisp and clear ans.. Your reply is really appreciated. SmilieSmilieSmilie
This User Gave Thanks to swathi123 For This Post:
# 6  
Old 04-20-2013
Thank you for the kind words! Smilie
# 7  
Old 04-21-2013
Also, can you suggest some good cgi ebooks?

---------- Post updated at 10:25 PM ---------- Previous update was at 10:09 PM ----------

How to get some test files for emacs.. where to download emacs and try out.. pls let me know..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Emacs on AIX 7.2

After I had successfully installed bash I wanted to install emacs. I downloaded the packages from IBM (emacs, emacs-nox, and emacs-X11), but I could not install emacs-X11. It needs libjpeg and libtiff, but I couldn't install both libs. Error messages: file /opt/freeware/64 from install of... (2 Replies)
Discussion started by: BuSchu
2 Replies

2. UNIX for Dummies Questions & Answers

characters in emacs

How do you change characters in emacs? for example, I would like my files to appear written in "Arial" or "Thaoma".. (1 Reply)
Discussion started by: vero_81
1 Replies

3. UNIX for Dummies Questions & Answers

Emacs

could someone please tell me how do I work emacs on unix?? how do you input the command and open up files and edit stuff. I know M-x info will lauch the info viewer, C-x u is undo, M-x spell-region run a spell check but when i use some of these command on emacs in Unix, I'm getting no results or... (1 Reply)
Discussion started by: starwind4
1 Replies

4. Solaris

emacs on solaris

Hello, Does anyone know where there is an nice step by step to install emacs? Or is ti just as easy as download, untar, run an install script sort of deal? (3 Replies)
Discussion started by: komputersman
3 Replies

5. Programming

How to configure emacs? Thank!

I am using emacs to write c++ code. How to configure it to let the system highlight C++ keywords, variables, etc; and let it automatically indent, just like a common C++ IDE does? Any suggestions? Thanks! (1 Reply)
Discussion started by: meili100
1 Replies

6. UNIX for Dummies Questions & Answers

Help on EMACS

Any one has a good documentation on How To Use EMACs editor?? Thanks Ven :eek: (4 Replies)
Discussion started by: VENC22
4 Replies

7. UNIX for Advanced & Expert Users

ftp in Emacs

Hi How can I do ftp using emacs. I strart the function by M-x ftp. It connects to the server where I can see the list of files. how can I do put or get there? Thanks SS (1 Reply)
Discussion started by: saurya_s
1 Replies

8. UNIX for Dummies Questions & Answers

how to learn emacs?

I have been teaching myself unix a little here and a little there. I would like to learn emacs, or an editor that I would get the most use out of. What is the most used editor in unix? (1 Reply)
Discussion started by: macnix
1 Replies

9. UNIX for Dummies Questions & Answers

eMacs FontFace

Hi, I am working with xEmacs 21.1 patch 14. I see I can configure it to be very User Friendly. I can highlight variables, color them, and actually make it look like a Visual IDE. How do I configure it? How do I color Variables in one color, and make them bold, and how do I change the... (1 Reply)
Discussion started by: sierra_aar
1 Replies

10. UNIX for Dummies Questions & Answers

Emacs Editor

hi i am using mandrake linux How do i run the emacs editor ? (5 Replies)
Discussion started by: srekcus
5 Replies
Login or Register to Ask a Question