Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to use emacs? Also how to open existing emacs files with .cgi format? Post 302796811 by hanson44 on Saturday 20th of April 2013 09:50:41 PM
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:
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
CGI::Compile(3pm)					User Contributed Perl Documentation					 CGI::Compile(3pm)

NAME
CGI::Compile - Compile .cgi scripts to a code reference like ModPerl::Registry SYNOPSIS
use CGI::Compile; my $sub = CGI::Compile->compile("/path/to/script.cgi"); DESCRIPTION
CGI::Compile is an utility to compile CGI scripts into a code reference that can run many times on its own namespace, as long as the script is ready to run on a persistent environment. NOTE: for best results, load CGI::Compile before any modules used by your CGIs. RUN ON PSGI
Combined with CGI::Emulate::PSGI, your CGI script can be turned into a persistent PSGI application like: use CGI::Emulate::PSGI; use CGI::Compile; my $cgi_script = "/path/to/foo.cgi"; my $sub = CGI::Compile->compile($cgi_script); my $app = CGI::Emulate::PSGI->handler($sub); # $app is a PSGI application CAVEATS
If your CGI script has a subroutine that references the lexical scope variable outside the subroutine, you'll see warnings such as: Variable "$q" is not available at ... Variable "$counter" will not stay shared at ... This is due to the way this module compiles the whole script into a big "sub". To solve this, you have to update your code to pass around the lexical variables, or replace "my" with "our". See also <http://perl.apache.org/docs/1.0/guide/porting.html#The_First_Mystery> for more details. AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net> CONTRIBUTORS
Rafael Kitover <rkitover@cpan.org> Hans Dieter Pearcey <hdp@cpan.org> COPYRIGHT &; LICENSE Copyright (c) 2009 Tatsuhiko Miyagawa <miyagawa@bulknews.net> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
ModPerl::RegistryCooker CGI::Emulate::PSGI perl v5.14.2 2011-05-24 CGI::Compile(3pm)
All times are GMT -4. The time now is 11:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy