Cover page images (keyboard)

HW2 - Emacs Assignment

due on Sunday, 9/26 before 11:59 PM

Sue Evans


Hit the space bar for next slide

Emacs Assignment

In order to write Python programs in the linux environment, it's necessary to become proficient with a text editor. You'll be using a text editor for all of your homeworks and projects. As we said in the first lab, if you already know vi, you may continue to use it, but if you don't know it, we'd like you to learn emacs. UMBC is an emacs shop. Almost everyone here uses emacs or xemacs.

Both emacs and xemacs have GUIs when working in the lab, however, when working from home you'll have to use emacs with keystroke commands. The easiest way to learn these commands is to do the online emacs tutorial.

Your assignment is to go through the tutorial and then answer some questions about emacs. You should use emacs to edit your copy of the file called hw2questions.txt. Copy the file from my account into your hw2 directory. First change into your hw2 directory then type the following command :

         cp /afs/umbc.edu/users/b/o/bogar/pub/hw2questions.txt .

where the . (dot) at the end is an important part of the command meaning into this directory and with the same name as the source.

Steps for HW2

Step 1 - Run the emacs tutorial

In order to run the online tutorial, type emacs at the linux prompt. Then under the Help menu choose Emacs Tutorial. If you are working from home and a separate emacs window doesn't open up, type Alt-x help <Return> t (hold down the Alt key while typing x, let go and type the word help and <Return> then the letter t for tutorial).

You should complete the tutorial before proceeding to the next step.

Step 2 - Edit the hw2questions.txt file

Now that you've become familiar with emacs and have learned the commands, you should edit the hw2questions.txt file you previously copied into your hw2 directory. You should edit this file using emacs. Adequate space was left for your answers after each question in the original file.

You'll be submitting this editted file as your homework 2.

Submitting your work

When you've finished your homework, use the submit command to submit the file.

The submit command has four parts. The word submit, followed by the class, followed by the name of the project (note uppercase HW), followed by the name(s) of the file(s) to be submitted. You must be in the same directory as the files you are submitting for the submit command to work properly. The submit command does produce error messages if the command fails and confirmation if the command works properly.

After entering the submit command shown above, you should get a confirmation that submit worked correctly. Specifically, the confirmation will say:

Submitting hw2questions.txt...OK

If not, check your spelling and that you have included each of the required parts and try again.

You can check your submission by entering
submitls cs201 HW2
You should see the name of the file that you just submitted, in this case, hw2questions.txt.