Richiesta revisione Emacs Tutorial

beatrice beatricet@libero.it
Dom 22 Gen 2012 16:23:48 CET


Ciao a tutti!

Ho aggiornato il tutorial di Emacs. Lo invio quindi per la revisione.

Per facilitare un po' il lavoro, ho messo inframezzati un pezzo
originale (citato) e la traduzione italiana. Se qualcuno volesse invece
revisionarlo tutto avendo i due file inglese e italiano distinti può
mandarmi un messaggio e io glieli invio.

Grazie!

beatrice


> Emacs tutorial.  See end for copying conditions.
> 
> Emacs commands generally involve the CONTROL key (sometimes labeled
> CTRL or CTL) or the META key (sometimes labeled EDIT or ALT).  Rather than
> write that in full each time, we'll use the following abbreviations:
> 
>  C-<chr>  means hold the CONTROL key while typing the character <chr>
> 	  Thus, C-f would be: hold the CONTROL key and type f.
>  M-<chr>  means hold the META or EDIT or ALT key down while typing <chr>.
> 	  If there is no META, EDIT or ALT key, instead press and release the
> 	  ESC key and then type <chr>.  We write <ESC> for the ESC key.

Esercitazione di Emacs. Condizioni d'uso alla fine del file.

I comandi di Emacs comportano generalmente l'uso del tasto CONTROL (a
volte indicato con CTRL o CTL) o del tasto META (a volte indicato con EDIT
o ALT). Piuttosto che indicarli per esteso ogni volta, verranno usate le
seguenti abbreviazioni:

 C-<car>  significa che bisogna tenere abbassato il tasto CONTROL mentre si
          preme il carattere <car>. Quindi C-f significa: tenere premuto
          CONTROL e battere f.

 M-<car>  significa che bisogna tenere abbassato il tasto META o EDIT o ALT
          mentre si preme il carattere <car>. Se non ci sono tasti META,
          EDIT o ALT, al loro posto si può premere e poi rilasciare il
          tasto ESC e quindi premere <car>. Verrà usato <ESC> per indicare il
          tasto ESC.

> Important note: to end the Emacs session, type C-x C-c.  (Two characters.)
> To quit a partially entered command, type C-g.
> The characters ">>" at the left margin indicate directions for you to
> try using a command.  For instance:
> <<Blank lines inserted around following line by help-with-tutorial>>
> [Middle of page left blank for didactic purposes.   Text continues below]
> >>  Now type C-v (View next screen) to move to the next screen.
> 	(go ahead, do it by holding down the CONTROL key while typing v).
> 	From now on, you should do this again whenever you finish
> 	reading the screen.
> 

Nota importante: per chiudere una sessione di Emacs usare C-x
C-c. (Due caratteri.)
Per abortire un comando parzialmente inserito, usare C-g.
I caratteri ">>" posti al margine sinistro indicano istruzioni per
provare a usare un comando. Per esempio:
<<Blank lines inserted here by startup of help-with-tutorial>>
>> Ora premere C-v (Visualizza schermata successiva) per spostarsi alla
   prossima schermata. (Farlo, tenere premuto il tasto CONTROL mentre si
   preme v). D'ora in poi dovrai fare nuovamente così ogni volta
   che finisci di leggere lo schermata.

> Note that there is an overlap of two lines when you move from screen
> to screen; this provides some continuity so you can continue reading
> the text.
> 
> The first thing that you need to know is how to move around from place
> to place in the text.  You already know how to move forward one screen,
> with C-v.  To move backwards one screen, type M-v (hold down the META key
> and type v, or type <ESC>v if you do not have a META, EDIT, or ALT key).
> 
> >>  Try typing M-v and then C-v, a few times.
> 

Si noti che le ultime due righe di ogni schermata appaiono in cima alla
schermata successiva; questo favorisce la continuità di lettura.

La prima cosa che bisogna imparare è come spostarso da un punto
all'altro del testo. Si è già imparato come andare avanti di una
schermata, con C-v. Per andare indietro di una schermata, premere M-v
(tenere premuto il tasto META e poi premere v, oppure usare <ESC>v se
non c'è un tasto META, EDIT o ALT).

>> Provare a premere M-v e quindi C-v alcune volte.

> * SUMMARY
> ---------
> 
> The following commands are useful for viewing screenfuls:
> 
> 	C-v	Move forward one screenful
> 	M-v	Move backward one screenful
> 	C-l	Clear screen and redisplay all the text,
> 		 moving the text around the cursor
> 		 to the center of the screen.
> 		 (That's CONTROL-L, not CONTROL-1.)
> 

* SOMMARIO
----------

I comandi seguenti sono utili per visualizzare le varie schermate:

    C-v    Sposta avanti di una schermata
    M-v    Sposta indietro di una schermata
    C-l    Cancella lo schermo e rivisualizza tutto il testo, muovendo
           il testo che si trova vicino al cursore al centro dello
           schermo. (Il comando è CONTROL-L, non CONTROL-1.)

> >> Find the cursor, and note what text is near it.  Then type C-l.
>    Find the cursor again and notice that the same text is still near
>    the cursor, but now it is in the center of the screen.
>    If you press C-l again, this piece of text will move to the top of
>    the screen.  Press C-l again, and it moves to the bottom.
> 
> You can also use the PageUp and PageDn keys to move by screenfuls, if
> your terminal has them, but you can edit more efficiently if you use
> C-v and M-v.

>> Trovare il cursore, osservare quale parte di testo gli è vicina. Premere
   quindi C-l. Trovare di nuovo il cursore e osservare che ha sempre lo
   stesso testo vicino, ma ora è posizionato al centro dello schermo.
   Se si preme C-l un'altra volta, questo stesso pezzo di testo si muove
   in cima allo schermo. Premere C-l una volta ancora e il testo si
   sposta in fondo allo schermo.

Per spostarsi di una schermata alla volta si possono anche usare i tasti
PagSu e PagGiù, se sono presenti, ma l'uso di C-v e M-v rende più
efficiente il lavoro.

> * BASIC CURSOR CONTROL
> ----------------------
> 
> Moving from screenful to screenful is useful, but how do you
> move to a specific place within the text on the screen?
> 
> There are several ways you can do this.  You can use the arrow keys,
> but it's more efficient to keep your hands in the standard position
> and use the commands C-p, C-b, C-f, and C-n.  These characters
> are equivalent to the four arrow keys, like this:

* CONTROLLO DI BASE DEL CURSORE
-------------------------------

Spostarsi da una schermata all'altra è utile, ma come ci si può spostare
ad un punto preciso all'interno del testo sullo schermo?

Ci sono diversi modi per farlo. Si possono usare i tasti freccia, ma è
più efficiente mantenere le mani nella posizione standard e usare i
comandi C-p, C-b, C-f e C-n. Questi comandi corrispondono ai quattro
tasti freccia, in questo modo:

> 			  Previous line, C-p
> 				  :
> 				  :
>    Backward, C-b .... Current cursor position .... Forward, C-f
> 				  :
> 				  :
> 			    Next line, C-n
> 
> >> Move the cursor to the line in the middle of that diagram
>    using C-n or C-p.  Then type C-l to see the whole diagram
>    centered in the screen.

                           Riga precedente, C-p
                                    :
                                    :
      Indietro, C-b .... Posizione attuale cursore .... Avanti, C-f
                                    :
                                    :
			   Riga successiva, C-n

>> Spostare il cursore sulla riga centrale del diagramma qui sopra usando
   C-n o C-p. Poi usare C-l vedere l'intero diagramma al centro dello
   schermo.

> You'll find it easy to remember these letters by words they stand for:
> P for previous, N for next, B for backward and F for forward.  You
> will be using these basic cursor positioning commands all the time.
> 
> >> Do a few C-n's to bring the cursor down to this line.
> 
> >> Move into the line with C-f's and then up with C-p's.
>    See what C-p does when the cursor is in the middle of the line.

Può essere utile per ricordare queste lettere pensare alle parole
inglesi che rappresentano: P per precedente (previous), N per successivo
(next), B per indietro (backward) e F per avanti (forward). Questi sono
i comandi elementari per posizionare il cursore che vengono usati in
continuazione.

>> Usare alcuni C-n per portare il cursore in baso fino a questa riga.

>> Muovere il cursore all'interno della riga con C-f e poi in alto con
   C-p. Osservare l'effetto di un C-p quando il cursore si trova in
   mezzo ad una riga.

> Each line of text ends with a Newline character, which serves to
> separate it from the following line.  (Normally, the last line in
> a file will have a Newline at the end, but Emacs does not require it.)
> 
> >> Try to C-b at the beginning of a line.  It should move to
>    the end of the previous line.  This is because it moves back
>    across the Newline character.

Ogni riga di testo termina con un carattere Newline (nuova riga), che
serve a separarla dalla successiva. (Normalmente, l'ultima riga di un
file termina con un carattere Newline, ma Emacs non lo richiede.)

>> Provare a usare C-b all'inizio di una riga. Il cursore viene spostato
   alla fine della precedente. Questo avviene perché il cursore si
   sposta all'indietro attraverso il carattere Newline.

> C-f can move across a Newline just like C-b.
> 
> >> Do a few more C-b's, so you get a feel for where the cursor is.
>    Then do C-f's to return to the end of the line.
>    Then do one more C-f to move to the following line.

C-f può spostare attravero il carattere Newline proprio come C-b.

>> Premere alcune volte ancora C-b, per vedere dove si trova il
   cursore.
   Poi usare C-f più volte per tornare alla fine della riga.
   Usare quindi C-f una volta ancora per andare alla riga successiva.

> When you move past the top or bottom of the screen, the text beyond
> the edge shifts onto the screen.  This is called "scrolling".  It
> enables Emacs to move the cursor to the specified place in the text
> without moving it off the screen.
> 
> >> Try to move the cursor off the bottom of the screen with C-n, and
>    see what happens.

Quando ci si sposta oltre l'inizio o la fine della schermata, il testo che
si trova oltre si sposta sullo schermo. Questo è chiamato
"scorrimento". Permette a Emacs di posizionare il cursore sulla parte di
testo desiderata senza portarlo fuori dallo schermo.

>> Provare a spostare il cursore oltre la fine dello schermo con C-n e
   osservare cosa succede.

> If moving by characters is too slow, you can move by words.  M-f
> (META-f) moves forward a word and M-b moves back a word.
> 
> >> Type a few M-f's and M-b's.
> 
> When you are in the middle of a word, M-f moves to the end of the word.
> When you are in whitespace between words, M-f moves to the end of the
> following word.  M-b works likewise in the opposite direction.

Se spostarsi di un carattere alla volta è troppo lento, allora ci si può
spostare di una parola alla volta. M-f (META-f) sposta avanti di una
parola e M-b sposta indietro di una parola.

>> Provare alcune volte M-f e M-b.

Quando il cursore è a metà di una parola, M-f lo sposta alla fine della
stessa. Quando è sullo spazio bianco tra due parole, M-f lo sposta alla
fine della parola successiva. M-b funziona in modo simile ma in direzione
opposta.

> >> Type M-f and M-b a few times, interspersed with C-f's and C-b's
>    so that you can observe the action of M-f and M-b from various
>    places inside and between words.
> 
> Notice the parallel between C-f and C-b on the one hand, and M-f and
> M-b on the other hand.  Very often Meta characters are used for
> operations related to the units defined by language (words, sentences,
> paragraphs), while Control characters operate on basic units that are
> independent of what you are editing (characters, lines, etc).

>> Provare M-f e M-b alcune volte, alternandoli con C-f e C-b così da
   poter osservare l'azione di M-f e M-b da vari punti all'interno delle
   parole e tra di esse.

Notare il parallelismo tra C-f e C-b da una parte e M-f e M-b dall'altra.
Molto spesso i caratteri con Meta sono usati per operazioni relative alle
unità definite dal linguaggio (parole, frasi, paragrafi), mentre i
caratteri con Control operano su unità base indipendenti da ciò che si
scrive (caratteri, righe, ecc.).

> This parallel applies between lines and sentences: C-a and C-e move to
> the beginning or end of a line, and M-a and M-e move to the beginning
> or end of a sentence.
> 
> >> Try a couple of C-a's, and then a couple of C-e's.
>    Try a couple of M-a's, and then a couple of M-e's.

Questo parallelismo funziona anche tra righe e frasi: C-a e C-e spostano
all'inizio o alla fine di una riga, e M-a e M-e all'inizio o alla fine di
una frase.

>> Provare un paio di C-a e poi un paio di C-e.
   Provare un paio di M-a e poi un paio di M-e.

> See how repeated C-a's do nothing, but repeated M-a's keep moving one
> more sentence.  Although these are not quite analogous, each one seems
> natural.
> 
> The location of the cursor in the text is also called "point".  To
> paraphrase, the cursor shows on the screen where point is located in
> the text.

Osservare come C-a ripetuti non abbiano effetto, mentre M-a ripetuti
continuino a spostare il cursore di una frase. Sebbene questi
comportamenti non siano perfettamente analoghi, ognuno di essi sembra
quello naturale.

La posizione del cursore nel testo è anche chiamata
"punto". Parafrasando, il cursore mostra sullo schermo dove si trova il
punto nel testo.

> Here is a summary of simple cursor-moving operations, including the
> word and sentence moving commands:
> 
> 	C-f	Move forward a character
> 	C-b	Move backward a character
> 
> 	M-f	Move forward a word
> 	M-b	Move backward a word
> 
> 	C-n	Move to next line
> 	C-p	Move to previous line
> 
> 	C-a	Move to beginning of line
> 	C-e	Move to end of line
> 
> 	M-a	Move back to beginning of sentence
> 	M-e	Move forward to end of sentence

Ecco un sommario delle più semplici operazioni di spostamento del cursore,
compresi i comandi di spostamento di parola in parola o di frase in frase:

    C-f    Sposta avanti di un carattere
    C-b    Sposta indietro di un carattere

    M-f    Sposta avanti di una parola
    M-b    Sposta indietro di una parola

    C-n    Sposta alla riga successiva
    C-p    Sposta alla riga precedente

    C-a    Sposta all'inizio della riga
    C-e    Sposta alla fine della riga

    M-a    Sposta all'inizio della frase
    M-e    Sposta alla fine della frase

> >> Try all of these commands now a few times for practice.
>    These are the most often used commands.
> 
> Two other important cursor motion commands are M-< (META Less-than),
> which moves to the beginning of the whole text, and M-> (META
> Greater-than), which moves to the end of the whole text.

>> Provare adesso tutti questi comandi alcune volte per fare pratica.
   Questi sono i comandi usati più spesso.

Altri due importanti comandi di spostamento del cursore sono M-< (META
Minore-di), che sposta all'inizio dell'intero testo, e M-> (META
Maggiore-di), che sposta alla fine dell'intero testo.

> On most terminals, the "<" is above the comma, so you must use the
> shift key to type it.  On these terminals you must use the shift key
> to type M-< also; without the shift key, you would be typing M-comma.
> 
> >> Try M-< now, to move to the beginning of the tutorial.
>    Then use C-v repeatedly to move back here.
> 
> >> Try M-> now, to move to the end of the tutorial.
>    Then use M-v repeatedly to move back here.

Su molte tastiere il carattere ">" si raggiunge premendo il tasto
MAIUSC.  Su queste tastiere bisogna usare il tasto MAIUSC anche per
usare M->; senza il tasto MAIUSC non si ottiene il risultato voluto.

>> Provare adesso M-< per andare all'inizio del tutorial.
   Quindi usare C-v ripetutamente per tornare a questo punto.

>> Provare adesso M-> per andare alla fine del tutorial.
   Quindi usare M-v ripetutamente per tornare a questo punto.

> You can also move the cursor with the arrow keys, if your terminal has
> arrow keys.  We recommend learning C-b, C-f, C-n and C-p for three
> reasons.  First, they work on all kinds of terminals.  Second, once
> you gain practice at using Emacs, you will find that typing these Control
> characters is faster than typing the arrow keys (because you do not
> have to move your hands away from touch-typing position).  Third, once
> you form the habit of using these Control character commands, you can
> easily learn to use other advanced cursor motion commands as well.

Il cursore può anche essere spostato con i tasti freccia, se il
terminale li ha. Viene raccomandato di imparare C-b, C-f, C-n e C-p per
tre motivi: primo, funzionano su tutti i tipi di terminale; secondo, una
volta acquisita pratica nell'uso di Emacs, ci si accorgerà che usare
questi caratteri con Control è più rapido che usare i tasti freccia
(perché non bisogna spostare le mani dalla posizione di scrittura sulla
tastiera); terzo, una volta acquisita l'abitudine di usare questi
comandi con Control, si può facilmente imparare ad usare anche altri
comandi avanzati di spostamento del cursore.

> Most Emacs commands accept a numeric argument; for most commands, this
> serves as a repeat-count.  The way you give a command a repeat count
> is by typing C-u and then the digits before you type the command.  If
> you have a META (or EDIT or ALT) key, there is another, alternative way
> to enter a numeric argument: type the digits while holding down the
> META key.  We recommend learning the C-u method because it works on
> any terminal.  The numeric argument is also called a "prefix argument",
> because you type the argument before the command it applies to.

La maggior parte dei comandi di Emacs accetta un argomento numerico;
nella maggior parte dei casi, questo serve come conteggio delle
ripetizioni. Il modo in cui si può fornire ad un comando il numero di
ripetizioni è il seguente: si digita C-u e quindi le cifre prima di
digitare il comando stesso. Se esiste un tasto META (o EDIT o ALT) c'è
un modo alternativo: si digitano le cifre tenendo premuto il tasto META.
È raccomandato imparare il metodo con C-u perché funziona su tutti i
terminali. L'argomento numerico è anche chiamato "argomento prefisso",
perché viene indicato prima del comando a cui si riferisce.

> For instance, C-u 8 C-f moves forward eight characters.
> 
> >> Try using C-n or C-p with a numeric argument, to move the cursor
>    to a line near this one with just one command.

Per esempio, C-u 8 C-f sposta il cursore in avanti di otto caratteri.

>> Provare ad usare C-n, o C-p, con un argomento numerico per spostare il
   cursore su una riga vicina a questa con un solo comando.

> Most commands use the numeric argument as a repeat count, but some
> commands use it in some other way.  Several commands (but none of
> those you have learned so far) use it as a flag--the presence of a
> prefix argument, regardless of its value, makes the command do
> something different.
> 
> C-v and M-v are another kind of exception.  When given an argument,
> they scroll the screen up or down by that many lines, rather than by a
> screenful.  For example, C-u 8 C-v scrolls the screen by 8 lines.

La maggior parte dei comandi usa l'argomento numerico come numero delle
ripetizioni da effettuare, tuttavia alcuni lo usano in modo diverso.
Svariati comandi (ma nessuno di quelli imparati fino ad ora) lo usano come
opzione: la presenza di un argomento prefisso, indipendentemente dal suo
valore, fa sì che il comando faccia qualcosa di diverso.

C-v e M-v sono un altro tipo di eccezione. Quando gli si fornisce un
argomento spostano l'area di testo visualizzato in alto o in basso del
numero di righe indicato invece che di una schermata. Per esempio, C-u 8
C-v fa scorrere lo schermo di 8 righe.

> >> Try typing C-u 8 C-v now.
> 
> This should have scrolled the screen up by 8 lines.  If you would like
> to scroll it down again, you can give an argument to M-v.
> 
> If you are using a graphical display, such as X or MS-Windows, there
> should be a tall rectangular area called a scroll bar on one side of
> the Emacs window.  You can scroll the text by clicking the mouse in
> the scroll bar.
> 
> If your mouse has a wheel button, you can also use this to scroll.

>> Ora provare ad usare C-u 8 C-v.

La schermata si è spostata di 8 righe verso l'alto. Se si desidera farla
scorrere di nuovo in basso, si può fornire un argomento numerico a M-v.

Quando si usa un sistema grafico, come X o MS-Windows, ci dovrebbe
essere un'area rettangolare allungata chiamata barra di scorrimento a un
lato della finestra di Emacs. Si può far scorrere il testo con un clic
del mouse nella barra di scorrimento.

Se il mouse ha una rotella, è possibile anche usare quella per scorrere
il testo.

> * IF EMACS STOPS RESPONDING
> ---------------------------
> 
> If Emacs stops responding to your commands, you can stop it safely by
> typing C-g.  You can use C-g to stop a command which is taking too
> long to execute.
> 
> You can also use C-g to discard a numeric argument or the beginning of
> a command that you do not want to finish.

* SE EMACS NON RISPONDE PIÙ
---------------------------

Se Emacs smette di rispondere ai comandi può essere fermato in modo sicuro
premendo C-g. Si può usare C-g per fermare un comando che sta impiegando
troppo tempo per l'esecuzione.

Si può anche usare C-g per annullare un argomento numerico o l'inizio di
un comando che non si vuole più portare a termine.

> >> Type C-u 100 to make a numeric argument of 100, then type C-g.
>    Now type C-f.  It should move just one character, because you
>    canceled the argument with C-g.
> 
> If you have typed an <ESC> by mistake, you can get rid of it with a
>    C-g.

>> Digitare C-u 100 per indicare un argomento numerico di 100, quindi premere
   C-g. Ora premere C-f. Il cursore si sposta in avanti di un solo
   carattere perché l'argomento numerico è stato annullato con C-g.

Se si preme <ESC> per errore, lo si può annullare con C-g.

> * DISABLED COMMANDS
> -------------------
> 
> Some Emacs commands are "disabled" so that beginning users cannot use
> them by accident.
> 
> If you type one of the disabled commands, Emacs displays a message
> saying what the command was, and asking you whether you want to go
> ahead and execute the command.

* COMANDI DISATTIVATI
---------------------

Alcuni comandi di Emacs sono "disattivati", così da evitare che utenti
principianti possano usarli per errore.

Se si inserisce uno dei comandi disattivati Emacs mostra un messaggio in
cui viene indicato il comando e viene chiesto se davvero si desidera
procedere con l'esecuzione.

> If you really want to try the command, type <SPC> (the Space bar) in
> answer to the question.  Normally, if you do not want to execute the
> disabled command, answer the question with "n".
> 
> >> Type C-x C-l (which is a disabled command),
>    then type n to answer the question.

Se effettivamente si vuole provare il comando, premere <SPC> (la barra
spaziatrice) come risposta a questa domanda. Normalmente, se non si vuole
eseguire il comando disattivato, bisogna rispondere alla domanda con "n".

>> Digitare C-x C-l (che è un comando disattivato), 
   poi rispondere con "n" alla domanda.

> * WINDOWS
> ---------
> 
> Emacs can have several "windows", each displaying its own text.  We
> will explain later on how to use multiple windows.  Right now we want
> to explain how to get rid of extra windows and go back to basic
> one-window editing.  It is simple:
> 
> 	C-x 1	One window (i.e., kill all other windows).

* FINESTRE
----------

Emacs può avere diverse "finestre", ognuna contenente il proprio testo.
Verrà spiegato in seguito come usare finestre multiple. Per adesso verrà
spiegato come disfarsi delle finestre in più e tornare alla scrittura
con una sola finestra. È semplice:

    C-x 1    Una finestra (cioè, elimina tutte le altre finestre).

> That is CONTROL-x followed by the digit 1.  C-x 1 expands the window
> which contains the cursor, to occupy the full screen.  It deletes all
> other windows.
> 
> >> Move the cursor to this line and type C-u 0 C-l.
> >> Type C-h k C-f.
>    See how this window shrinks, while a new one appears
>    to display documentation on the C-f command.

È un CONTROL-x seguito dalla cifra 1. C-x 1 espande la finestra che
continene il cursore su tutto lo schermo ed elimina tutte le altre
finestre.

>> Spostare il cursore su questa riga e digitare C-u 0 C-l.
>> Digitare C-h k C-f.
   Osservare come questa finestra viene rimpicciolita mentre ne appare
   un'altra che contiene la documentazione del comando C-f.

> >> Type C-x 1 and see the documentation listing window disappear.
> 
> This command is unlike the other commands you have learned in that it
> consists of two characters.  It starts with the character CONTROL-x.
> There is a whole series of commands that start with CONTROL-x; many of
> them have to do with windows, files, buffers, and related things.
> These commands are two, three or four characters long.

>> Digitare C-x 1 e vedere come la finestra contenente la documentazione
   scompare.

Questo comando è diverso da tutti quelli imparati finora perché contiene
due caratteri. Inizia con il carattere CONTROL-x. C'è un'ampia serie di
comandi che iniziano con CONTROL-x; molti di essi riguardano finestre,
file, buffer e cose simili. Questi comandi sono lunghi due, tre o
quattro caratteri.

> * INSERTING AND DELETING
> ------------------------
> 
> If you want to insert text, just type the text.  Ordinary characters,
> like A, 7, *, etc., are inserted as you type them.  To insert a
> Newline character, type <Return> (this is the key on the keyboard
> which is sometimes labeled "Enter").
* INSERIMENTO E CANCELLAZIONE
-----------------------------

Per inserire del testo basta digitarlo. I caratteri normali, come A, 7,
*, ecc. sono inseriti mano a mano che vengono digitati. Per inserire un
carattere Newline, premere <Invio> (questo è il tasto che nella tastiera
è a volte indicato come "Enter" o "Return").

> To delete the character immediately before the current cursor
> position, type <DEL>.  This is the key on the keyboard usually labeled
> "Backspace"--the same one you normally use, outside Emacs, to delete
> the last character typed.
> 
> There may also be another key on your keyboard labeled <Delete>, but
> that's not the one we refer to as <DEL>.

Per cancellare il carattere immediatamente prima dell'attuale posizione
del cursore, premere <DEL>. Questo è il tasto che sulla tastiera
normalmente è indicato con "Backspace" o con una freccia a sinistra e si
trova sopra al tasto Invio: lo stesso che viene usato comunemente, al di
fuori di Emacs, per cancellare l'ultimo carattere inserito.

Potrebbe esserci un altro tasto sulla tastiera indicato con "Delete", ma
non è quello a cui ci si riferisce quando in questo testo si parla di
<DEL>.

> >> Do this now--type a few characters, then delete them by
>    typing <DEL> a few times.  Don't worry about this file
>    being changed; you will not alter the master tutorial.
>    This is your personal copy of it.

>> Adesso provare questo: digitare alcuni caratteri e poi cancellarli
   premendo <DEL> alcune volte. Non preoccuparsi delle modifiche fatte a
   questo file; il testo originale del tutorial non viene modificato.
   Quella che viene modificata è la copia personale di ciascun utente.

> When a line of text gets too big for one line on the screen, the line
> of text is "continued" onto a second screen line.  If you're using a
> graphical display, little curved arrows appear in the narrow spaces on
> each side of the text area (the left and right "fringes"), to indicate
> where a line has been continued.  If you're using a text terminal, the
> continued line is indicated by a backslash ("\") on the rightmost
> screen column.
> 
> >> Insert text until you reach the right margin, and keep on inserting.
>    You'll see a continuation line appear.

Quando una riga di testo diventa troppo lunga per essere visualizzata su
una riga di schermo essa viene "continuata" su una seconda riga dello
schermo. Se si usa un sistema grafico, appaiono delle piccole frecce
ricurve nello spazio ristretto a ciascun lato dell'area del testo (i
"bordi" sinistro e destro) per indicare i punti in cui una riga prosegue
nella successiva. Se si usa un terminale testuale, le righe che
continuano nelle successive sono indicate da una barra retroversa ("\")
posta nella colonna più a destra dello schermo.

>> Inserire del testo fino a raggiungere il margine destro e poi
   continuare. Si può vedere apparire una riga di prosecuzione.

> >> Use <DEL>s to delete the text until the line fits on one screen
>    line again.  The continuation line goes away.
> 
> You can delete a Newline character just like any other character.
> Deleting the Newline character between two lines merges them into
> one line.  If the resulting combined line is too long to fit in the
> screen width, it will be displayed with a continuation line.

>> Usare <DEL> più volte per cancellare il testo fino a quando la è di
   nuovo tutta contenuta in una sola riga dello schermo. La riga di
   prosecuzione scompare.

Si può cancellare un carattere Newline ("a capo") proprio come ogni
altro carattere. Quando si cancella il carattere Newline che separa due
righe queste vengono unite in un'unica riga. Se la riga risultante è
troppo lunga per essere contenuta nello schermo allora sarà mostrata con
una riga di prosecuzione.

> >> Move the cursor to the beginning of a line and type <DEL>.  This
>    merges that line with the previous line.
> 
> >> Type <Return> to reinsert the Newline you deleted.
> 
> Remember that most Emacs commands can be given a repeat count;
> this includes text characters.  Repeating a text character inserts
> it several times.

>> Spostare il cursore all'inizio di una riga e poi premere <DEL>. Questo
   unisce quella riga alla precedente.

>> Premere <Invio> per inserire di nuovo il carattere Newline che è stato
   cancellato.

Ricordarsi del fatto che la maggior parte dei comandi di Emacs può
ricevere un argomento numerico, compresi i caratteri di testo. Quando si
ripete un carattere di testo questo viene inserito più volte.

> >>  Try that now -- type C-u 8 * to insert ********.
> 
> You've now learned the most basic way of typing something in
> Emacs and correcting errors.  You can delete by words or lines
> as well.  Here is a summary of the delete operations:
> 
> 	<DEL>        Delete the character just before the cursor
> 	C-d   	     Delete the next character after the cursor
> 
> 	M-<DEL>      Kill the word immediately before the cursor
> 	M-d	     Kill the next word after the cursor
> 
> 	C-k	     Kill from the cursor position to end of line
> 	M-k	     Kill to the end of the current sentence

>> Provare a farlo ora: digitare C-u 8 * per inserire ********.

Si è così imparato il modo più semplice di scrivere testo in Emacs e di
correggere gli errori. È anche possibile cancellare parola per parola o
riga per riga. Ecco un sommario delle operazioni di cancellazione:

    <DEL>       Cancella il carattere subito prima del cursore
    C-d         Cancella il carattere subito dopo il cursore

    M-<DEL>     Elimina la parola subito prima del cursore
    M-d         Elimina la parola dopo il cursore

    C-k         Elimina dalla posizione del cursore fino a fine riga
    M-k         Elimina fino alla fine della frase attuale.

> Notice that <DEL> and C-d vs M-<DEL> and M-d extend the parallel
> started by C-f and M-f (well, <DEL> is not really a control character,
> but let's not worry about that).  C-k and M-k are like C-e and M-e,
> sort of, in that lines are paired with sentences.
> 
> You can also kill a segment of text with one uniform method.  Move to
> one end of that part, and type C-<SPC>.  (<SPC> is the Space bar.)
> Next, move the cursor to the other end of the text you intend to kill.
> As you do this, Emacs highlights the text between the cursor and the
> position where you typed C-<SPC>.  Finally, type C-w.  This kills all
> the text between the two positions.

Notare che <DEL> e C-d da una parte e M-<DEL> e M-d dall'altra estendono
il parallelismo iniziato con C-f e M-f (a dire il vero, <DEL> non è un vero e
proprio carattere di controllo, ma non vale la pena impuntarsi su
questo). C-k e M-k sono in un certo modo simili a C-e e M-e, nel senso
che il comando per le righe è associato con quello per le frasi.

Si può anche eliminare una porzione di testo usando un unico metodo
uniforme: spostare il cursore alla fine di quella parte e poi digitare
C-<SPC>. (<SPC> è la barra spaziatrice.) Spostare quindi il cursore
all'altra estremità del testo che si desidera eliminare. Mentre ciò
viene fatto, Emacs evidenzia il testo tra il cursore e la posizione in
cui era stato premuto C-<SPC>. Da ultimo, digitare C-w. Questo elimina
tutto il testo compreso tra le due posizioni.

> >> Move the cursor to the Y at the start of the previous paragraph.
> >> Type C-<SPC>.  Emacs should display a message "Mark set"
>    at the bottom of the screen.
> >> Move the cursor to the n in "end", on the second line of the
>    paragraph.
> >> Type C-w.  This will kill the text starting from the Y,
>    and ending just before the n.

>> Spostare il cursore sulla S all'inizio del paragrafo precedente.
>> Premere <C-SPC>. Emacs dovrebbe mostrare un messaggio "Mark set" in
   fondo allo schermo.
>> Spostare il cursore sulla f di "uniforme", nella seconda riga del
   paragrafo.
>> Premere C-w. Questo elimina il testo a partire dalla "S" fino alla
   lettera immediatamente prima della "f".


> The difference between "killing" and "deleting" is that "killed" text
> can be reinserted (at any position), whereas "deleted" things cannot
> be reinserted in this way (you can, however, undo a deletion--see below).
> Reinsertion of killed text is called "yanking".  Generally, the
> commands that can remove a lot of text kill the text (they are set up so
> that you can yank the text), while the commands that remove just one
> character, or only remove blank lines and spaces, do deletion (so you
> cannot yank that text).  <DEL> and C-d  do deletion in the simplest
> case, with no argument.  When given an argument, they kill instead.

La differenza tra "eliminare" ("killing") e "cancellare" ("deleting") è
che il testo "eliminato" può essere inserito di nuovo (in qualsiasi
posizione), mentre ciò che viene "cancellato" non può essere reinserito
in quello stesso modo (si può, tuttavia, annullare un'operazione di
cancellamento: per questo vedere in seguito). L'azione di reinserimento
del testo eliminato si chiama "richiamare" ("yanking"). In genere i
comandi che possono rimuovere molto testo fanno un'operazione di
eliminazione (sono impostati in questo modo per permettere di
richiamarlo), mentre i comandi che rimuovono un solo carattere o solo
righe vuote e spazi effettuano una cancellazione (quindi non è possibile
richiamare quel testo). <DEL> e C-d fanno una cancellazione nel caso più
semplice, senza un argomento. Se viene fornito un argomento invece fanno
un'eliminazione.

> >> Move the cursor to the beginning of a line which is not empty.
>    Then type C-k to kill the text on that line.
> >> Type C-k a second time.  You'll see that it kills the Newline
>    which follows that line.
> 
> Note that a single C-k kills the contents of the line, and a second
> C-k kills the line itself, and makes all the other lines move up.  C-k
> treats a numeric argument specially: it kills that many lines AND
> their contents.  This is not mere repetition.  C-u 2 C-k kills two
> lines and their newlines; typing C-k twice would not do that.

>> Spostare il cursore all'inizio di una riga non vuota.
   Digitare poi C-k per eliminare il testo di quella riga.
>> Premere C-k una seconda volta. Si può vedere che elimina il carattere
   di nuova riga che è posto dopo quella stessa riga.

Notare che un singolo C-k elimina il contenuto della riga, un secondo
C-k elimina la riga stessa e fa spostare in alto tutte le righe
successive. C-k tratta un argomento numerico in modo speciale: elimina
quel numero di righe E il loro contenuto. Questa non è una semplice
ripetizione del comando. C-u 2 C-k elimina due righe e i rispettivi
caratteri di nuova riga; digitando due volte C-k si ottiene un risultato
diverso.

> Reinserting killed text is called "yanking".  (Think of it as yanking
> back, or pulling back, some text that was taken away.)  You can yank
> the killed text either at the same place where it was killed, or at
> some other place in the text you are editing, or even in a different
> file.  You can yank the same text several times; that makes multiple
> copies of it.  Some other editors call killing and yanking "cutting"
> and "pasting" (see the Glossary in the Emacs manual).
> 
> The command for yanking is C-y.  It reinserts the last killed text,
> at the current cursor position.

Il reinserimento del testo eliminato è chiamato "richiamo" ("yanking").
(Pensare ad esso come a "tirare" ("yanking") indietro o a richiamare del
testo che era stato tolto.) Si può richiamare il testo eliminato sia
nella stessa posizione in cui era stato eliminato, sia in un'altra
posizione nel testo che si sta modificando o persino in un file
diverso. Si può richiamare lo stesso testo diverse volte e ciò ne fa
copie multiple. Altri editor chiamano l'eliminazione e il richiamo
"taglia" e "incolla" (vedere il Glossario nel manuale di Emacs).

Il comando per richiamare è C-y. Reinserisce il testo eliminato per
ultimo nel punto in cui si trova attualmente il cursore.

> >> Try it; type C-y to yank the text back.
> 
> If you do several C-k's in a row, all of the killed text is saved
> together, so that one C-y will yank all of the lines at once.
> 
> >> Do this now, type C-k several times.

>> Provarlo: premere C-y per richiamare indietro il testo.

Se si usano più C-k uno di seguito all'altro, tutto il testo eliminato
viene salvato assieme, in modo che un solo C-y richiamerà tutte le righe
in una volta.

>> Farlo adesso, premere C-k alcune volte.

> Now to retrieve that killed text:
> 
> >> Type C-y.  Then move the cursor down a few lines and type C-y
>    again.  You now see how to copy some text.

Adesso, per recuperare il testo eliminato:

>> Premere C-y. Spostare poi il cursore alcune righe più in basso e
   premere di nuovo C-y. Si è così imparato a copiare del testo.

> What do you do if you have some text you want to yank back, and then
> you kill something else?  C-y would yank the more recent kill.  But
> the previous text is not lost.  You can get back to it using the M-y
> command.  After you have done C-y to get the most recent kill, typing
> M-y replaces that yanked text with the previous kill.  Typing M-y
> again and again brings in earlier and earlier kills.  When you have
> reached the text you are looking for, you do not have to do anything to
> keep it.  Just go on with your editing, leaving the yanked text where
> it is.

Cosa fare se si desidera richiamare del testo e si sono eliminate altre
cose dopo di esso? C-y richiama il testo dell'ultima
eliminazione. Tuttavia il testo eliminato in precedenza non è perso.  Lo
si può recuperare usando il comando M-y. Dopo aver usato C-y per
recuperare l'ultimo testo eliminato, un M-y sostituisce quel testo
richiamato con quello dell'eliminazione precedente. Premendo
ripetutamente M-y si recuperano eliminazioni via via precedenti. Quando
si raggiunge il testo desiderato, non si deve fare altro per tenerlo. Si
può andare avanti con la scrittura lasciando il testo richiamato dove si
trova.

> If you M-y enough times, you come back to the starting point (the most
> recent kill).
> 
> >> Kill a line, move around, kill another line.
>    Then do C-y to get back the second killed line.
>    Then do M-y and it will be replaced by the first killed line.
>    Do more M-y's and see what you get.  Keep doing them until
>    the second kill line comes back, and then a few more.
>    If you like, you can try giving M-y positive and negative
>    arguments.

Se si usa M-y un certo sufficiente di volte si arriva di nuovo al punto
di partenza (l'eliminazione più recente).

>> Eliminare una riga, spostare il cursore, eliminare un'altra riga.
   Usare poi C-y per recuperare la seconda riga eliminata.
   Premere quindi M-y per sostituirla con la riga eliminata per prima.
   Usare di nuovo M-y più volte e osservare cosa si ottiene. Continuare
   fino a che non viene reinserita la riga eliminata per seconda, e
   magari continuare ancora un po' di volte.
   Se si desidera si può provare a fornire a M-y argomenti numerici sia
   positivi sia negativi.

> * UNDO
> ------
> 
> If you make a change to the text, and then decide that it was a
> mistake, you can undo the change with the undo command, C-/.
> 
> Normally, C-/ undoes the changes made by one command; if you repeat
> C-/ several times in a row, each repetition undoes one more command.

* ANNULLAMENTO
--------------

Se si modifica il testo e si decide in seguito che è stato un errore, si
può annullare la modifica con il comando di annullamento C-/.

Normalmente C-/ annulla le modifiche fatte da un solo comando; se si usa
C-/ alcune volte di seguito ogni ripetizione annulla un comando in più.

> But there are two exceptions: commands that do not change the text
> don't count (this includes cursor motion commands and scrolling
> commands), and self-inserting characters are usually handled in groups
> of up to 20.  (This is to reduce the number of C-/'s you have to type
> to undo insertion of text.)
> 
> >> Kill this line with C-k, then type C-/ and it should reappear.

Ci sono però due eccezioni: i comandi che non modificano il testo non
contano (sono inclusi i comandi di spostamento del cursore e quelli di
scorrimento del testo) e i caratteri inseriti a mano sono solitamente
gestiti in gruppi, fino a 20 elementi. (Ciò viene fatto per ridurre il
numero di C-/ da usare per annullare l'inserimento di testo.)

>> Eliminare questa riga con C-k poi usare C-/ e guardarla ricomparire.

> C-_ is an alternative undo command; it works exactly the same as C-/.
> On some text terminals, typing C-/ actually sends C-_ to Emacs.
> Alternatively, C-x u also works exactly like C-/, but is a little less
> convenient to type.
> 
> A numeric argument to C-/, C-_, or C-x u acts as a repeat count.
> 
> You can undo deletion of text just as you can undo killing of text.
> The distinction between killing something and deleting it affects
> whether you can yank it with C-y; it makes no difference for undo.

C-_ è un comando di annullamento alternativo; funziona esattamente come
C-/.
In alcuni terminali digitando C-/ si invia di fatto ad Emacs il comando
C-_.
In alternativa anche C-x u funziona esattamente come C-/, ma può essere
un po' più scomodo da digitare.

Un argomento numerico per C-/, C-_ o C-x u agisce come conteggio delle
ripetizioni.

Si può annullare la cancellazione del testo proprio come si annulla
l'eliminazione. La distinzione tra l'eliminazione e la cancellazione di
qualcosa ha effetto sulla possibilità di richiamarlo con C-y; non c'è
alcuna differenza per quando riguarda l'annullamento.

> * FILES
> -------
> 
> In order to make the text you edit permanent, you must put it in a
> file.  Otherwise, it will go away when you exit Emacs.  In order to
> put your text in a file, you must "find" the file before you enter the
> text.  (This is also called "visiting" the file.)

* FILE
------

Per conservare in modo permanente il testo inserito biaogna conservarlo in
un file, altrimenti sarà perso all'uscita da Emacs. Per
inserire il testo in un file bisogna "trovare" ("find") il file prima di
inserire il testo (Questo viene anche detto "visitare" il file.)

> Finding a file means that you see the contents of the file within
> Emacs.  In many ways, it is as if you were editing the file itself.
> However, the changes you make using Emacs do not become permanent
> until you "save" the file.  This is so you can avoid leaving a
> half-changed file on the system when you do not want to.  Even when
> you save, Emacs leaves the original file under a changed name in case
> you later decide that your changes were a mistake.

Trovare un file significa osservarne il contenuto all'interno di Emacs.
Per molti versi è come se si stesse modificando il file stesso. Tuttavia
le modifiche fatte usando Emacs non diventano permanenti fino a che non
si "salva" il file. Ciò per evitare di lasciare un file semi-modificato
sul sistema quando non è ciò che si vuole. Anche quando si salva il file,
Emacs conserva il file originale con un nome modificato in caso si
decida in seguito che le modifiche fatte sono state un errore.

> If you look near the bottom of the screen you will see a line that
> begins with dashes, and starts with " -:---  TUTORIAL" or something
> like that.  This part of the screen normally shows the name of the
> file that you are visiting.  Right now, you are visiting your personal
> copy of the Emacs tutorial, which is called "TUTORIAL".  When you find
> a file with Emacs, that file's name will appear in that precise spot.

Se si osserva la parte bassa dello schermo si può vedere una riga che
inizia con trattini e con " -:--- TUTORIAL.it" o qualcosa di simile. Questa
parte dello schermo normalmente mostra il nome del file che si sta
visitando. In questo momento si sta visitando la propria copia personale
del tutorial di Emacs che si chiama "TUTORIAL.it". Quando si visita un
file con Emacs il suo nome appare in quel punto preciso.

> One special thing about the command for finding a file is that you
> have to say what file name you want.  We say the command "reads an
> argument" (in this case, the argument is the name of the file).  After
> you type the command
> 
> 	C-x C-f   Find a file

Una caratteristica particolare del comando per trovare i file è che
bisogna fornirgli il nome del file che si desidera. Si dice che il
comando "legge un argomento" (in questo caso l'argomento è il nome del
file). Dopo aver scritto il comando

    C-x C-f    Trova un file

> Emacs asks you to type the file name.  The file name you type appears
> on the bottom line of the screen.  The bottom line is called the
> minibuffer when it is used for this sort of input.  You can use
> ordinary Emacs editing commands to edit the file name.
> 
> While you are entering the file name (or any minibuffer input),
> you can cancel the command with C-g.

Emacs chiede di digitare il nome del file. Il nome che si inserisce
compare nell'ultima riga dello schermo. L'ultima riga è chiamata
"minibuffer" quando viene usata per questo genere di operazioni di
inserimento. Si possono usare i consueti comandi di modifica di Emacs
per modificare il nome del file.

Mentre si inserisce il nome del file (o qualsiasi input nel minibuffer),
si può annullare il comando con C-g.

> >> Type C-x C-f, then type C-g.  This cancels the minibuffer,
>    and also cancels the C-x C-f command that was using the
>    minibuffer.  So you do not find any file.
> 
> When you have finished entering the file name, type <Return> to
> terminate it.  The minibuffer disappears, and the C-x C-f command goes
> to work to find the file you chose.

>> Premere C-x C-f, poi premere C-g. Questo elimina il minibuffer e
   annulla anche il comando C-x C-f che stava usando il
   minibuffer. Perciò non viene trovato alcun file.

Quando si è finito di inserire il nome del file, premere <Invio> per
terminare l'inserimento. Il minibuffer sparisce e il comando C-x C-f
inizia il suo lavoro per trovare il file scelto.

> The file contents now appear on the screen, and you can edit the
> contents.  When you wish to make your changes permanent, type the
> command
> 
> 	C-x C-s   Save the file
> 
> This copies the text within Emacs into the file.  The first time you
> do this, Emacs renames the original file to a new name so that it is
> not lost.  The new name is made by adding "~" to the end of the
> original file's name.

Il contenuto del file compare quindi sullo schermo e può essere
modificato. Quando si desidera rendere permanenti le modifiche usare il
comando

    C-x C-s    Salva il file

Questo copia il testo contenuto in Emacs nel file. La prima
volta che si effetta questa operazione Emacs dà un nuovo nome al file
originale in modo da conservarlo. Il nuovo nome è ottenuto aggiungendo un
carattere "~" alla fine del nome originale del file.

> When saving is finished, Emacs displays the name of the file written.
> You should save fairly often, so that you will not lose very much
> work if the system should crash (see the section "Auto Save" below).
> 
> >> Type C-x C-s TUTORIAL <Return>.
>    This should save this tutorial to a file named TUTORIAL, and show
>    "Wrote ...TUTORIAL" at the bottom of the screen.

Quando il salvataggio è terminato Emacs mostra il nome del file
scritto. Si dovrebbe salvare piuttosto spesso, in modo da non perdere
troppo lavoro in caso di crash del sistema (vedere la sezione
"Salvataggio automatico" più avanti).

>> Usare C-x C-s <Invio>
   Ciò salva questo tutorial in un file chiamato TUTORIAL.it e mostra un
   messaggio "Wrote ...TUTORIAL.it" nella parte bassa dello schermo.

> You can find an existing file, to view it or edit it.  You can also
> find a file which does not already exist.  This is the way to create a
> file with Emacs: find the file, which will start out empty, and then
> begin inserting the text for the file.  When you ask to "save" the
> file, Emacs will really create the file with the text that you have
> inserted.  From then on, you can consider yourself to be editing an
> already existing file.

Si può trovare un file esistente per leggerlo o modificarlo. Si può
anche trovare un file che ancora non esiste. Questo è il modo per creare
un nuovo file con Emacs: si trova il file che sarà inizialmente vuoto e
quindi si inizia ad inserire il suo testo. Quando si chiede di salvare
il file, Emacs lo crea effettivamente con il testo che è stato
inserito. Da quel momento in avanti, si può pensare di stare modificando un
file già esistente.

> * BUFFERS
> ---------
> 
> If you find a second file with C-x C-f, the first file remains
> inside Emacs.  You can switch back to it by finding it again with
> C-x C-f.  This way you can get quite a number of files inside Emacs.
> 
> Emacs stores each file's text inside an object called a "buffer".
> Finding a file makes a new buffer inside Emacs.  To see a list of the
> buffers that currently exist, type
> 
> 	C-x C-b   List buffers

* BUFFER
--------

Se si trova un secondo file con C-x C-f, il primo file rimane
all'interno di Emacs. Si può ritornare ad esso, trovandolo di nuovo con
il comando C-x C-f. In questo modo si possono avere parecchi file
all'interno di Emacs.

Emacs conserva il testo di ciascun file all'interno di un oggetto chiamato
"buffer". Trovare un file crea un nuovo buffer all'interno di
Emacs. Per guardare un elenco dei buffer attualmente esistenti, digitare

    C-x C-b    Elenca buffer

> >> Try C-x C-b now.
> 
> See how each buffer has a name, and it may also have a file name for
> the file whose contents it holds.  ANY text you see in an Emacs window
> is always part of some buffer.
> 
> >> Type C-x 1 to get rid of the buffer list.

>> Provare C-x C-b adesso.

Osservare come ogni buffer abbia un nome e come possa avere anche il nome
di un file del quale contiene il contenuto. OGNI testo che viene
visualizzato in una finestra di Emacs è sempre parte di un buffer.

>> Usare C-x 1 per disfarsi dell'elenco dei buffer.

> When you have several buffers, only one of them is "current" at any
> time.  That buffer is the one you edit.  If you want to edit another
> buffer, you need to "switch" to it.  If you want to switch to a buffer
> that corresponds to a file, you can do it by visiting the file again
> with C-x C-f.  But there is an easier way: use the C-x b command.
> In that command, you have to type the buffer's name.
> 
> >> Create a file named "foo" by typing C-x C-f foo <Return>.
>    Then type C-x b TUTORIAL <Return> to come back to this tutorial.

Quando si hanno svariati buffer, in ogni istante solo uno di essi è
quello "corrente". È quello che si sta modificando. Se si desidera
modificare un altro buffer, è necessario "passare" ad esso. Se si
desidera passare ad un buffer che corrisponde ad un file, lo si può fare
rivisitando nuovamente il file con C-x C-f. Ma esiste un metodo più
semplice: usare il comando C-x b.
In tale comando si deve inserire il nome del buffer.

>> Creare un file chiamato "pippo" digitando C-x C-f pippo <Invio>.
   Poi digitare C-x b TUTORIAL.it <Invio> per tornare a questo tutorial.

> Most of the time, the buffer's name is the same as the file name
> (without the file directory part).  However, this is not always true.
> The buffer list you make with C-x C-b shows you both the buffer name
> and the file name of every buffer.
> 
> ANY text you see in an Emacs window is always part of some buffer.
> Some buffers do not correspond to files.  The buffer named
> "*Buffer List*", which contains the buffer list that you made with
> C-x C-b, does not have any file.  This TUTORIAL buffer initially did
> not have a file, but now it does, because in the previous section you
> typed C-x C-s and saved it to a file.

Nella maggior parte dei casi, il buffer ha lo stesso nome del file
(senza la parte relativa alla directory). Tuttavia ciò non è sempre
vero. L'elenco dei buffer che si ottiene con C-x C-b mostra sia il nome
del buffer sia il nome del file di ciascun buffer.

OGNI testo che viene visualizzato in una finestra di Emacs è sempre
parte di un buffer. Alcuni buffer non corrispondono a file. Il buffer
chiamato "*Buffer List*", che contiene l'elenco dei buffer che è stato
creato con C-x C-b non ha alcun file. Questo buffer TUTORIAL.it
inizialmente non aveva un file, ma lo ha ora, perché nella sezione
precedente è stato usato C-x C-s e lo si è salvato in un file.

> The buffer named "*Messages*" also does not correspond to any file.
> This buffer contains the messages that have appeared on the bottom
> line during your Emacs session.
> 
> >> Type C-x b *Messages* <Return> to look at the buffer of messages.
>    Then type C-x b TUTORIAL <Return> to come back to this tutorial.

Anche il buffer chiamato "*Messages*" non corrisponde ad alcun
file. Questo buffer contiene i messaggi che sono apparsi nell'ultima
riga durante la sessione di Emacs.

>> Digitare C-x b *Messages* <Invio> per vedere il buffer dei messaggi.
   Poi digitare C-x b TUTORIAL.it <Invio> per tornare a questo tutorial.

> If you make changes to the text of one file, then find another file,
> this does not save the first file.  Its changes remain inside Emacs,
> in that file's buffer.  The creation or editing of the second file's
> buffer has no effect on the first file's buffer.  This is very useful,
> but it also means that you need a convenient way to save the first
> file's buffer.  It would be a nuisance to have to switch back to
> it with C-x C-f in order to save it with C-x C-s.  So we have
> 
> 	C-x s     Save some buffers

Se si modifica il testo di un file e poi si trova un altro file questo
non comporta un salvataggio del primo. Le modifiche ad esso rimangono
all'interno di Emacs, nel buffer di quel file. La creazione o la
modifica del buffer del secondo file non ha alcun effetto sul buffer del
primo file. Questo è molto utile, ma significa anche che è necessario un
modo comodo per salvare il buffer del primo file. Sarebbe fastidioso
dover ripassare al primo file con C-x C-f per salvarlo con C-x
C-s. Esiste perciò il comando

    C-x s    Salva alcuni buffer

> C-x s asks you about each buffer which contains changes that you have
> not saved.  It asks you, for each such buffer, whether to save the
> buffer.
> 
> >> Insert a line of text, then type C-x s.
>    It should ask you whether to save the buffer named TUTORIAL.
>    Answer yes to the question by typing "y".

C-x s chiede per ogni buffer che contiene modifiche non ancora
salvate, se debba essere salvato.

>> Inserire una riga di testo e poi premere C-x s.  
   Dovrebbe venir chiesto se salvare il buffer chiamato
   TUTORIAL.it. Rispondere di sì digitando "y".

> * EXTENDING THE COMMAND SET
> ---------------------------
> 
> There are many, many more Emacs commands than could possibly be put
> on all the control and meta characters.  Emacs gets around this with
> the X (eXtend) command.  This comes in two flavors:
> 
> 	C-x	Character eXtend.  Followed by one character.
> 	M-x	Named command eXtend.  Followed by a long name.

* ESTENDERE L'INSIEME DEI COMANDI
---------------------------------

Emacs ha moltissimi comandi in più rispetto a quelli che potrebbero trovare
posto su tutti i caratteri CONTROL e META. Emacs risolve questo problema
con il comando X (eXtend, "estendi"). Viene fornito in due versioni:

    C-x    Comando esteso con carattere. Seguito da un solo carattere.
    M-x    Comando esteso con nome. Seguito da un nome per esteso.

> These are commands that are generally useful but are used less than the
> commands you have already learned about.  You have already seen a few
> of them: the file commands C-x C-f to Find and C-x C-s to Save, for
> example.  Another example is the command to end the Emacs
> session--this is the command C-x C-c.  (Do not worry about losing
> changes you have made; C-x C-c offers to save each changed file before
> it kills Emacs.)

Si tratta di comandi che sono generalmente utili ma usati meno di quelli
che sono già stati spiegati. Se ne sono già visti alcuni: i comandi C-x
C-f per trovare un file e C-x C-x per salvarlo, ad esempio. Un altro
esempio è il comando per chiudere la sessione di Emacs: il comando C-x
C-c. (Non bisogna temere di perdere le modifiche fatte: C-x C-c propone
infatti di salvare ogni file modificato prima di chiudere Emacs.

> If you are using a graphical display, you don't need any special
> command to move from Emacs to another application.  You can do this
> with the mouse or with window manager commands.  However, if you're
> using a text terminal which can only show one application at a time,
> you need to "suspend" Emacs to move to any other program.
> 
> C-z is the command to exit Emacs *temporarily*--so that you can go
> back to the same Emacs session afterward.  When Emacs is running on a
> text terminal, C-z "suspends" Emacs; that is, it returns to the shell
> but does not destroy the Emacs job.  In the most common shells, you
> can resume Emacs with the `fg' command or with `%emacs'.

Se si usa un sistema grafico, non è necessario alcun comando speciale
per spostarsi da Emacs ad un'altra applicazione. Lo si può fare con il
mouse o con i comandi del window manager. Tuttavia, se si usa un
terminale testuale che può visualizzare una sola applicazione alla
volta, è necessario "sospendere" Emacs per spostarsi ad un altro programma.

C-z è il comando che serve per uscire da Emacs *temporaneamente*, così da
poter tornare alla stessa sessione di Emacs successivamente. Quando
Emacs è in esecuzione su un terminale testuale, C-z "sospende" Emacs,
cioè riporta alla shell senza però eliminare il processo di Emacs. Nelle
shell più comuni, si può riprendere a lavorare con Emacs usando il
comando "fg" o con "%emacs".

> The time to use C-x C-c is when you are about to log out.  It's also
> the right thing to use to exit an Emacs invoked under mail handling
> programs and other miscellaneous utilities.
> 
> There are many C-x commands.  Here is a list of the ones you have learned:
> 
> 	C-x C-f		Find file
> 	C-x C-s		Save file
> 	C-x s		Save some buffers
> 	C-x C-b		List buffers
> 	C-x b		Switch buffer
> 	C-x C-c		Quit Emacs
> 	C-x 1		Delete all but one window
> 	C-x u		Undo

Il momento di usare C-x C-c è quando ci si sta per disconnettere dal
sistema. È anche il comando giusto quando si deve chiudere Emacs se
questo è stato invocato da un programma che gestisce la posta o da altri
programmi vari.

Ci sono molti comandi C-x. Ecco un elenco di quelli già visti:

    C-x C-f    Apri un file
    C-x C-s    Salva un file
    C-x s      Salva alcuni buffer
    C-x C-b    Elenca i buffer
    C-x b      Cambia buffer
    C-x C-c    Chiudi Emacs
    C-x 1      Elimina tutte le finestre tranne una
    C-x u      Annulla

> Named eXtended commands are commands which are used even less
> frequently, or commands which are used only in certain modes.  An
> example is the command replace-string, which globally replaces one
> string with another.  When you type M-x, Emacs prompts you at the
> bottom of the screen with M-x and you should type the name of the
> command; in this case, "replace-string".  Just type "repl s<TAB>" and
> Emacs will complete the name.  (<TAB> is the Tab key, usually found
> above the CapsLock or Shift key near the left edge of the keyboard.)
> Submit the command name with <Return>.

I comandi estesi con nome sono comandi usati ancora meno spesso, o
comandi che sono usati solo in certe modalità. Un esempio è il comando
replace-string che sostituisce in tutto il testo una stringa con un'altra. Quando si usa M-x, Emacs visualizza "M-x" nella parte bassa
dello schermo e attende che si inserisca il nome del comando; in questo
caso "replace-string". Basta inserire "repl s<TAB>" ed Emacs
completa il nome. (<TAB> è il tasto di tabulazione, che si
trova di solito sul lato sinistro della tastiera sopra al tasto Blocca
Maiuscole.) Inviare il nome di comando con <Invio>.

> The replace-string command requires two arguments--the string to be
> replaced, and the string to replace it with.  You must end each
> argument with <Return>.
> 
> >> Move the cursor to the blank line two lines below this one.
>    Then type M-x repl s<Return>changed<Return>altered<Return>.
> 
>    Notice how this line has changed: you've replaced
>    the word c-h-a-n-g-e-d with "altered" wherever it occurred,
>    after the initial position of the cursor.

Il comando replace-string richiede due argomenti: la stringa da sostituire
e quella con cui sostituirla. Bisogna concludere ogni argomento con <Invio>.

>> Muovere il cursore sulla riga bianca qui sotto.
   Digitare quindi M-x repl s<Invio>cambiata<Invio>modificata<Invio>.

Osservare come viene cambiata questa riga: la parola cam-bia-ta è stata
sostituita con "modificata" ovunque compariva nel testo, a partire
dalla posizione del cursore in avanti.

> * AUTO SAVE
> -----------
> 
> When you have made changes in a file, but you have not saved them yet,
> they could be lost if your computer crashes.  To protect you from
> this, Emacs periodically writes an "auto save" file for each file that
> you are editing.  The auto save file name has a # at the beginning and
> the end; for example, if your file is named "hello.c", its auto save
> file's name is "#hello.c#".  When you save the file in the normal way,
> Emacs deletes its auto save file.
> 
> If the computer crashes, you can recover your auto-saved editing by
> finding the file normally (the file you were editing, not the auto
> save file) and then typing M-x recover-file <Return>.  When it asks for
> confirmation, type yes<Return> to go ahead and recover the auto-save
> data.

* SALVATAGGIO AUTOMATICO
------------------------

Quando sono state fatte delle modifiche ad un file, ma non sono ancora
state salvate potrebbero andare perse se per caso il sistema si
bloccasse. Per proteggere da questa eventualità Emacs scrive
periodicamente un file di "salvataggio automatico" per ogni file che si
sta modificando. Il nome del file di salvataggio automatico ha un
carattere # all'inizio e alla fine; per esempio se il file si chiama
"ciao.c" il nome del file di salvataggio automatico è "#ciao.c#". Quando
si salva il file nel modo consueto Emacs cancella il file di salvataggio
automatico.

Se il computer si blocca si può recuperare il file salvato automaticamente
trovando il file in modo normale (il file che si stava modificando, non
quello di salvataggio automatico) e usando poi M-x recover file<Invio>.
Quando viene chiesta la conferma si risponda con yes<Invio> per andare
avanti nel recupero dei dati salvati automaticamente.

> * ECHO AREA
> -----------
> 
> If Emacs sees that you are typing multicharacter commands slowly, it
> shows them to you at the bottom of the screen in an area called the
> "echo area".  The echo area contains the bottom line of the screen.

* AREA DI ECO
-------------

Se Emacs si accorge che si inseriscono comandi multicarattere in modo
lento allora li mostra nella parte bassa dello schermo in un'area
chiamata "area di eco". Quest'area contiene l'ultima riga dello schermo.

> * MODE LINE
> -----------
> 
> The line immediately above the echo area is called the "mode line".
> The mode line says something like this:
> 
>  -:**-  TUTORIAL       63% L749    (Fundamental)
> 
> This line gives useful information about the status of Emacs and
> the text you are editing.

* RIGA DELLA MODALITÀ
---------------------
La riga immediatamente sopra all'area di eco è chiamata "riga della
modalità ("mode line"). La riga della modalità si presenta più o meno così:

-:**- TUTORIAL.it        65% L754   (Fundamental)

Questa riga fornisce informazioni utili sullo stato di Emacs e sul testo
che si sta modificando.

> You already know what the filename means--it is the file you have
> found.  NN% indicates your current position in the buffer text; it
> means that NN percent of the buffer is above the top of the screen.
> If the top of the buffer is on the screen, it will say "Top" instead
> of " 0%".  If the bottom of the buffer is on the screen, it will say
> "Bot".  If you are looking at a buffer so small that all of it fits on
> the screen, the mode line says "All".
> 
> The L and digits indicate position in another way: they give the
> current line number of point.

È già stato visto cosa significa il nome del file: è il file che è stato
trovato. NN indica la posizione attuale nel testo del buffer: significa
che NN percento del buffer si trova sopra al margine superiore dello
schermo. Se sullo schermo è visibile l'inizio del file, la riga contiene
"Top" (inizio) invece di " 0%". Se è visibile la fine del buffer,
contiene "Bot" (fine).  Se si sta visualizzando un buffer talmente
piccolo da essere contenuto per intero sullo schermo allora la riga
della modalità contiene "All" (tutto).

La lettera L e le cifre indicano la posizione in un altro modo:
forniscono l'attuale numero di riga del punto del cursore.

> The part of the mode line inside the parentheses is to tell you what
> editing modes you are in.  The default mode is Fundamental which is
> what you are using now.  It is an example of a "major mode".
> 
> Emacs has many different major modes.  Some of them are meant for
> editing different languages and/or kinds of text, such as Lisp mode,
> Text mode, etc.  At any time one and only one major mode is active,
> and its name can always be found in the mode line just where
> "Fundamental" is now.

La parte della riga di modalità racchiusa tra parentesi serve ad indicare in quale
modalità di scrittura ci si trovi. La modalità standard è "Fundamental" ed è
quella che probabilmente si sta usando adesso. È un esempio di "modalità
principale" ("major mode").

Emacs ha tante diverse modalità principali. Alcune di queste sono
pensate per scrivere linguaggi o tipi di testo diversi, come la modalità
Lisp, la modalità Testo, ecc. In un determinato momento è attiva una ed
una sola modalità principale e il suo nome è sempre leggibile nella riga
di modalità proprio dove adesso è presente "Fundamental".

> Each major mode makes a few commands behave differently.  For example,
> there are commands for creating comments in a program, and since each
> programming language has a different idea of what a comment should
> look like, each major mode has to insert comments differently.  Each
> major mode is the name of an extended command, which is how you can
> switch to that mode.  For example, M-x fundamental-mode is a command to
> switch to Fundamental mode.
> 
> If you are going to be editing human-language text, such as this file, you
> should probably use Text Mode.

Ogni modalità principale condiziona il comportamento di alcuni
comandi.  Per esempio ci sono comandi per creare commenti in un
programma e, dal momento che ogni linguaggio di programmazione ha un
diversa idea sull'aspetto che devono avere i commenti, ogni modalità
principale deve inserire i commenti in modo diverso. Ogni modalità
principale è il nome di un comando esteso che è il modo in cui si può
passere a quella modalità. Ad esempio, M-x fundamental-mode è il comando
per passare alla modalità "Fundamental".

Se si vuole scrivere del testo in linguaggio naturale, come in questo
file, si dovrebbe probabilmente usare la modalità testo ("text-mode").

> >> Type M-x text-mode <Return>.
> 
> Don't worry, none of the Emacs commands you have learned changes in
> any great way.  But you can observe that M-f and M-b now treat
> apostrophes as part of words.  Previously, in Fundamental mode,
> M-f and M-b treated apostrophes as word-separators.
> 
> Major modes usually make subtle changes like that one: most commands
> do "the same job" in each major mode, but they work a little bit
> differently.

>> Inserire M-x text-mode <Invio>.

Non preoccuparsi, nessuno dei comandi imparati fino a qui viene
modificato in modo sostanziale. Tuttavia si può notare come M-f e M-b
trattino ora gli apostrofi come parti delle parole.  Prima, nella
modalità "Fundamental", M-f e M-b consideravano gli apostrofi dei
separatori di parole.

Le modalità principali di solito producono dei piccoli cambiamenti come
quello: la maggior parte dei comandi "fa la stessa cosa" in ogni
modalità principale ma in maniera leggermente diversa.

> To view documentation on your current major mode, type C-h m.
> 
> >> Type C-l C-l to bring this line to the top of screen.
> >> Type C-h m, to see how Text mode differs from Fundamental mode.
> >> Type C-x 1 to remove the documentation from the screen.

Per leggere la documentazione sulla modalità principale attuale, usare
C-h m.

>> Digitare C-l C-l per portare questa riga in cima allo schermo.
>> Digitare C-h m per leggere come la modalità "Text mode" sia diversa da
   quella "Fundamental".
>> Digitare C-x 1 per eliminare la documentazione dallo schermo.


> Major modes are called major because there are also minor modes.
> Minor modes are not alternatives to the major modes, just minor
> modifications of them.  Each minor mode can be turned on or off by
> itself, independent of all other minor modes, and independent of your
> major mode.  So you can use no minor modes, or one minor mode, or any
> combination of several minor modes.
> 
> One minor mode which is very useful, especially for editing
> human-language text, is Auto Fill mode.  When this mode is on, Emacs
> breaks the line in between words automatically whenever you insert
> text and make a line that is too wide.

Le modalità principali sono chiamate così perché ci sono anche delle
"modalità secondarie" ("minor modes"). Le modalità secondarie non sono
alternative alle modalità principali, ma solo piccole modifiche ad esse.
Ogni modalità secondaria può essere attivata o disattivata
indipendentemente da tutte le altre modalità secondarie e
indipendentemente dalla modalità principale attiva in quel momento. Si
può perciò usare nessuna modalità secondaria, una modalità secondaria
soltanto oppure qualsiasi combinazione di svariate modalità secondarie.

Una modalità secondaria molto utile, specialmente per la scrittura di
testo in linguaggio naturale, è la modalità "Auto Fill". Quando questa
modalità è attiva, Emacs interrompe automaticamente la riga tra due
parole ogni volta che, inserendo il testo, si crea una riga troppo
lunga.

> You can turn Auto Fill mode on by doing M-x auto-fill-mode <Return>.
> When the mode is on, you can turn it off again by doing
> M-x auto-fill-mode <Return>.  If the mode is off, this command turns
> it on, and if the mode is on, this command turns it off.  We say that
> the command "toggles the mode".
> 
> >> Type M-x auto-fill-mode <Return> now.  Then insert a line of "asdf "
>    over again until you see it divide into two lines.  You must put in
>    spaces between them because Auto Fill breaks lines only at spaces.

Si può attivare la modalità "Auto Fill" con: M-x auto-fill-mode <Invio>.
Quando la modalità è attiva, la si può nuovamente disattivare con M-x
auto-fill-mode <Invio>. Se la modalità è disattivata questo comando la attiva,
viceversa se è attiva la disattiva. Si dice che il comando "commuta la
modalità".

>> Digitare ora M-x auto-fill-mode <Invio>. Inserire quindi una riga di
   "asdf" ripetuti fino a quando non viene suddivisa in due
   righe. Devono essere messi degli spazi tra le ripetizioni perché
   "Auto Fill" spezza le righe solo in corrispondenza di uno spazio.

> The margin is usually set at 70 characters, but you can change it
> with the C-x f command.  You should give the margin setting you want
> as a numeric argument.
> 
> >> Type C-x f with an argument of 20.  (C-u 2 0 C-x f).
>    Then type in some text and see Emacs fill lines of 20
>    characters with it.  Then set the margin back to 70 using
>    C-x f again.

Il margine è di solito impostato a 70 caratteri, ma può essere modificato
con il comando C-x f. L'impostazione desiderata per il margine deve
essere fornita come argomento numerico.

>> Usare C-x f con un argomento di 20 (C-u 2 0 C-x f).
   Inserire quindi del testo e notare come Emacs riempia con esso righe
   di 20 caratteri. Reimpostare poi il margine a 70 usando nuovamente
   C-x f.

> If you make changes in the middle of a paragraph, Auto Fill mode
> does not re-fill it for you.
> To re-fill the paragraph, type M-q (META-q) with the cursor inside
> that paragraph.
> 
> >> Move the cursor into the previous paragraph and type M-q.

Se si fanno modifiche all'interno di un paragrafo, la modalità
"Auto Fill" non ne risistema i margini.
Per risistemare il paragrafo, digitare M-q (META-q) con il cursore
all'interno del paragrafo.

>> Spostare il cursore sul paragrafo precedente e premere M-q.

> * SEARCHING
> -----------
> 
> Emacs can do searches for strings (a "string" is a group of contiguous
> characters) either forward through the text or backward through it.
> Searching for a string is a cursor motion command; it moves the cursor
> to the next place where that string appears.
> 
> The Emacs search command is "incremental".  This means that the
> search happens while you type in the string to search for.

* CERCARE DEL TESTO
-------------------

Emacs può effettuare la ricerca di stringhe (una "stringa" è un gruppo
di caratteri contigui) sia avanti nel testo sia muovendosi all'indietro.
La ricerca di una stringa è un comando di spostamento del cursore;
sposta il curso nel punto successivo in cui compare quella stringa.

Il comando di ricerca di Emacs è "incrementale". Ciò significa che la
ricerca avviene mentre viene inserita la stringa da cercare.

> The command to initiate a search is C-s for forward search, and C-r
> for reverse search.  BUT WAIT!  Don't try them now.
> 
> When you type C-s you'll notice that the string "I-search" appears as
> a prompt in the echo area.  This tells you that Emacs is in what is
> called an incremental search waiting for you to type the thing that
> you want to search for.  <Return> terminates a search.

I comandi per iniziare la ricerca sono C-s per quella in avanti e C-r per
quella all'indietro.  ASPETTARE! Non provarli ancora.

Quando si preme C-s si vede comparire il messaggio "I-search" come
prompt nell'area di eco. Ciò indica che Emacs è in quella che è chiamata
una ricerca incrementale e aspetta che si digiti ciò che si desidera
cercare. <Invio> termina una ricerca.

> >> Now type C-s to start a search.  SLOWLY, one letter at a time,
>    type the word 'cursor', pausing after you type each
>    character to notice what happens to the cursor.
>    Now you have searched for "cursor", once.
> >> Type C-s again, to search for the next occurrence of "cursor".
> >> Now type <DEL> four times and see how the cursor moves.
> >> Type <Return> to terminate the search.

>> Adesso usare C-s per inziare una ricerca. LENTAMENTE, una lettera
   alla volta, inserire la parola "cursore", facendo una pausa dopo ogni
   carattere scritto per osservare cosa succede al cursore. Ora si è
   cercato "cursore" una volta sola.
>> Usare C-s un'altra volta per trovare la successiva occorrenza di "cursore".
>> Adesso premere <DEL> quattro volte e osservare come si muove il cursore.
>> Premere <Invio> per concludere la ricerca.

> Did you see what happened?  Emacs, in an incremental search, tries to
> go to the occurrence of the string that you've typed out so far.  To
> go to the next occurrence of 'cursor' just type C-s again.  If no such
> occurrence exists, Emacs beeps and tells you the search is currently
> "failing".  C-g would also terminate the search.

Si è osservato cosa è successo? Durante una ricerca incrementale Emacs prova ad
andare alla occorrenza della stringa che è stata inserita
fino a quel momento. Per andare alla successiva occorrenza basta solo
premere C-s ancora una volta. Se non esiste alcuna occorrenza, Emacs
emette un bip e informa che la ricerca per il momento è "fallita". Anche
C-g termina una ricerca.

> If you are in the middle of an incremental search and type <DEL>, the
> search "retreats" to an earlier location.  If you type <DEL> just
> after you had typed C-s to advance to the next occurrence of a search
> string, the <DEL> moves the cursor back to an earlier occurrence.  If
> there are no earlier occurrences, the <DEL> erases the last character
> in the search string.  For instance, suppose you have typed "c", to
> search for the first occurrence of "c".  Now if you type "u", the
> cursor will move to the first occurrence of "cu".  Now type <DEL>.
> This erases the "u" from the search string, and the cursor moves back
> to the first occurrence of "c".

Se durante una ricerca incrementale si preme il tasto <DEL> la ricerca
"ritorna" ad una posizione precedente. Se si digita <DEL> immadiatamente
dopo aver digitato C-s per avanzare ad una successiva occorrenza della
stringa di ricerca, <DEL> sposta il cursore indietro ad un'occorrenza
precedente. Se non c'è un'occorrenza precedente, allora <DEL> cancella
l'ultimo carattere della stringa di ricerca. Per esempio, si supponga di
aver digitato una "c" per cercare la prima occorrenza di "c". Ora se si
digita "u", il cursore si muove alla prima occorrenza di "cu". Poi, se
si digita <DEL> si cancella la "u" dalla stringa di ricerca e il cursore
torna indietro alla prima occorrenza di "c".

> If you are in the middle of a search and type a control or meta
> character (with a few exceptions--characters that are special in a
> search, such as C-s and C-r), the search is terminated.
> 
> C-s starts a search that looks for any occurrence of the search string
> AFTER the current cursor position.  If you want to search for
> something earlier in the text, type C-r instead.  Everything that we
> have said about C-s also applies to C-r, except that the direction of
> the search is reversed.

Se ci si trova nel mezzo di un'operazione di ricerca e si usa un
carattere Control o Meta (con poche eccezioni: caratteri che hanno un
significato particolare durante la ricerca, come C-s e C-r) allora la
ricerca viene conclusa.

C-s inizia una ricerca di ogni occorrenza della stringa di ricerca
SUCCESSIVA alla posizione attuale del cursore. Se si desidera cercare
qualcosa nel testo che precede il cursore allora usare invece C-r. Tutto
ciò che è stato detto su C-s vale anche per C-r, a parte il fatto che la
direzione di ricerca è invertita.

> * MULTIPLE WINDOWS
> ------------------
> 
> One of the nice features of Emacs is that you can display more than
> one window on the screen at the same time.  (Note that Emacs uses the
> term "frames"--described in the next section--for what some other
> applications call "windows".  The Emacs manual contains a Glossary of
> Emacs terms.)
> 
> >> Move the cursor to this line and type C-l C-l.

* FINESTRE MULTIPLE
-------------------

Una delle caratteristiche belle di Emacs è che si possono visualizzare
più finestre sullo schermo nello stesso momento. (Notare che Emacs usa
il termine "riquadri", descritto nella sezione successiva, per ciò che
altre applicazioni chiamano "finestre". Il manuale di Emacs contiene un
Glossario dei termini di Emacs.)

>> Muovere il cursore su questa riga e digitare C-l C-l.

> >> Now type C-x 2 which splits the screen into two windows.
>    Both windows display this tutorial.  The editing cursor stays in
>    the top window.
> 
> >> Type C-M-v to scroll the bottom window.
>    (If you do not have a real META key, type <ESC> C-v.)

>> Ora usare C-x 2 che suddivide lo schermo in due finestre. Entrambe le
   finestre visualizzano questo tutorial. Il cursore di modifica rimane
   nella finestra superiore.

>> Digitare C-M-v per far scorrere la finestra inferiore.
   (Se non si ha un tasto META reale, digitare <ESC> C-v.)

> >> Type C-x o ("o" for "other") to move the cursor to the bottom window.
> >> Use C-v and M-v in the bottom window to scroll it.
>    Keep reading these directions in the top window.
> 
> >> Type C-x o again to move the cursor back to the top window.
>    The cursor in the top window is just where it was before.

>> Digitare C-x o ("o" sta per "other": altro in inglese) per spostare
   il cursore nella finestra inferiore.
>> Usare C-v e M-v nella finestra inferiore per farvi scorrere il testo.
   Continuare a leggere queste indicazioni nella finestra superiore.

>> Premere di nuovo C-x o per far ritornare il cursore nella finestra
   superiore. Il cursore nella finestra superiore è esattamente dove si
   trovava prima.

> You can keep using C-x o to switch between the windows.  The "selected
> window", where most editing takes place, is the one with a prominent
> cursor which blinks when you are not typing.  The other windows have
> their own cursor positions; if you are running Emacs in a graphical
> display, those cursors are drawn as unblinking hollow boxes.
> 
> The command C-M-v is very useful when you are editing text in one
> window and using the other window just for reference.  Without leaving
> the selected window, you can scroll the other window with C-M-v.

Si può continuare a usare C-x o per andare da una finestra all'altra. La
"finestra selezionata" dove avviene la maggior parte della scrittura, è
quella con un cursore ben in vista che lampeggia quando non si sta
scrivendo. Le altre finestre hanno le proprie posizioni del cursere; se
Emacs è in esecuzione in un display grafico, questi cursori sono
disegnati come rettangoli vuoti che non lampeggiano.

Il comando C-M-v è molto utile quando si modifica del testo in una
finestra mentre si usa l'altra solo come riferimento. Senza lasciare la
finestra selezionata si può far scorrere il testo nell'altra finestra
con C-M-v.

> C-M-v is an example of a CONTROL-META character.  If you have a META
> (or Alt) key, you can type C-M-v by holding down both CONTROL and META
> while typing v.  It does not matter whether CONTROL or META "comes
> first," as both of these keys act by modifying the characters you
> type.
> 
> If you do not have a META key, and you use <ESC> instead, the order
> does matter: you must type <ESC> followed by CONTROL-v, because
> CONTROL-<ESC> v will not work.  This is because <ESC> is a character
> in its own right, not a modifier key.

C-M-v è un esempio di carattere CONTROL-META. Se si ha un tasto META (o
Alt), si può inserire C-M-v tenendo premuti entrambi CONTROL e META
mentre si digita v. Non importa quale tra CONTROL e META viene premuto
per primo dato che entrambi agiscono modificando i caratteri che vengono
inseriti.

Se non c'è un tasto META e si usa invece <ESC> l'ordine diventa
importante: bisogna premere prima <ESC>, seguito da CONTROL-v perché
CONTROL-<ESC>-v non funziona. Questo accade perché <ESC> è un carattere
vero e proprio, non un tasto modificatore.

> >> Type C-x 1 (in the top window) to get rid of the bottom window.
> 
> (If you had typed C-x 1 in the bottom window, that would get rid
> of the top one.  Think of this command as "Keep just one
> window--the window I am already in.")
> 
> You do not have to display the same buffer in both windows.  If you
> use C-x C-f to find a file in one window, the other window does not
> change.  You can find a file in each window independently.

>> Digitare C-x 1 (nella finestra superiore) per eliminare la finestra
   inferiore.

(Se si fosse usato C-x 1 nella finestra inferiore allora sarebbe stata
eliminata quella superiore. Si può pensare a questo comando come a
"Conserva una sola finestra: quella che è già selezionata.")

Non è necessario che venga mostrato lo stesso buffer in entrambe le
finestre. Se si usa C-x C-f per trovare un file in una finestra, l'altra
finestra non cambia. Si può trovare un file in ciascuna finestre in modo
indipendente.

> Here is another way to use two windows to display two different things:
> 
> >> Type C-x 4 C-f followed by the name of one of your files.
>    End with <Return>.  See the specified file appear in the bottom
>    window.  The cursor goes there, too.
> 
> >> Type C-x o to go back to the top window, and C-x 1 to delete
>    the bottom window.

Ecco un altro modo per usare due finestre per visualizzare cose diverse:

>> Digitare C-x 4 C-f seguito dal nome di uno dei propri file. Terminare
   il comando con <Invio>. Notare che il file specificato appare nella
   finestra inferiore. Anche il cursore si sposta in essa.

>> Usare C-x o per tornare alla finestra superiore e C-x 1 per eliminare
   quella inferiore.

> * MULTIPLE FRAMES
> ------------------
> 
> Emacs can also create multiple "frames".  A frame is what we call one
> collection of windows, together with its menus, scroll bars, echo
> area, etc.  On graphical displays, what Emacs calls a "frame" is what
> most other applications call a "window".  Multiple graphical frames
> can be shown on the screen at the same time.  On a text terminal, only
> one frame can be shown at a time.
> 
> >> Type M-x make-frame <Return>.
>    See a new frame appear on your screen.

* RIQUADRI MULTIPLI
-------------------

Emacs può anche creare "riquadri" multipli. Un riquadro è come viene
chiamata una raccolta di finestre, insieme con i suoi menu, barre di
scorrimento, area di eco, ecc. Nei display grafici, ciò che Emacs chiama
"riquadro" è ciò che la maggior parte delle altre applicazioni chiama
"finestra". Nello stesso momento possono essere visualizzate sullo
schermo più riquadri grafici. In un terminale testuale, può essere
visualizzato solo un riquadro alla volta.

>> digitare M-x make-frame <Invio>.
   Osservare la comparsa di un nuovo riquadro sullo schermo.

> You can do everything you did in the original frame in the new frame.
> There is nothing special about the first frame.
> 
> >> Type M-x delete-frame <Return>.
>    This removes the selected frame.
> 
> You can also remove a frame by using the normal method provided by the
> graphical system (often clicking a button with an "X" at a top corner
> of the frame).  If you remove the Emacs job's last frame this way,
> that exits Emacs.

Nel nuovo riquadro si può fare tutto ciò che si è fatto nel riquadro
originale. Il primo riquadro non ha nulla di speciale rispetto agli
altri.

>> Digitare M-x delete-frame <Invio>.
   Questo rimuove il riquadro selezionato.

Si può anche rimuovere un riquadro usando il metodo normale fornito dal
sistema grafico (spesso si deve fare clic su un pulsante con una "X"
in uno degli angoli in alto del riquadro). Se si usa questo metodo per
eliminare l'ultimo riquadro di lavoro di Emacs, si esce da Emacs.

> * RECURSIVE EDITING LEVELS
> --------------------------
> 
> Sometimes you will get into what is called a "recursive editing
> level".  This is indicated by square brackets in the mode line,
> surrounding the parentheses around the major mode name.  For
> example, you might see [(Fundamental)] instead of (Fundamental).
> 
> To get out of the recursive editing level, type <ESC> <ESC> <ESC>.
> That is an all-purpose "get out" command.  You can also use it for
> eliminating extra windows, and getting out of the minibuffer.

* LIVELLI DI MODIFICA RICORSIVI
------------------------------

A volte ci si può trovare in quello che viene chiamato "livello di
editing ricorsivo". Ciò è indicato dalla presenza di parentesi quadre
nella riga della modalità che racchiudono le parentesi tonde intorno al
nome della modalità principale. Ad esempio si potrebbe vedere
[(Fundamental)] invece di (Fundamental).

Per uscire dal livello di editing ricorsivo, usare <ESC> <ESC>
<ESC>. Questo è un comando di "uscita" universale. Lo si può usare anche
per eliminare le finestre agiguntive e per uscire dal minibuffer.

> >> Type M-x to get into a minibuffer; then type <ESC> <ESC> <ESC> to
>    get out.
> 
> You cannot use C-g to get out of a recursive editing level.  This is
> because C-g is used for canceling commands and arguments WITHIN the
> recursive editing level.

>> Digitare M-x per entrare nel "minibuffer"; poi usare <ESC> <ESC>
   <ESC> per uscirne.

Non è possibile usare C-g per uscire da un livello di editing
ricorsivo. Questo perché C-g è usato per annullare i comandi all'INTERNO del
livello di editing ricorsivo.

> * GETTING MORE HELP
> -------------------
> 
> In this tutorial we have tried to supply just enough information to
> get you started using Emacs.  There is so much available in Emacs that
> it would be impossible to explain it all here.  However, you may want
> to learn more about Emacs since it has many other useful features.
> Emacs provides commands for reading documentation about Emacs
> commands.  These "help" commands all start with the character
> CONTROL-h, which is called "the Help character".

* OTTENERE ULTERIORE AIUTO
--------------------------

In questo tutorial si è cercato di fornire solamente le informazioni
sufficienti per iniziare ad usare Emacs. Ci sono così tante funzionalità
disponibili in Emacs che sarebbe impossibile spiegarle tutte qui;
tuttavia si può volere imparare di più su Emacs dato che ha molte alre
utili caratteristiche. Emacs fornisce comandi per leggere la
documentazione dei suoi comandi. Questi comandi di "aiuto" iniziano
tutti con il carattere CONTROL-h, che è chiamato "carattere dell'Aiuto".

> To use the Help features, type the C-h character, and then a
> character saying what kind of help you want.  If you are REALLY lost,
> type C-h ? and Emacs will tell you what kinds of help it can give.
> If you have typed C-h and decide you do not want any help, just
> type C-g to cancel it.
> 
> (If C-h does not display a message about help at the bottom of the
> screen, try typing the F1 key or M-x help <Return> instead.)

Per usare queste funzionalità di Aiuto, digitare il carattere C-h e
quindi un altro carattere che indichi che tipo di aiuto si desidera. Se
si è completamante DISORIENTATI, digitare C-h ? ed Emcas indicherà i
tipi di aiuto che può fornire. Se si è premuto C-h e si decide che non
si ha più bisogno di alcun aiuto, basata usare C-g per annullare il
comando.

(Se C-h non mostra un messaggio sull'Aiuto nella parte bassa dello
schermo, provare ad usare al suo posto il tasto F1 o M-x help <Invio>.)

> The most basic HELP feature is C-h c.  Type C-h, the character c, and
> a command character or sequence; then Emacs displays a very brief
> description of the command.
> 
> >> Type C-h c C-p.
> 
> The message should be something like this:
> 
> 	C-p runs the command previous-line

La funzione di aiuto di base è C-h c. Digitare C-h, poi il carattere c e
quindi un carattere o una sequenza di comando. Emacs mostra quindi una
breve descrizione di quel comando.

>> Digitare C-h c C-p.

Si dovrebbe ottenere un qualcosa di simile a:

    C-p runs the command previous-line

> This tells you the "name of the function".  Since function names
> are chosen to indicate what the command does, they can serve as
> very brief documentation--sufficient to remind you of commands you
> have already learned.
> 
> Multi-character commands such as C-x C-s and (if you have no META or
> EDIT or ALT key) <ESC>v are also allowed after C-h c.
> 
> To get more information about a command, use C-h k instead of C-h c.

Questo messaggio indica, in inglese, il "nome della funzione". Dato che
i nomi delle funzioni sono scelti per indicare ciò che fa il comando,
possono servire anche come breve documentazione, sufficiente per
ricordare comandi che sono già stati imparati.

Dopo C-h c è anche possibile usare comandi multi-carattere, come C-x C-s
e (se non si ha un tasto META o EDIT o ALT) <ESC>v.

Per ottenere più informazioni su un comando usare C-h k invece di C-h c.

> >> Type C-h k C-p.
> 
> This displays the documentation of the function, as well as its name,
> in an Emacs window.  When you are finished reading the output, type
> C-x 1 to get rid of that window.  You do not have to do this right
> away.  You can do some editing while referring to the help text, and
> then type C-x 1.
> 
> Here are some other useful C-h options:

>> Provare C-h k C-p.

Questo mostra in una finestra di Emacs la documentazione della funzione,
oltre al suo nome. Una volta letto l'output, digitare
C-x 1 per eliminare quella finestra. Non è obbligatorio farlo subito. Si
può continuare la scrittura facendo riferimento al testo di aiuto e
successivamente digitare C-x 1.

Ecco altre utili opzioni di C-h:

>    C-h f	Describe a function.  You type in the name of the
> 		function.
> 
> >> Try typing C-h f previous-line <Return>.
>    This displays all the information Emacs has about the
>    function which implements the C-p command.
> 
> A similar command C-h v displays the documentation of variables,
> including those whose values you can set to customize Emacs behavior.
> You need to type in the name of the variable when Emacs prompts for
> 		it.

    C-h f    Descrive una funzione. si deve inserire il nome di una
             funzione.

>> Provare con C-h f previous-line <Invio>.
   Questo mostra tutte le informazioni che Emacs possiede sulla funzione
   che implementa il comando C-p.

Un comando simile è C-h v che mostra la documentazione di variabili,
incluse quelle i cui valori possono essere utilizzati per personalizzare
il comportamento di Emacs. È necessario inserire il nome della variabile
quando Emacs lo chiede.

>    C-h a	Command Apropos.  Type in a keyword and Emacs will list
> 		all the commands whose names contain that keyword.
> 		These commands can all be invoked with META-x.
> 		For some commands, Command Apropos will also list a one
> 		or two character sequence which runs the same command.
> 
> >> Type C-h a file <Return>.

    C-h a    Comando "Apropos". Inserire una parola ed Emacs elenca
             tutti i comandi il cui nome contiene quella parola
             chiave. Questi comandi possono tutti essere richiamati con
             META-x. Per alcuni comandi, il comando Apropos mostra anche
             una sequenza sequenza di uno o due caratteri che esegue lo
             stesso comando.

>> Digitare C-h a file <Invio>.

> This displays in another window a list of all M-x commands with "file"
> in their names.  You will see character-commands like C-x C-f listed
> beside the corresponding command names such as find-file.
> 
> >> Type C-M-v to scroll the help window.  Do this a few times.
> 
> >> Type C-x 1 to delete the help window.

Questo mostra in un'altra finestra un elenco di tutti i comandi M-x che
contengono la parola "file" nel nome. Nell'elenco si possono vedere
comandi-carattere come C-x C-f elencati insieme ai corrispondenti nomi
di comando come "find-file".

>> Usare C-M-v per far scorrere il testo nella finestra di
   aiuto. Farlo più volte.

>> Digitare C-x 1 per eliminare la finestra di aiuto.

>    C-h i	Read included Manuals (a.k.a. Info).  This command puts
> 		you into a special buffer called `*info*' where you
> 		can read manuals for the packages installed on your system.
> 		Type m emacs <Return> to read the Emacs manual.
> 		If you have never before used Info, type ? and Emacs
> 		will take you on a guided tour of Info mode facilities.
> 		Once you are through with this tutorial, you should
> 		consult the Emacs Info manual as your primary
> 		documentation.

    C-h i    Legge i manuali inclusi (alias Info). Questo comando apre
             un buffer speciale chiamato "*info*" in cui si possono
             leggere i manuali dei pacchetti installati sul proprio
             sistema. Digitare m emacs <Invio> per leggere il manuale di
             Emacs.
             Se non si è mai usato Info prima d'ora, digitare ? ed Emacs
             farà fare una visita guidataa delle funzionalità della
             modalità Info. Una volta terminata la lettura di questo
             tutorial, si dovrebbe consultare il manuale Info di Emacs
             come fonte principale di documentazione.

> * MORE FEATURES
> ---------------
> 
> You can learn more about Emacs by reading its manual, either as a
> printed book, or inside Emacs (use the Help menu or type C-h r).
> Two features that you may like especially are completion, which saves
> typing, and dired, which simplifies file handling.

* ULTERIORI FUNZIONALITÀ
------------------------

Si può imparare di più su Emacs leggendo il suo manuale, in forma di
libro stampato o all'interno di Emacs (usando il menù Aiuto o digitando
C-h r). Due funzionalità che possono risultare particolarmente gradite
sono il completamento automatico, che riduce la quantità di tasti da
digitare, e dired che semplifica la gestione dei file.

> Completion is a way to avoid unnecessary typing.  For instance, if you
> want to switch to the *Messages* buffer, you can type C-x b *M<Tab>
> and Emacs will fill in the rest of the buffer name as far as it can
> determine from what you have already typed.  Completion also works for
> command names and file names.  Completion is described in the Emacs
> manual in the node called "Completion".

Il completamento automatico è un modo per evitare di digitare cose
superflue. Ad esmpio, se si desidera passare al buffer *Messages*, si
può usare C-x b *M<Tab> ed Emacs completerà il resto del nome del buffer
per quanto possibile sulla base di quello che è già stato digitato. Il
completamento automatico funziona anche per i nomi dei comandi e dei
file. Il completamento automatico è descritto del manuale di Emacs nel
nodo intitolato "Completion".

> Dired enables you to list files in a directory (and optionally its
> subdirectories), move around that list, visit, rename, delete and
> otherwise operate on the files.  Dired is described in the Emacs
> manual in the node called "Dired".
> 
> The manual also describes many other Emacs features.

Dired permette di elencare i file in una directory (e opzionalmente le
sue sottodirectory), spostarsi in tale elenco, visitare, rinominare,
cancellare e fare altre operazioni sui file. Dired è descritto nel
manuale di Emacs nel nodo intitolato "Dired".

Il manuale descrive anche molte altre funzionalità di Emacs.

> * CONCLUSION
> ------------
> 
> To exit Emacs use C-x C-c.
> 
> This tutorial is meant to be understandable to all new users, so if
> you found something unclear, don't sit and blame yourself - complain!

* CONCLUSIONI
-------------

Per uscire da Emacs usare C-x C-c.

Questo documento è stato creato per essere comprensibile a tutti i nuovi
utenti, perciò se si è trovato poco chiaro qualche passaggio, non stare
fermi ad autocommiserarsi: protestare!

> * COPYING
> ---------
> 
> This tutorial descends from a long line of Emacs tutorials
> starting with the one written by Stuart Cracraft for the original Emacs.
> 
> This version of the tutorial is a part of GNU Emacs.  It is copyrighted
> and comes with permission to distribute copies on certain conditions:

* COPIA
-------

La versione inglese di questo testo (disponibile nel file "TUTORIAL")
deriva da una lunga serie di tutorial di Emacs che ha avuto inizio con quello
scritto da Stuart Cracraft per il primo Emacs.

La versione italiana è stata tradotta originalmente da Alfredo Finelli
(alfredofnl_at_tiscali.it) e aggiornata da Beatrice Torracca
(beatricet_at_libero.it) nell'ambito del Free Translation Project
(tp_at_lists.linux.it).

Questa versione del tutorial fa parte di GNU Emacs. È coperta da
copyright e viene distribuita con il permesso di farne copie a
determinate condizioni:

   NOTA BENE: la licenza che definisce a tutti gli effetti i termini
   secondo i quali è possibile la copia e la distribuzione di questo
   documento è quella originale in lingua inglese contenuta nel file
   "TUTORIAL". Qui di seguito se ne riporta una traduzione a scopo
   indicativo, restando comunque inteso il fatto che è quella originale a
   fare fede.

>   Copyright (C) 1985, 1996, 1998, 2001-2012 Free Software Foundation, Inc.
> 
>   This file is part of GNU Emacs.
> 
>   GNU Emacs is free software: you can redistribute it and/or modify
>   it under the terms of the GNU General Public License as published by
>   the Free Software Foundation, either version 3 of the License, or
>   (at your option) any later version.

  Copyright (C) 1985, 1996, 1998, 2001-2012 Free Software Foundation, Inc.

  Questo file fa parte di GNU Emacs.

  GNU Emacs è software libero: può essere ridistribuito o modificato nei
  termini della GNU General Public License, come pubblicata dalla Free
  Software Foundation, nella versione 3 della licenza, o (a discrezione
  dell'utente) in una qualsiasi versione successiva.

>   GNU Emacs is distributed in the hope that it will be useful,
>   but WITHOUT ANY WARRANTY; without even the implied warranty of
>   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>   GNU General Public License for more details.
> 
>   You should have received a copy of the GNU General Public License
>   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.

  GNU Emacs è distribuito nella speranza che sia utile, ma SENZA ALCUNA
  GARANZIA, nemmeno la garanzia implicita di COMMERCIABILITÀ o di
  IDONEITÀ AD UN PARTICOLARE SCOPO. Vedere la GNU General Public License
  per ulteriori dettagli.

  Insieme a GNU Emacs dovrebbe essere stata ricevuta una copia della GNU
  General Public License. Se così non fosse, vedere
  <http://www.gnu.org/licenses/>.

> Please read the file COPYING and then do give copies of GNU Emacs to
> your friends.  Help stamp out software obstructionism ("ownership") by
> using, writing, and sharing free software!

Leggere il file COPYING e poi distribuire copie di GNU Emacs ai propri
amici. Aiutare a sconfiggere l'ostruzionismo (la "proprietà") software
usando, scrivendo e condividendo software libero!





Maggiori informazioni sulla lista tp