Assignment 5 - Emacs

Emacs (with a little UNIX thrown in)
Due by Midnight on May 24, 2001
24 Points
NO STAIR


Guidelines: The goal of this assignment is to start figuring out how to use Emacs. You MUST be proficient in Emacs if you continue to take Computer Science courses. Other courses will expect you to do your work in it. Whew!

First of all let me share with you that I don't expect you to be Emacs wizards when you finish this class. Personally, I create in Notepad and edit online with Emacs. Yes, I use Emacs everytime I update the website, but I didn't use it to create the site from scratch. Could I? You bet! But I don't so I don't expect you to either.

HOWEVER!!! You need to at least get a feel for this Emacs so do the best you can on the assignment below. For every correct answer, you get 1 point. And yes, you will be using some UNIX as well. To help you with the below assignment you can go to the Readings section and look under "Protocols" and "EMACS Help." All the information you need will be there.

Please complete the following exercise. Email the questions and the answers (beginning with #2) to blee@cs.iupui.edu. He will not grade attachments. Please place your information in the body of the email message. This will be very much like assignment #2 - the Power Web Search - in terms of writing down your answers and emailing them.

  1. Download the following file from the Internet: Female Gladiator's Grave Found which is called "glad.txt". FTP this file to your spot on the phoenix server.
  2. Make a copy of the "glad.txt" file. Call the copy "glad2.txt". Which UNIX command did you use to copy the file?
  3. Start the Emacs Editor. When Emacs is started, find (open) the file "glad.txt." Which command did you use to find (open) the file?
  4. Once "glad.txt" is open, move to the end of the document using keystrokes. Which keystrokes did you use to move to the end of the document?
  5. What does the Emacs window say in the minibuffer (at the bottom of the window) after issuing the keystroke from Question #4?
  6. Move to the beginning of the document using only kestrokes. Which Emacs command did you use to move to the beginning of the file?
  7. Using the Emacs search command, search for the word "curator." Which Emacs command did you use to search?
  8. What does the mini-buffer say after you completed the search?
  9. Change the word "curator" from lower-case to all upper case using only keystrokes. Which keystrokes did you use?
  10. Return to the beginning of the document. Do a query-replace for the word "gladiator." Replace the word "gladiator" with the word "bridesmaid." How many times did you replace the word "gladiator"? Which keystroke did you use to start and complete the query-replace?
  11. Save the changes that you've made. Which keystroke combination did you use to save changes?
  12. Using the search command, find the word "London." After finding "London," move the begnning of the line in which "London" is located. Which keystroke combination did you use to move to the beginning of the line?
  13. Now, move to the end of the line in which "London" is located. Which keystroke combination did you use to move to the end of the line?
  14. Move to the beginning of the current sentence. Which command did you use to move to the beginning of the sentence?
  15. Now let's move to the end of the current sentence. Which command did you use to move to the end of the sentence?
  16. Move to the beginning of the paragraph that begins "They fought to the death ... ." Mark the entire paragraph as a region. Which command did you use to mark the paragraph as a region?
  17. Kill (cut) the paragraph you marked in Question #16. Which command did you use to kill (cut) the paragraph?
  18. Yank (paste) the paragraph you killed (cut) in Question #17 in the same spot from which you originally killed it. Also, move to the beginning of the document and yank (paste) a second copy of the paragraph at the beginning. Which command did you use to yank (paste) the paragraph?
  19. While leaving the file "glad.txt" open, open (find) the file "glad2.txt" (the file you created in Step #2). Open the file in a second window. Once the second file is open, issue a keystroke to show the Buffer List. Which command did you use to show the Buffer List?
  20. Move back to the file "glad.txt" by choosing it from the Buffer List. How did you choose "glad.txt" from the Buffer List?
  21. Move from "glad.txt" to "glad2.txt" without using the Buffer List. How did you move to "glad2.txt"?
  22. Kill the current buffer ("glad2.txt"). How did you kill the current buffer?
  23. Move to the "glad.txt" window (if you are not already there). Save the file with a new name -- "glad3.txt." How did you issue the Write File ("Save As") command?
  24. Complete the Emacs tutorial using online help. How did you issue the command to start the tutorial?
  25. Exit Emacs. How did you issue the exit Emacs command?
Another NOTE: Please do not panic about this! Just do the readings and take the time you need. If you can't do it all then turn in what you have done. You will get 1 point for every correct answer. So see, you just can't lose.

Good luck! -Margaret


Special thanks to Leanne Burrow, Andy Harris, Bob Molnar, Paula Trefun, and Jennifer Stewart for their input, inspiration, content, code, lessons, and giving me the opportunity to boldly going where I have never gone before. Thanks! - Margaret Lion

Copyright © 2001 - Indiana University Purdue University - Indianapolis