1
1
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1317 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
David Lawrence Ramsey 2002-11-04 16:05:42 +00:00
родитель 749def4e1a
Коммит 0084eaa9e0
13 изменённых файлов: 390 добавлений и 826 удалений

Просмотреть файл

@ -2,14 +2,31 @@ CVS code -
- General:
- Translation updates (see po/ChangeLog for details).
- Forward-ported Chris' --disable-wrapping-as-root option from
1.0.9. Per Jordi's suggestions, have it override /etc/nanorc
but not ~/.nanorc. (DLR)
1.0.9. Per Jordi's suggestions, have it override
$SYSCONFDIR/nanorc but not ~/.nanorc. (DLR)
- Change all references to /etc/nanorc in the documentation to
$SYSCONFDIR/nanorc. (DLR)
nano.c:
version()
- Remove obsolete reference to --enable-undo. (David Benbennick)
- winio.c:
do_credits()
- Add David Benbennick to credits. (DLR)
- nanorc.sample:
- Added comment to explain the non-escaping of quotes in
color regexes, based on info provided by David Benbennick.
(DLR)
- faq.html:
- Miscellaneous fixes and updates for typos and broken links.
It is now fully compliant with HTML 4.10 Transitional. (DLR)
- nano.texi:
- Typo fixes and updates. (David Benbennick)
GNU nano 1.1.12 - 10/24/2002
- General:
- Translation updates (see po/ChangeLog for details).
- Remove malloc.h, as it's unneeded and just causes annoyances on
*BSD systems. Added stdlib.h to global.c
*BSD systems. Added stdlib.h to global.c.
- Added Meta-Y toggle to disable/enable color syntax highlighting
completely. This may eventually be per-buffer, but that's too
complicated for a feature freeze.
@ -197,6 +214,8 @@ GNU nano 1.1.11 - 10/01/2002
Benbennick)
- faq.html:
- Typo fix. (DLR)
- AUTHORS:
- Add David Benbennick. (Jordi and Chris)
- TODO:
- Add entry in the 1.4 section for Pico's paragraph searching
ability (at the search prompt, ^W goes to the paragraph's
@ -287,8 +306,8 @@ GNU nano 1.1.10 - 07/25/2002
printed as-is and be interpreted as commands by xterm, which
will corrupt the display.) (DLR)
- Add command line option -I/--ignorercfiles to ignore
/etc/nanorc and ~/.nanorc. (Carl Drinkwater). Fix to parsing
getopt args (DLR).
$SYSCONFDIR/nanorc and ~/.nanorc. (Carl Drinkwater). Fix to
parsing getopt args (DLR).
- Fix minor bugs with importing certain text files in Mac
format. (DLR)
- files.c:
@ -749,7 +768,7 @@ GNU nano 1.1.7 - 03/05/2002
- Preliminary quoting support for justify. New arg -Q, --quotestr,
changes to do_justify(), global variable quotestr().
- Makefile.am:
- Add SYSCONFDIR to DEFS, so we can have an /etc/nanorc.
- Add SYSCONFDIR to DEFS, so we can have an $SYSCONFDIR/nanorc.
- Change localedir line to 1.0's version.
- Moved m4/ stuff to its own m4/Makefile.am.
- m4/aclocal_inc.m4:

Просмотреть файл

@ -4,7 +4,7 @@ INSTRUCTIONS TO COMPILE AND INSTALL NANO CVS VERSIONS
GNU nano is available from CVS, but building this needs a bit
more care than the official stable and unstable tarballs.
To succesfully compile GNU nano from CVS, you'll need the
To successfully compile GNU nano from CVS, you'll need the
following packages:
- autoconf (version >= 2.52)
@ -26,9 +26,9 @@ and the nano tree will download.
If you want to checkout the stable CVS branch, append -r nano_1_0_branch:
$ cvs -z3 -d:pserver:anonymous@subversions.gnu.org:/cvsroot/nano checkout -r nano_1_0_branch nano
Once you have the sources in the "nano" directory, cd into it, and execute
the "autogen.sh" script in the top dir. This will setup a configure script
and Makefile.in, and you will be ready to compile with
Once you have the sources in the "nano" directory, cd into it, and
execute the "autogen.sh" script in the top dir. This will setup a
configure script and Makefile.in, and you will be ready to compile with
$ ./configure [--add-options-here] && make
Once it's done compiling,
$ make install

Просмотреть файл

@ -26,7 +26,7 @@ AC_ARG_ENABLE(debug,
fi])
if test "$debug_support" != "yes"; then
AC_DEFINE(NDEBUG, 1, [Shut up the assert warnings :-)])
AC_DEFINE(NDEBUG, 1, [Shut up the assert warnings :-)])
fi
AC_ARG_ENABLE(extra,

2
cut.c
Просмотреть файл

@ -268,7 +268,7 @@ int do_cut_text(void)
#ifdef DEBUG
dump_buffer(cutbuffer);
#endif
if (fileptr == fileage)
fileage = current;
else

958
faq.html
Просмотреть файл

@ -1,721 +1,253 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<title>The GNU nano editor FAQ</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.73 [en] (X11; U; Linux 2.2.16 i586) [Netscape]">
<title>The GNU nano editor FAQ</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.73 [en] (X11; U; Linux 2.2.16 i586) [Netscape]">
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">
<h1>
<font color="#CC0000">The nano FAQ</font></h1>
<h2>
<font color="#330000">Table of Contents</font></h2>
<h2>
<font color="#330000"><a href="#1">1.&nbsp; General</a></font></h2>
<blockquote><font color="#330000"><a href="#1.1">1.1 About this FAQ.</a></font>
<br><font color="#330000"><a href="#1.2">1.2. How do I contribute to it?</a></font>
<br><font color="#330000"><a href="#1.3">1.3. What is GNU nano?</a></font>
<br><font color="#330000"><a href="#1.4">1.4. What is the history behind
nano?</a></font>
<br><font color="#330000"><a href="#1.5">1.5. Why the name change from
TIP?</a></font>
<br><font color="#330000"><a href="#1.6">1.6. What is the current version
of nano?</a></font>
<br><font color="#330000"><a href="#1.7">1.7. I want to read the manpage
without having to download the program!</a></font></blockquote>
<h2>
<font color="#330000"><a href="#2">2. Where to get GNU
nano</a></font></h2>
<blockquote><font color="#330000"><a href="#2.1">2.1. FTP and WWW sites
that carry nano.</a></font>
<br><font color="#330000"><a href="#2.2">2.2. Redhat and derivatives (.rpm)
packages.</a></font>
<br><font color="#330000"><a href="#2.3">2.3. Debian (.deb) packages.</a></font>
<br><font color="#330000"><a href="#2.4">2.4. By CVS (for the brave).</a></font></blockquote>
<h2>
<font color="#330000"><a href="#3">3. Installation and Configuration</a></font></h2>
<blockquote><font color="#330000"><a href="#3.1">3.1. How do install the
RPM or DEB package?</a></font>
<br><font color="#330000"><a href="#3.2">3.2. Compiling from source: WHAT
THE HECK DO I DO NOW?</a></font>
<br><font color="#330000"><a href="#3.3">3.3. Why does everything go into
/usr/local?</a></font>
<br><font color="#330000"><a href="#3.4">3.4. I get errors about 'bindtextdomain',
'gettext' and/or 'gettextdomain'.&nbsp; What can I do about it?</a></font>
<br><font color="#330000"><a href="#3.5">3.5. Nano should automatically
run strip on the binary when installing it!</a></font>
<br><font color="#330000"><a href="#3.6">3.6. How can I make the
executable smaller? This is too bloated!</a></font>
<br><font color="#330000"><a href="#3.7">3.7. Tell me more about this
multibuffer stuff!</a></font>
<br><font color="#330000"><a href="#3.8">3.8. How do I make a .nanorc file
that nano will read when I start it?</a></font></blockquote>
<h2>
<font color="#330000"><a href="#4">4. Running</a></font></h2>
<blockquote><font color="#330000"><a href="#4.1">4.1. Ack!&nbsp; My backspace/delete/enter/double
bucky/meta key doesn't seem to work!&nbsp; What can I do?</a></font>
<br><font color="#330000"><a href="#4.2">4.2. Nano crashes when I type
&lt;insert keystroke here>!</a></font>
<br><font color="#330000"><a href="#4.3">4.3. Nano crashes when I resize
my window.&nbsp;&nbsp; How can I fix that?</a></font>
<br><font color="#330000"><a href="#4.4">4.4. Why does nano show ^\
in the shortcut list instead of ^J?</a></font>
<br><font color="#330000"><a href="#4.5">4.5. When I type in a
search string, the string I last searched for is already in front of
my cursor! What happened?!</a></font>
<br><font color="#330000"><a href="#4.6">4.6. I get the message "NumLock
glitch detected. Keypad will malfunction with NumLock off." What
gives?</a></font>
<br><font color="#330000"><a href="#4.7">4.7. How do I make nano my
default editor (in Pine, mutt, etc.)?</a></font></blockquote>
<h2>
<font color="#330000"><a href="#5">5. Internationalization</a></font></h2>
<blockquote><font color="#330000"><a href="#5.1">5.1. There's no translation
for my language!</a></font>
<br><font color="#330000"><a href="#5.2">5.2. I don't like the translation
for &lt;x> in my language.&nbsp;&nbsp; How can I fix it?</a></font></blockquote>
<h2>
<font color="#330000"><a href="#6">6. Advocacy and Licensing</a></font></h2>
<blockquote><font color="#330000"><a href="#6.1">6.1. Why should I use
nano instead of Pico?</a></font>
<br><font color="#330000"><a href="#6.2">6.2. Why should I use Pico instead
of nano?</a></font>
<br><font color="#330000"><a href="#6.3">6.3. What is so bad about the
Pine license?</a></font>
<br><font color="#330000"><a href="#6.4">6.4. Okay, well what mail program
should I use then?</a></font>
<br><font color="#330000"><a href="#6.5">6.5. Why doesn't UW simply change
their license?</a></font>
<br><font color="#330000"><a href="#6.6">6.6. What if tomorrow UW changes
the license to be truly Free Software?</a></font></blockquote>
<h2>
<font color="#330000"><a href="#7">7. Miscellaneous</a></font></h2>
<blockquote><font color="#330000"><a href="#7.1">7.1. Nano related mailing
lists.</a></font>
<br><font color="#330000"><a href="#7.2">7.2. I want to send the development
team a big load of cash (or just a thank you).</a></font>
<br><font color="#330000"><a href="#7.3">7.3. How do I submit a patch?</a></font>
<br><font color="#330000"><a href="#7.4">7.4. How do I join the development
team?</a></font>
<br><font color="#330000"><a href="#7.5">7.5. Can I have CVS write access?</a></font></blockquote>
<h2>
<a href="#8">8. ChangeLog</a></h2>
<hr WIDTH="100%">
<br>&nbsp;
<h1>
<a NAME="1"></a><font color="#330000">1.&nbsp; General</font></h1>
<h2>
<a NAME="1.1"></a><font color="#330000">1.1 About this FAQ.</font></h2>
<blockquote><font color="#330000">This FAQ was written and is maintained
by Chris Allegretta &lt;<a href="mailto:chrisa@asty.org">chrisa@asty.org</a>>,
who also happens to be the creator of nano.&nbsp;&nbsp; Maybe someone else
will volunteer to maintain this FAQ someday, who knows...</font></blockquote>
<h2>
<a NAME="1.2"></a><font color="#330000">1.2. How do I contribute to it?</font></h2>
<blockquote><font color="#330000">Your best bet is to send it to the nano
email address, <a
href="mailto:nano@nano-editor.org">nano@nano-editor.org</a> and if
it is useful enough it will be included in future versions.</font></blockquote>
<h2>
<a NAME="1.3"></a><font color="#330000">1.3. What is GNU nano?</font></h2>
<blockquote><font color="#330000">GNU Nano is designed to be a free
replacement for the Pico text editor, part of the Pine email suite from <a
href="http://www.washington.edu/pine">The University of
Washington</a>.&nbsp; It aims to "emulate Pico as closely as possible and
perhaps include extra functionality.</font></blockquote>
<h2>
<a NAME="1.4"></a><font color="#330000">1.4. What is the history behind
nano?</font></h2>
<blockquote><font color="#330000">Funny you should ask!</font>
<p><b><font color="#330000">In the beginning...</font></b>
<p><font color="#330000">For years Pine was THE program used to read email
on a Unix system.&nbsp; The Pico text editor is the portion of the program
one would use to compose his or her mail messages.&nbsp; Many beginners
to Unix flocked to Pico and Pine because of their well organized, easy
to use interfaces.&nbsp; With the proliferation of GNU/Linux in the mid to
late 90's, many University students became intimately familiar with the
strengths (and weaknesses) of Pine and Pico.</font>
<p><b><font color="#330000">Then came Debian...</font></b>
<p><font color="#330000">The <a href="http://www.debian.org">Debian GNU/Linux</a>
distribution, known for its strict standards in distributing truly "free"
software (i.e. had no restrictions on redistribution), would not include
a binary package for Pine or Pico.&nbsp; Many people had a serious dilemma:&nbsp;
they loved these programs, but they were not truly free software in the
<a href="http://www.gnu.org/philosophy/free-sw.html">GNU</a>
sense of the word.</font>
<p><b><font color="#330000">The event...</font></b>
<p><font color="#330000">It was in late 1999 when Chris Allegretta (our
hero) was yet again complaining to himself about the less-than-perfect
license Pico was distributed under, the 1000 makefiles that came with
it and how just a few small improvements could make it the Best Editor
in the World (TM).&nbsp; Having been a convert from Slackware to Debian,
he missed having a simple binary package that included Pine and Pico, and
had grown tired of downloading them himself.</font>
<p><font color="#330000">Finally something snapped inside and Chris coded
and hacked like a madman for many hours straight one weekend to make a
(barely usable) Pico clone, at the time called TIP (Tip Isn't Pico).&nbsp;
The program could not be invoked without a filename, could not save files,
had no help menu, spell checker, and so forth.&nbsp; But over time it improved,
and with the help of a few great coders it matured to the (hopefully) stable
state it is today.
<p><font color="#330000">In February 2001, nano has been declared an
official GNU program by Richard Stallman. Nano also reached its first
production release on March 22, 2001.</font></blockquote>
<h2>
<a NAME="1.5"></a><font color="#330000">1.5. Why the name change from TIP?</font></h2>
<blockquote><font color="#330000">On January 10, 2000, TIP was officially
renamed to nano because of a namespace conflict with another program called
'tip'.&nbsp; The original 'tip' program "establishes a full duplex terminal
connection to a remote host", and was included with many older Unix systems
(and newer ones like Solaris). The conflict was not noticed at first because
there is no 'tip' utility included with most GNU/Linux distributions (where
nano was developed).</font></blockquote>
<h2>
<a NAME="1.6"></a><font color="#330000">1.6 What is the current version
of nano?</font></h2>
<blockquote><font color="#330000">The current version of nano *should*
be 1.1.12.&nbsp; Of course you should always check the nano homepage to
see what the latest and greatest version is.</font></blockquote>
<h2>
<a NAME="1.7"></a><font color="#330000">1.7. I want to read the man page
without having to download the program!</font></h2>
<blockquote><font color="#330000">Jeez, demanding, aren't we?&nbsp;&nbsp;
Okay, look <a href="http://www.nano-editor.org/dist/nano.1.html">here</a>.</font></blockquote>
<hr WIDTH="100%">
<h1>
<a NAME="2"></a><font color="#330000">2. Where to get GNU nano</font></h1>
<h2>
<a NAME="2.1"></a><font color="#330000">2.1. FTP and WWW sites that carry
nano.</font></h2>
<blockquote><font color="#330000">The nano distribution can be downloaded
at the following fine web and ftp sites:</font>
<ul>
<li>
<font color="#330000"><a href="http://www.nano-editor.org/dist">http://www.nano-editor.org/dist</a></font></li>
<li>
<font color="#330000"><a href="http://www.ewtoo.org/~astyanax/nano/dist">http://www.ewtoo.org/~astyanax/nano/dist</a></font></li>
<li>
<font color="#330000"><a href="ftp://ftp.gnu.org/pub/gnu/nano">ftp://ftp.gnu.org/pub/gnu/nano</a></font></li>
</ul>
<body text="#330000" bgcolor="#ffffff" link="#0000ef" vlink="#51188e" alink="#ff0000">
<h1>The nano FAQ</h1>
<h2>Table of Contents</h2>
<h2><a href="#1">1. General</a></h2>
<blockquote><p><a href="#1.1">1.1 About this FAQ</a><br>
<a href="#1.2">1.2. How do I contribute to it?</a><br>
<a href="#1.3">1.3. What is GNU nano?</a><br>
<a href="#1.4">1.4. What is the history behind nano?</a><br>
<a href="#1.5">1.5. Why the name change from TIP?</a><br>
<a href="#1.6">1.6. What is the current version of nano?</a><br>
<a href="#1.7">1.7. I want to read the manpage without having to download the program!</a></p></blockquote>
<h2><a href="#2">2. Where to get GNU nano.</a></h2>
<blockquote><p><a href="#2.1">2.1. FTP and WWW sites that carry nano.</a><br>
<a href="#2.2">2.2. RedHat and derivatives (.rpm) packages.</a><br>
<a href="#2.3">2.3. Debian (.deb) packages.</a><br>
<a href="#2.4">2.4. By CVS (for the brave).</a></p></blockquote>
<h2><a href="#3">3. Installation and Configuration</a></h2>
<blockquote><p><a href="#3.1">3.1. How do I install the RPM or DEB package?</a><br>
<a href="#3.2">3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</a><br>
<a href="#3.3">3.3. Why does everything go into /usr/local?</a><br>
<a href="#3.4">3.4. I get errors about 'bindtextdomain','gettext' and/or 'gettextdomain'. What can I do about it?</a><br>
<a href="#3.5">3.5. Nano should automatically run strip on the binary when installing it!</a><br>
<a href="#3.6">3.6. How can I make the executable smaller? This is too bloated!</a><br>
<a href="#3.7">3.7. Tell me more about this multibuffer stuff!</a><br>
<a href="#3.8">3.8. How do I make a .nanorc file that nano will read when I start it?</a></p></blockquote>
<h2><a href="#4">4. Running</a></h2>
<blockquote><p><a href="#4.1">4.1. Ack!&nbsp; My backspace/delete/enter/double bucky/meta key doesn't seem to work!&nbsp; What can I do?</a><br>
<a href="#4.2">4.2. Nano crashes when I type &lt;insert keystroke here&gt;!</a><br>
<a href="#4.3">4.3. Nano crashes when I resize my window. How can I fix that?</a><br>
<a href="#4.4">4.4. Why does nano show ^\ in the shortcut list instead of ^J?</a><br>
<a href="#4.5">4.5. When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</a><br>
<a href="#4.6">4.6. I get the message &quot;NumLock glitch detected. Keypad will malfunction with NumLock off.&quot; What gives?</a><br>
<a href="#4.7">4.7. How do I make nano my default editor (in Pine, mutt, etc.)?</a></p></blockquote>
<h2><a href="#5">5. Internationalization</a></h2>
<blockquote><p><a href="#5.1">5.1. There's no translation for my language!</a><br>
<a href="#5.2">5.2. I don't like the translation for &lt;x&gt; in my language. How can I fix it?</a></p></blockquote>
<h2><a href="#6">6. Advocacy and Licensing</a></h2>
<blockquote><p><a href="#6.1">6.1. Why should I use nano instead of Pico?</a><br>
<a href="#6.2">6.2. Why should I use Pico instead of nano?</a><br>
<a href="#6.3">6.3. What is so bad about the Pine license?</a><br>
<a href="#6.4">6.4. Okay, well what mail program should I use then?</a><br>
<a href="#6.5">6.5. Why doesn't UW simply change their license?</a><br>
<a href="#6.6">6.6. What if tomorrow UW changes the license to be truly Free Software?</a></p></blockquote>
<h2><a href="#7">7. Miscellaneous</a></h2>
<blockquote><p><a href="#7.1">7.1. Nano related mailing lists.</a><br>
<a href="#7.2">7.2. I want to send the development team a big load of cash (or just a thank you).</a><br>
<a href="#7.3">7.3. How do I submit a patch?</a><br>
<a href="#7.4">7.4. How do I join the development team?</a><br>
<a href="#7.5">7.5. Can I have CVS write access?</a></p></blockquote>
<h2><a href="#8">8. ChangeLog</a></h2>
<hr width="100%">
<h1><a name="1"></a>1. General</h1>
<h2><a name="1.1"></a>1.1 About this FAQ</h2>
<blockquote><p>This FAQ was written and is maintained by Chris Allegretta &lt;<a href="mailto:chrisa@asty.org">chrisa@asty.org</a>&gt;, who also happens to be the creator of nano. Maybe someone else will volunteer to maintain this FAQ someday, who knows...</p></blockquote>
<h2><a name="1.2"></a>1.2. How do I contribute to it?</h2>
<blockquote><p>Your best bet is to send it to the nano email address, <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a> and if it is useful enough it will be included in future versions.</p></blockquote>
<h2><a name="1.3"></a>1.3. What is GNU nano?</h2>
<blockquote><p>GNU nano is designed to be a free replacement for the Pico text editor, part of the Pine email suite from <a href="http://www.washington.edu/pine">The University of Washington</a>. It aims to &quot;emulate Pico as closely as possible and perhaps include extra functionality&quot;.</p></blockquote>
<h2><a name="1.4"></a>1.4. What is the history behind nano?</h2>
<blockquote><p>Funny you should ask!</p>
<p><b>In the beginning...</b></p>
<p>For years Pine was THE program used to read email on a Unix system. The Pico text editor is the portion of the program one would use to compose his or her mail messages. Many beginners to Unix flocked to Pico and Pine because of their well organized, easy to use interfaces. With the proliferation of GNU/Linux in the mid to late 90's, many University students became intimately familiar with the strengths (and weaknesses) of Pine and Pico.</p>
<p><b>Then came Debian...</b></p>
<p>The <a href="http://www.debian.org">Debian GNU/Linux</a> distribution, known for its strict standards in distributing truly &quot;free&quot; software (i.e. software with no restrictions on redistribution), would not include a binary package for Pine or Pico. Many people had a serious dilemma: they loved these programs, but they were not truly free software in the <a href="http://www.gnu.org/philosophy/free-sw.html">GNU</a> sense of the word.</p>
<p><b>The event...</b></p>
<p>It was in late 1999 when Chris Allegretta (our hero) was yet again complaining to himself about the less-than-perfect license Pico was distributed under, the 1000 makefiles that came with it and how just a few small improvements could make it the Best Editor in the World (TM). Having been a convert from Slackware to Debian, he missed having a simple binary package that included Pine and Pico, and had grown tired of downloading them himself.</p>
<p>Finally something snapped inside and Chris coded and hacked like a madman for many hours straight one weekend to make a (barely usable) Pico clone, at the time called TIP (Tip Isn't Pico). The program could not be invoked without a filename, could not save files, had no help menu, spell checker, and so forth. But over time it improved, and with the help of a few great coders it matured to the (hopefully) stable state it is today.</p>
<p>In February 2001, nano was declared an official GNU program by Richard Stallman. Nano also reached its first production release on March 22, 2001.</p></blockquote>
<h2><a name="1.5"></a>1.5. Why the name change from TIP?</h2>
<blockquote><p>On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program &quot;establishes a full duplex terminal connection to a remote host&quot;, and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).</p></blockquote>
<h2><a name="1.6"></a>1.6. What is the current version of nano?</h2>
<blockquote><p>The current version of nano *should* be 1.1.12. Of course you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
<h2><a name="1.7"></a>1.7. I want to read the man page without having to download the program!</h2>
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v1.1/nano.1.html">here</a>.</p></blockquote>
<hr width="100%">
<h1><a name="2"></a>2. Where to get GNU nano.</h1>
<h2><a name="2.1"></a>2.1. FTP and WWW sites that carry nano.</h2>
<blockquote><p>The nano distribution can be downloaded at the following fine web and ftp sites:</p>
<ul>
<li><a href="http://www.nano-editor.org/dist">http://www.nano-editor.org/dist</a></li>
<li><a href="http://www.ewtoo.org/~astyanax/nano/dist">http://www.ewtoo.org/~astyanax/nano/dist</a></li>
<li><a href="ftp://ftp.gnu.org/pub/gnu/nano">ftp://ftp.gnu.org/pub/gnu/nano</a></li>
</ul>
</blockquote>
<h2>
<a NAME="2.2"></a><font color="#330000">2.2. Redhat and derivatives (.rpm)
packages.</font></h2>
<h2><a name="2.2"></a>2.2. RedHat and derivatives (.rpm) packages.</h2>
<blockquote>
<ul>
<li>
<font color="#330000"><a href="http://www.nano-editor.org/dist/RPMS">http://www.nano-editor.org/dist/RPMS</a></font></li>
<li>
<font color="#330000"><a href="http://www.ewtoo.org/~astyanax/nano/dist/RPMS">http://www.ewtoo.org/~astyanax/nano/dist/RPMS</a></font></li>
</ul>
<font color="#330000">Additionally, check out the Redhat contribs section
at:</font>
<ul>
<li>
<font color="#330000"><a href="http://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386">http://metalab.unc.edu/pub/Linux/distributions/redhat/contrib/libc6/i386</a></font></li>
<li>
<font color="#330000"><a href="ftp://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386">ftp://metalab.unc.edu/pub/Linux/distributions/redhat/contrib/libc6/i386</a></font></li>
</ul>
<ul>
<li><a href="http://www.nano-editor.org/dist/v1.0/RPMS">http://www.nano-editor.org/dist/v1.0/RPMS</a></li>
<li><a href="http://www.ewtoo.org/~astyanax/nano/dist/v1.0/RPMS">http://www.ewtoo.org/~astyanax/nano/dist/v1.0/RPMS</a></li>
</ul>
<p>Additionally, check out the RedHat contribs section at:</p>
<ul>
<li><a href="http://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386">http://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386</a></li>
<li><a href="ftp://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386">ftp://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386</a></li>
</ul>
</blockquote>
<h2>
<a NAME="2.3"></a><font color="#330000">2.3. Debian (.deb) packages.</font></h2>
<blockquote><font color="#330000">For Debian users, you can check out the
current nano packages for:</font>
<ul>
<li>
<font color="#330000"><a href="http://www.debian.org/Packages/stable/editors/nano.html">stable</a></font></li>
<li>
<font color="#330000"><a href="http://www.debian.org/Packages/testing/editors/nano.html">testing</a></font></li>
<li>
<font color="#330000"><a href="http://www.debian.org/Packages/unstable/editors/nano.html">unstable</a></font></li>
</ul>
<p><font color="#330000">You can also have a look at the</font>
<font color="#330000"><a href="ftp://ftp.debian.org/debian/pool/main/n/nano/">Package Pool</a> to see all the available binary and source packages.</font></p>
<font color="#330000">Note that versions &lt; 0.9.10 are probably not for
those wanting to get serious work done, so if you are using Debian 2.2, check
that you have updated to 2.2r3, which comes with nano 0.9.23. If you're
tracking unstable, you probably have the newest version already.</font></blockquote>
<h2>
<a NAME="2.4"></a><font color="#330000">2.4. By CVS (for the brave).</font></h2>
<blockquote><font color="#330000">For the 'bleeding edge' current version
of nano, you can use CVS to download the current source code.&nbsp; <b>Note:</b>
believe it or not, by downloading code that has not yet stabilized into
an official release, there could quite possibly be bugs, in fact the code
may not even compile!&nbsp; Anyway, see <a href="http://savannah.gnu.org/cvs/?group_id=1025">the
nano CVS page</a> for info on anonymous CVS access to the nano source.</font></blockquote>
<hr WIDTH="100%">
<h1>
<a NAME="3"></a><font color="#330000">3. Installation and Configuration</font></h1>
<h2>
<a NAME="3.1"></a><font color="#330000">3.1. How do install the RPM or
DEB package?</font></h2>
<blockquote><font color="#330000">It's simple really!&nbsp; As root, type
<b>rpm
-Uvh nano-x.y.z-1.i386.rpm</b> if you have a Redhat-ish system or
<b>dpkg
-i nano_x.y.z-1.deb</b> if you have a Debian-ish system, where
<b>x.y.z</b>
is the release of nano.&nbsp; There are other programs to install packages,
and if you wish to use those, knock yourself out.</font></blockquote>
<h2>
<a NAME="3.2"></a><font color="#330000">3.2. Compiling from source: WHAT
THE HECK DO I DO NOW?</font></h2>
<blockquote><font color="#330000">Okay, take a deep breath, this really
isn't hard.&nbsp; Unpack the nano source with a command like:</font>
<p><b><font color="#330000">tar -zxvf nano-x.y.z.tar.gz</font></b>
<p><font color="#330000">If you get error messages about the -z option,
try this:</font>
<p><b><font color="#330000">gzip -dc nano-x.y.z.tar.gz | tar xvf -</font></b>
<p><font color="#330000">(again, where x.y.z is the version number in question).&nbsp;
Then you need to run configure with any options you might want (if any).</font>
<p><font color="#330000">The average case is this:</font>
<p><b><font color="#330000">cd nano-x.y.z/</font></b>
<br><b><font color="#330000">./configure</font></b>
<br><b><font color="#330000">make</font></b>
<br><font color="#330000"><b>make install </b>(as root, of course)</font></blockquote>
<h2>
<a NAME="3.3"></a><font color="#330000">3.3. Why does everything go into
/usr/local?</font></h2>
<blockquote><font color="#330000">Well, that's what the <b>configure</b>
script defaults to.&nbsp; If you wish to change this, simply do this:</font>
<p><b><font color="#330000">./configure --prefix=/usr</font></b>
<p><font color="#330000">to put nano into /usr/bin when you run <b>make
install</b>.</font></blockquote>
<h2>
<a NAME="3.4"></a><font color="#330000">3.4. I get errors about 'bindtextdomain',
'gettext' and/or 'gettextdomain'.&nbsp; What can I do about it?</font></h2>
<blockquote><font color="#330000">Try doing a <b>./configure --with-included-gettext</b>
and see if that solves your problem.&nbsp; You may need to do a <b>make
clean ; make</b> to get it to work fully.</font></blockquote>
<h2>
<a NAME="3.5"></a><font color="#330000">3.5. Nano should automatically
run strip on the binary when installing it!</font></h2>
<blockquote><font color="#330000">Actually, it does, but you have to use
<b>make install-strip</b>. The default make install does not, and will
not, run strip automatically.</font></blockquote>
<h2>
<a NAME="3.6"></a><font color="#330000">
3.6. How can I make the executable smaller? This is too
bloated!</font></h2>
<blockquote><font color="#330000">Actually, there are several parts of the
editor that can be disabled. You can pass arguments to the
<b>configure</b> script that disable certain features. Here's a brief
list:
<pre>
<b>--disable-tabcomp</b> Disables tab completion code for a smaller binary
<b>--disable-justify</b> Disable justify/unjustify function
<b>--disable-speller</b> Disables spell checker function
<b>--disable-help</b> Disables help function (^G)
<b>--disable-browser</b> Disables mini file browser
<b>--disable-wrapping</b> Disables all wrapping of text (and -w flag)
<b>--disable-mouse</b> Disables mouse support (and -m flag)
<b>--disable-operatingdir</b> Disable setting of operating directory
</pre><br>
There's also the <b>--enable-tiny</b> option which disables everything
above, as well as some larger chunks of the program (like the marker code
that you use Control-^ to select with). Also, if you know you aren't
going to be using other languages you can use <b>--disable-nls</b> to
disable internationalization and save a few K to a few dozen K depending
on if you have locale support on your system. And finally there's always
good old <b>strip</b> to strip all debugging code and code that exists in
libraries on your system.
<p>If, in the other hand, you can't live without bells and whistles, you could
try:
<pre>
<b>--enable-extra</b> Enable extra functions, including easter eggs
<b>--enable-nanorc</b> Enable use of .nanorc file
<b>--enable-color</b> Enables color and syntax highlighting
<b>--enable-multibuffer</b> Enables having multiple file buffers open
</font></blockquote>
<h2>
<a NAME="3.7"></a><font color="#330000">
3.7. Tell me more about this multibuffer stuff!</font></h2>
<blockquote><font color="#330000"> To use multiple file buffers, you must
be using nano 1.1.12 or newer, and you must have configured nano with
<b>--enable-multibuffer</b> or <b>--enable-extra</b> (use nano -V to check).
Then when you want to enable inserting a file into its own buffer instead of
into the current file, just hit <b>Meta-F</b>, then insert the file as normal
with <b>^R</b>. If you always want files to be loaded into their own buffers,
use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano. <P>
You can move between the buffers you have open with the <b>Meta-&lt;</b> and
<b>Meta-&gt;</b> keys, or more easily with <b>Meta-,</b> and <b>Meta-.</b>
(clear as mud, right? =-). When you have more than one file buffer open,
the ^X shortcut will say "Close", instead of the normal "Exit" when only one
buffer is open.
</font></blockquote>
<h2>
<a NAME="3.8"></a><font color="#330000">
3.8. How do I make a .nanorc file that nano will read when I start it?</font></h2>
<blockquote><font color="#330000"> It's not hard at all! But, your version
of nano must have been compiled with <b>--enable-nanorc</b>, and again must
be version 1.1.12 or newer (use nano -V to check your version and compiled
features). Then simply copy the <b>nanorc.sample</b>
that came with the nano source or your nano package (most likely in
/usr/doc/nano) to .nanorc in your home directory. If you didn't get one,
the syntax is simple. Flags are turned on and off by using the word
<b>set</b> and the getopt_long flag for the feature, for example "set
pico" or "set nowrap". </font></blockquote> <hr WIDTH="100%">
<h1><a NAME="4"></a><font color="#330000">4. Running</font></h1>
<h2>
<a NAME="4.1"></a><font color="#330000">4.1. Ack!&nbsp; My backspace/delete/enter/double
bucky/meta key doesn't seem to work!&nbsp; What can I do?</font></h2>
<blockquote><font color="#330000">Try setting your $TERM variable to 'vt100'.&nbsp;
Nano doesn't yet support every term entry under the sun.</font>
<p><font color="#330000">Bourne shell users (like bash): <b>export TERM=vt100</b></font>
<br><font color="#330000">C Shell users (tcsh and csh): <b>setenv TERM
vt100</b></font></blockquote>
<h2>
<a NAME="4.2"></a><font color="#330000">4.2. Nano crashes when I type &lt;insert
keystroke here>!</font></h2>
<blockquote><font color="#330000">If you aren't trying some bizarre keystroke
combination with some bizarre $TERM entry, chances are you have found a
bug.&nbsp;&nbsp; You are welcome to submit it to the
<a href="mailto:nano-devel@gnu.org">nano-devel</a> list or
to <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</font></blockquote>
<h2>
<a NAME="4.3"></a><font color="#330000">4.3. Nano crashes when I resize
my window.&nbsp;&nbsp; How can I fix that?</font></h2>
<blockquote><font color="#330000">Older versions of nano had this problem,
please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12
is recommended).</font></blockquote>
<h2>
<a NAME="4.4"></a><font color="#330000">4.4. Why does nano show ^\ in the
shortcut list instead of ^J?</font></h2>
<blockquote><font color="#330000">The help (^G) and justify (^J) function
were among the last to be written.&nbsp; To show the improvements that
nano had over Pico (goto line # and replace), ^_ and ^\ were put on the
shortcut list.&nbsp;&nbsp; Later, ^G came back in place of ^_ as it proved
to be very valuable for new UNIX users. If you use the <b>-p</b> option to
nano (or hit Meta-P) you will get the same shortcuts at the bottom as
Pico.</font></blockquote>
<h2>
<a name="4.5"><font color="#330000">4.5. When I type in a search
string, the string I last searched for is already in front of my
cursor! What happened?!</font></h2>
<blockquote><font color="#330000">In nano version 0.9.20, the default is
to have a completely consistent user interface across all user input
functions. This means that regardless of whether you're being asked for
a filename to insert or write, or a string to search for, the
previous value is already inserted before the cursor. If you prefer the
old behavior, use the Pico emulation mode (-p or --pico) or just hit
Meta-P while in nano (see the ^G help text for more
details).</font></blockquote>
<h2>
<a NAME="4.6"></a>I get the message "NumLock glitch detected. Keypad
will malfunction with NumLock off." What gives?</h2>
<blockquote>
Nano (actually almost all console editors do) has issues when cycling
the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When
you switch NumLock on to off, you put the terminal into an "application
mode" that changes what sequences are sent by the keypad. These sequences
vary sufficiently from terminal to terminal that it is nearly impossible
to work around them from within nano.
<br><br>
In a nutshell, if you want to be able to use the keypad with the arrow and
page up/down functionality, you have to exit nano and reset your terminal
(presumably with "reset" or "stty sane" or similar) and then run nano
again with NumLock off. If you know an easier way to restore "normal
mode", please mail <A href="mailto:nano@nano-editor.org">nano@nano-editor.org</A>.
<br>&nbsp;</blockquote>
<h2>
<a NAME="4.7"></a>4.7. How do I make nano my default editor (in Pine,
mutt, etc)?</h2>
<blockquote>You need to make nano your $EDITOR.&nbsp; If you want this
to be saved, you should put a line like this in your <b>.bashrc</b> if
you use bash (or <b>.zshrc</b> if you believe in zsh):
<p><b>export EDITOR=/usr/local/bin/nano</b>
<p>or if you use tcsh put this in your <b>.cshrc</b> file:
<p><b>setenv EDITOR /usr/local/bin/nano</b>
<p>Change /usr/local/bin/nano to wherever nano is installed in your system.&nbsp;
Type which nano to find out. This will not take effect until the next time
you login.&nbsp; So log out and back in again.
<p>Then on top that if you use Pine you must go into setup (type <b>S</b>
at the main menu), then configure (type <b>C</b>).&nbsp; Hit enter on the
lines that say:
<p><b>[ ]&nbsp; enable-alternate-editor-cmd</b>
<br><b>[ ]&nbsp; enable-alternate-editor-implicitly</b>
<p>Then exit (<b>E</b>) and select Yes (<b>Y</b>).
<p>Mutt users should see an effect immediately the next time you log in,
no further configuration is needed.&nbsp; However, if you want to let people
know you use nano to compose your email messages, you can put a line like
this in your <b>.muttrc</b>:
<p><b>my_hdr X-Composer: nano x.y.z</b>
<p>Again, replace x.y.z with the version of nano you use.
<br>&nbsp;</blockquote>
<hr WIDTH="100%">
<h1>
<a NAME="5"></a><font color="#330000">5. Internationalization</font></h1>
<h2>
<a NAME="5.1"></a><font color="#330000">5.1. There's no translation for
my language!</font></h2>
<blockquote><font color="#330000">On June of 2001, GNU nano entered the
<a href="www.iro.umontreal.ca/contrib/po/HTML">Free Translation Project</a>
and since then, translations should be managed from there.
<p>If there isn't a translation for your language, you could ask
<a href="http://www.iro.umontreal.ca/contrib/po/HTML/teams.html">your language
team</a> to tranlate nano, or better still, join your team and do it yourself.
Joining a team is easy. You just need to ask the
<a href="mailto:translation@iro.umontreal.ca">TP coordinator</a> to add you
to your team, and send a <a href="http://www.iro.umontreal.ca/contrib/po/HTML/disclaim.html">translation disclaimer to the FSF</a> (this is necessary as
nano is an official GNU package, but it does <strong>not</strong> mean that
you transfer the rights of your work to the FSF, it's just so the FSF can
legaly manage them).</p>
<p>In any case, translating nano is very easy.&nbsp; Just grab the
<b>nano.pot</b> file from the latest and greatest nano distribution
(it's in the <b>po/</b> directory) and translate each line into your native
language on the <b>msgstr</b> line.&nbsp; When you're done, you should
send it to the TP's central po repository.
<h2>
<a NAME="5.2"></a><font color="#330000">5.2. I don't like the translation
for &lt;x> in my language.&nbsp;&nbsp; How can I fix it?</font></h2>
<blockquote><font color="#330000">The best way would probably be to e-mail
the person listed in the <code>Last-Translator:</code> field in
<b>&lt;your_language&gt;.po</b> file with your suggested corrections and
they can make the changes reach the nano devel list.</font></blockquote>
<hr WIDTH="100%">
<h1>
<a NAME="6"></a><font color="#330000">6. Advocacy and Licensing</font></h1>
<h2>
<a NAME="6.1"></a><font color="#330000">6.1. Why should I use nano instead
of Pico?</font></h2>
<blockquote><font color="#330000">There are many reasons to use nano instead
of Pico, a more complete list can be found at the <a href="http://www.nano-editor.org">nano
homepage</a>.</font></blockquote>
<h2>
<a NAME="6.2"></a><font color="#330000">6.2. Why should I use Pico instead
of nano?</font></h2>
<blockquote>Again, check out the <a href="http://www.nano-editor.org">nano
homepage</a> for a good summary of reasons.&nbsp; It really is a matter
of personal preference as to which editor you should use.&nbsp; If you're
the type of person who likes using the original version of a program, then
Pico is the editor for you.&nbsp;&nbsp; If you're looking for a few more
features and a 'better' license as far as adding your own changes (sacrificing
mailer integration with Pine), nano is the way to go.
</blockquote>
<h2>
<a NAME="6.3"></a><font color="#330000">6.3. What is so bad about the Pine
license?</font></h2>
<blockquote><font color="#330000">The U of W license for Pine and
Pico is not considered truly Free Software according to both the Free
Software Foundation and the the <a
href="http://www.debian.org/social_contract#guidelines">Debian
Free Software Guidelines</a>.&nbsp; The main problem regards the
limitations on distributing derived works: according to UW, you can
distribute their software, and you can modify it, but you can not do
both, i.e. distribute modified binaries.</blockquote>
<h2>
<a NAME="6.4"></a><font color="#330000">6.4. Okay, well what mail program
should I use then?</font></h2>
<blockquote><font color="#330000"> If you are looking to use a Free
Software program similar to Pine and emacs is not your thing, you should
definitely take a look at <a href="http://www.mutt.org">mutt</a>.&nbsp; It
is a full-screen, console based mail program that actually has a lot more
flexibility than Pine, but has a keymap included in the distribution that
allows you to use the same keystrokes as Pine would to send and receive
mail.&nbsp; It's also licensed under the GPL.</font></blockquote>
<h2>
<a NAME="6.5"></a><font color="#330000">6.5. Why doesn't UW simply change
their license?</font></h2>
<blockquote><font color="#330000">You're really not asking the right person
here.&nbsp; I (Chris) waited a long time to see if UW would change their
license because of the amount of high quality software being released and
developed under the GPL without being taken advantage of by malicious corporate
entities or other baddies, but no such luck so far.</font></blockquote>
<h2>
<a NAME="6.6"></a><font color="#330000">6.6. What if tomorrow UW changes
the license to be truly Free Software?</font></h2>
<blockquote><font color="#330000">Honestly nothing would make me happier
than to see that happen.&nbsp; Nano would continue to be developed independently
until such time as Pico had all the features nano did or the projects merged.&nbsp;
That just does not seem very likely given that there has been no sign of
any changes in the past few years in a positive direction.</font></blockquote>
<hr WIDTH="100%">
<h1>
<a NAME="7"></a><font color="#330000">7. Miscellaneous</font></h1>
<h2>
<a NAME="7.1"></a><font color="#330000">7.1. Nano related mailing lists.</font></h2>
<blockquote><font color="#330000">There are three mailing lists for nano
hosted at <a href="http://savannah.gnu.org">Savannah</a>, info-nano, help-nano
and nano-devel.&nbsp; Nano-announce is a very low traffic list where new
versions of nano are announced (surprise!)&nbsp; Nano-devel is a normally
low, sometimes high traffic list for discussing the present and future
development of nano.&nbsp; Help-nano is for getting help with the editor
without needing to hear all of the development issues surrunding it.
&nbsp; Here are links to where you can sign up for
a given list:</font><font color="#330000"></font>
<p><font color="#330000">info-nano - <a href="
http://mail.gnu.org/mailman/listinfo/info-nano">
http://mail.gnu.org/mailman/listinfo/info-nano</a></font>
<br>
<font color="#330000">help-nano -
<a href="http://mail.gnu.org/mailman/listinfo/help-nano">
http://mail.gnu.org/mailman/listinfo/help-nano</a></font>
<br>
<font color="#330000">nano-devel -
<a href="http://mail.gnu.org/mailman/listinfo/nano-devel">
http://mail.gnu.org/mailman/listinfo/nano-devel</a></font>
</blockquote>
<h2>
<a NAME="7.2"></a><font color="#330000">7.2. I want to send the development
team a big load of cash (or just a thank you).</font></h2>
<blockquote><font color="#330000">That's fine.&nbsp; Send it <a href="mailto:nano-devel@gnu.org">our
way</a>!&nbsp; Better yet, fix a <a href="http://www.nano-editor.org/dist/BUGS">bug</a>
in the program or implement a <a href="http://www.nano-editor.org/dist/TODO">cool
feature</a> and send us that instead (though cash is fine too).</font></blockquote>
<h2>
<a NAME="7.3"></a><font color="#330000">7.3. How do I submit a patch?</font></h2>
<blockquote><font color="#330000">See Section <a href="#7.2">7.2</a>.</font></blockquote>
<h2>
<a NAME="7.4"></a><font color="#330000">7.4. How do I join the development
team?</font></h2>
<blockquote><font color="#330000">The easiest way is to consistently send
in good patches that add some needed functionality, fix a bug or two and/or
make the program more optimized/efficient.&nbsp; Then ask nicely and you
will probably be added to the Savannah development list and be given
CVS write after awhile.&nbsp; There is a lot of responsibility that goes
along with being a team member, so don't think it's just something to add
to your resume.</font></blockquote>
<h2>
<a NAME="7.5"></a><font color="#330000">7.5. Can I have CVS write access?</font></h2>
<blockquote><font color="#330000">Re-read Section </font><a href="#7.4">7.4</a><font color="#330000">
and you should know the answer.</font></blockquote>
<h2>
<a NAME="8"></a><font color="#330000">8. ChangeLog</font>
</h2>
<blockquote>2002/09/10 - Another typo fix (DLR).</blockquote>
<blockquote>2002/05/15 - Typo fix (DLR).</blockquote>
<blockquote>2001/12/26 - Misc. fixes (Aaron S. Hawley, DLR).</blockquote>
<blockquote>2001/10/02 - Update for Free Translation Project.</blockquote>
<blockquote>2001/10/02 - Assorted fixes, Debian additions.</blockquote>
<blockquote>2001/06/30 - Silly typo fix.</blockquote>
<blockquote>2001/05/05 - Spelling fixes by David Lawrence Ramsey.</blockquote>
<blockquote>2001/05/02 - Misc fixes.</blockquote>
<blockquote>2001/03/26 - Typo fix in an URL.</blockquote>
<blockquote>2001/02/17 - Advocacy updates.</blockquote>
<blockquote>2001/02/15 - Added GNU notes for 0.9.99pre3.</blockquote>
<blockquote>2001/02/06 - Typo fixes.</blockquote>
<blockquote>2001/01/14 - Added note about numlock glitch.</blockquote>
<blockquote>2001/01/10 - Linux --&gt; GNU/Linux.</blockquote>
<blockquote>2001/01/09 - Added "making exe smaller section.</blockquote>
<blockquote>2000/12/19 - Typo and assorted error fixes.</blockquote>
<blockquote>2000/11/28 - Added blurb about make install-strip.</blockquote>
<blockquote>2000/11/19 - Changed Debian frozen to stable.</blockquote>
<blockquote>2000/11/18 - Previous string display (4.5).</blockquote>
<blockquote>2000/09/27 - Moved addresses to nano-editor.org.</blockquote>
<blockquote>2000/06/31 - Initial framework.</blockquote>
<P>
$Id$
<h2><a name="2.3"></a>2.3. Debian (.deb) packages.</h2>
<blockquote><p>Debian users can check out the current nano packages for:</p>
<ul>
<li><a href="http://www.debian.org/Packages/stable/editors/nano.html">stable</a></li>
<li><a href="http://www.debian.org/Packages/testing/editors/nano.html">testing</a></li>
<li><a href="http://www.debian.org/Packages/unstable/editors/nano.html">unstable</a></li>
</ul>
<p>You can also have a look at the <a href="ftp://ftp.debian.org/debian/pool/main/n/nano">Package Pool</a> to see all the available binary and source packages.</p>
<p>Note that versions &lt; 0.9.10 are probably not for those wanting to get serious work done, so if you are using Debian 2.2, check that you have updated to 2.2r3, which comes with nano 0.9.23. If you're tracking unstable, you probably have the newest version already.</p></blockquote>
<h2><a name="2.4"></a>2.4. By CVS (for the brave).</h2>
<blockquote><p>For the 'bleeding edge' current version of nano, you can use CVS to download the current source code. <b>Note:</b> believe it or not, by downloading code that has not yet stabilized into an official release, there could quite possibly be bugs, in fact the code may not even compile! Anyway, see <a href="http://savannah.gnu.org/cvs/?group_id=1025">the nano CVS page</a> for info on anonymous CVS access to the nano source.</p></blockquote>
<hr width="100%">
<h1><a name="3"></a>3. Installation and Configuration</h1>
<h2><a name="3.1"></a>3.1. How do install the RPM or DEB package?</h2>
<blockquote><p>It's simple really! As root, type <b>rpm -Uvh nano-x.y.z-1.i386.rpm</b> if you have a RedHat-ish system or <b>dpkg -i nano_x.y.z-1.deb</b> if you have a Debian-ish system, where <b>x.y.z</b> is the release of nano. There are other programs to install packages, and if you wish to use those, knock yourself out.</p></blockquote>
<h2><a name="3.2"></a>3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</h2>
<blockquote><p>Okay, take a deep breath, this really isn't hard. Unpack the nano source with a command like:</p>
<p><b>tar -zxvf nano-x.y.z.tar.gz</b></p>
<p>If you get error messages about the -z option, try this:</p>
<p><b>gzip -dc nano-x.y.z.tar.gz | tar xvf -</b></p>
<p>(again, where x.y.z is the version number in question). Then you need to run configure with any options you might want (if any).</p>
<p>The average case is this:</p>
<p><b>cd nano-x.y.z/</b><br>
<b>./configure</b><br>
<b>make</b><br>
<b>make install</b> (as root, of course)</p></blockquote>
<h2><a name="3.3"></a>3.3. Why does everything go into /usr/local?</h2>
<blockquote><p>Well, that's what the <b>configure</b> script defaults to. If you wish to change this, simply do this:</p>
<p><b>./configure --prefix=/usr</b></p>
<p>to put nano into /usr/bin when you run <b>make install</b>.</p></blockquote>
<h2><a name="3.4"></a>3.4. I get errors about 'bindtextdomain', 'gettext' and/or 'gettextdomain'. What can I do about it?</h2>
<blockquote><p>Try doing a <b>./configure --with-included-gettext</b> and see if that solves your problem. You may need to do a <b>make clean; make</b> to get it to work fully.</p></blockquote>
<h2><a name="3.5"></a>3.5. Nano should automatically run strip on the binary when installing it!</h2>
<blockquote><p>Actually, it does, but you have to use <b>make install-strip</b>. The default make install does not, and will not, run strip automatically.</p></blockquote>
<h2><a name="3.6"></a>3.6. How can I make the executable smaller? This is too bloated!</h2>
<blockquote><p>Actually, there are several parts of the editor that can be disabled. You can pass arguments to the <b>configure</b> script that disable certain features. Here's a brief list:</p>
<pre>
<b>--disable-tabcomp</b> Disables tab completion code for a smaller binary
<b>--disable-justify</b> Disable justify/unjustify function
<b>--disable-speller</b> Disables spell checker function
<b>--disable-help</b> Disables help function (^G)
<b>--disable-browser</b> Disables mini file browser
<b>--disable-wrapping</b> Disables all wrapping of text (and -w flag)
<b>--disable-mouse</b> Disables mouse support (and -m flag)
<b>--disable-operatingdir</b> Disable setting of operating directory</pre>
<p>There's also the <b>--enable-tiny</b> option which disables everything above, as well as some larger chunks of the program (like the marker code that you use Control-^ to select with). Also, if you know you aren't going to be using other languages you can use <b>--disable-nls</b> to disable internationalization and save a few K to a few dozen K depending on if you have locale support on your system. And finally there's always good old <b>strip</b> to strip all debugging code and code that exists in libraries on your system.</p>
<p>If, on the other hand, you can't live without bells and whistles, you could try:</p>
<pre>
<b>--enable-extra</b> Enable extra functions, including easter eggs
<b>--enable-nanorc</b> Enable use of .nanorc file
<b>--enable-color</b> Enables color and syntax highlighting
<b>--enable-multibuffer</b> Enables having multiple file buffers open</pre></blockquote>
<h2><a name="3.7"></a>3.7. Tell me more about this multibuffer stuff!</h2>
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.12 or newer, and you must have configured nano with <b>--enable-multibuffer</b> or <b>--enable-extra</b> (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit <b>Meta-F</b>, then insert the file as normal with <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano. </p>
<p>You can move between the buffers you have open with the <b>Meta-&lt;</b> and <b>Meta-&gt;</b> keys, or more easily with <b>Meta-,</b> and <b>Meta-.</b> (clear as mud, right? =-). When you have more than one file buffer open, the ^X shortcut will say &quot;Close&quot;, instead of the normal &quot;Exit&quot; when only one buffer is open.</p></blockquote>
<h2><a name="3.8"></a>3.8. How do I make a .nanorc file that nano will read when I start it?</h2>
<blockquote>It's not hard at all! But, your version of nano must have been compiled with <b>--enable-nanorc</b>, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the <b>nanorc.sample</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word <b>set</b> and the getopt_long flag for the feature, for example &quot;set pico&quot; or &quot;set nowrap&quot;.</blockquote>
<hr width="100%">
<h1><a name="4"></a>4. Running</h1>
<h2><a name="4.1"></a>4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</h2>
<blockquote><p>Try setting your $TERM variable to 'vt100'. Nano doesn't yet support every term entry under the sun.</p>
<p>Bourne shell users (like bash): <b>export TERM=vt100</b><br>
C Shell users (tcsh and csh): <b>setenv TERM vt100</b></p></blockquote>
<h2><a name="4.2"></a>4.2. Nano crashes when I type &lt;insert keystroke here&gt;!</h2>
<blockquote><p>If you aren't trying some bizarre keystroke combination with some bizarre $TERM entry, chances are you have found a bug. You are welcome to submit it to the <a href="mailto:nano-devel@gnu.org">nano-devel</a> list or to <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</p></blockquote>
<h2><a name="4.3"></a>4.3. Nano crashes when I resize my window. How can I fix that?</h2>
<blockquote><p>Older versions of nano had this problem, please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12 is recommended).</p></blockquote>
<h2><a name="4.4"></a>4.4. Why does nano show ^\ in the shortcut list instead of ^J?</h2>
<blockquote><p>The help (^G) and justify (^J) function were among the last to be written. To show the improvements that nano had over Pico (go to line # and replace), ^_ and ^\ were put on the shortcut list. Later, ^G came back in place of ^_ as it proved to be very valuable for new Unix users. If you use the <b>-p</b> option to nano (or hit Meta-P) you will get the same shortcuts at the bottom as Pico.</p></blockquote>
<h2><a name="4.5"></a>4.5. When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</h2>
<blockquote><p>In nano version 0.9.20, the default is to have a completely consistent user interface across all user input functions. This means that regardless of whether you're being asked for a filename to insert or write, or a string to search for, the previous value is already inserted before the cursor. If you prefer the old behavior, use the Pico emulation mode (-p or --pico) or just hit Meta-P while in nano (see the ^G help text for more details).</p></blockquote>
<h2><a name="4.6"></a>4.6. I get the message &quot;NumLock glitch detected. Keypad will malfunction with NumLock off.&quot; What gives?</h2>
<blockquote><p>Nano (and actually almost all console editors) has issues when cycling the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When you switch NumLock from on to off, you put the terminal into an &quot;application mode&quot; that changes what sequences are sent by the keypad. These sequences vary sufficiently from terminal to terminal that it is nearly impossible to work around them from within nano.</p>
<p>In a nutshell, if you want to be able to use the keypad with the arrow and page up/down functionality, you have to exit nano and reset your terminal (presumably with &quot;reset&quot; or &quot;stty sane&quot; or similar) and then run nano again with NumLock off. If you know an easier way to restore &quot;normal mode&quot;, please mail <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</p></blockquote>
<h2><a name="4.7"></a>4.7. How do I make nano my default editor (in Pine, mutt, etc.)?</h2>
<blockquote><p>You need to make nano your $EDITOR. If you want this to be saved, you should put a line like this in your <b>.bashrc</b> if you use bash (or <b>.zshrc</b> if you believe in zsh):</p>
<p><b>export EDITOR=/usr/local/bin/nano</b></p>
<p>or if you use tcsh put this in your <b>.cshrc</b> file:</p>
<p><b>setenv EDITOR /usr/local/bin/nano</b></p>
<p>Change /usr/local/bin/nano to wherever nano is installed on your system. Type &quot;which nano&quot; to find out. This will not take effect until the next time you login. So log out and back in again.</p>
<p>Then on top that if you use Pine you must go into setup (type <b>S</b> at the main menu), then configure (type <b>C</b>). Hit enter on the lines that say:</p>
<p><b>[ ] enable-alternate-editor-cmd</b><br>
<b>[ ] enable-alternate-editor-implicitly</b></p>
<p>Then exit (<b>E</b>) and select Yes (<b>Y</b>).</p>
<p>Mutt users should see an effect immediately the next time you log in, no further configuration is needed. However, if you want to let people know you use nano to compose your email messages, you can put a line like this in your <b>.muttrc</b>:</p>
<p><b>my_hdr X-Composer: nano x.y.z</b></p>
<p>Again, replace x.y.z with the version of nano you use.</p></blockquote>
<hr width="100%">
<h1><a name="5"></a>5. Internationalization</h1>
<h2><a name="5.1"></a>5.1. There's no translation for my language!</h2>
<blockquote><p>On June of 2001, GNU nano entered the <a href="http://www.iro.umontreal.ca/contrib/po/HTML">Free Translation Project</a> and since then, translations should be managed from there.</p>
<p>If there isn't a translation for your language, you could ask <a href="http://www.iro.umontreal.ca/contrib/po/HTML/teams.html">your language team</a> to translate nano, or better still, join your team and do it yourself. Joining a team is easy. You just need to ask the <a href="mailto:translation@iro.umontreal.ca">TP coordinator</a> to add you to your team, and send a <a href="http://www.iro.umontreal.ca/contrib/po/HTML/disclaim.html">translation disclaimer to the FSF</a> (this is necessary as nano is an official GNU package, but it does <b>not</b> mean that you transfer the rights of your work to the FSF, it's just so the FSF can legally manage them).</p>
<p>In any case, translating nano is very easy. Just grab the <b>nano.pot</b> file from the latest and greatest nano distribution (it's in the <b>po/</b> directory) and translate each line into your native language on the <b>msgstr</b> line. When you're done, you should send it to the TP's central po repository.</p></blockquote>
<h2><a name="5.2"></a>5.2. I don't like the translation for &lt;x&gt; in my language. How can I fix it?</h2>
<blockquote><p>The best way would probably be to e-mail the person listed in the <code>Last-Translator:</code> field in the <b>&lt;your_language&gt;.po</b> file with your suggested corrections and they can make the changes reach the nano-devel list.</p></blockquote>
<hr width="100%">
<h1><a name="6"></a>6. Advocacy and Licensing</h1>
<h2><a name="6.1"></a>6.1. Why should I use nano instead of Pico?</h2>
<blockquote><p>There are many reasons to use nano instead of Pico, a more complete list can be found at the <a href="http://www.nano-editor.org">nano homepage</a>.</p></blockquote>
<h2><a name="6.2"></a>6.2. Why should I use Pico instead of nano?</h2>
<blockquote><p>Again, check out the <a href="http://www.nano-editor.org">nano homepage</a> for a good summary of reasons. It really is a matter of personal preference as to which editor you should use. If you're the type of person who likes using the original version of a program, then Pico is the editor for you. If you're looking for a few more features and a 'better' license as far as adding your own changes (sacrificing mailer integration with Pine), nano is the way to go.</p></blockquote>
<h2><a name="6.3"></a>6.3. What is so bad about the Pine license?</h2>
<blockquote><p>The U of W license for Pine and Pico is not considered truly Free Software according to both the Free Software Foundation and the <a href="http://www.debian.org/social_contract#guidelines">Debian Free Software Guidelines</a>. The main problem regards the limitations on distributing derived works: according to UW, you can distribute their software, and you can modify it, but you can not do both, i.e. distribute modified binaries.</p></blockquote>
<h2><a name="6.4"></a>6.4. Okay, well what mail program should I use then?</h2>
<blockquote><p>If you are looking to use a Free Software program similar to Pine and emacs is not your thing, you should definitely take a look at <a href="http://www.mutt.org">mutt</a>. It is a full-screen, console based mail program that actually has a lot more flexibility than Pine, but has a keymap included in the distribution that allows you to use the same keystrokes as Pine would to send and receive mail. It's also licensed under the GPL.</p></blockquote>
<h2><a name="6.5"></a>6.5. Why doesn't UW simply change their license?</h2>
<blockquote><p>You're really not asking the right person here. I (Chris) waited a long time to see if UW would change their license because of the amount of high quality software being released and developed under the GPL without being taken advantage of by malicious corporate entities or other baddies, but no such luck so far.</p></blockquote>
<h2><a name="6.6"></a>6.6. What if tomorrow UW changes the license to be truly Free Software?</h2>
<blockquote><p>Honestly nothing would make me happier than to see that happen. Nano would continue to be developed independently until such time as Pico had all the features nano did or the projects merged. That just does not seem very likely given that there has been no sign of any changes in the past few years in a positive direction.</p></blockquote>
<hr width="100%">
<h1><a name="7"></a>7. Miscellaneous</h1>
<h2><a name="7.1"></a>7.1. Nano related mailing lists.</h2>
<blockquote><p>There are three mailing lists for nano hosted at <a href="http://savannah.gnu.org">Savannah</a>, info-nano, help-nano and nano-devel. Info-nano is a very low traffic list where new versions of nano are announced (surprise!) Help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. Nano-devel is a normally low, sometimes high traffic list for discussing the present and future development of nano. Here are links to where you can sign up for a given list:</p>
<p>info-nano - <a href="http://mail.gnu.org/mailman/listinfo/info-nano">http://mail.gnu.org/mailman/listinfo/info-nano</a><br>
help-nano - <a href="http://mail.gnu.org/mailman/listinfo/help-nano">http://mail.gnu.org/mailman/listinfo/help-nano</a><br>
nano-devel - <a href="http://mail.gnu.org/mailman/listinfo/nano-devel">http://mail.gnu.org/mailman/listinfo/nano-devel</a></p></blockquote>
<h2><a name="7.2"></a>7.2. I want to send the development team a big load of cash (or just a thank you).</h2>
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/v1.1/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v1.1/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
<h2><a name="7.3"></a>7.3. How do I submit a patch?</h2>
<blockquote><p>See Section <a href="#7.2">7.2</a>.</p></blockquote>
<h2><a name="7.4"></a>7.4. How do I join the development team?</h2>
<blockquote><p>The easiest way is to consistently send in good patches that add some needed functionality, fix a bug or two and/or make the program more optimized/efficient. Then ask nicely and you will probably be added to the Savannah development list and be given CVS write access after awhile. There is a lot of responsibility that goes along with being a team member, so don't think it's just something to add to your resume.</p></blockquote>
<h2><a name="7.5"></a>7.5. Can I have CVS write access?</h2>
<blockquote><p>Re-read Section <a href="#7.4">7.4</a> and you should know the answer.</p></blockquote>
<h2><a name="8"></a>8. ChangeLog</h2>
<blockquote><p>2002/10/25 - Misc. fixes and link updates (DLR).<br>
2002/09/10 - Another typo fix (DLR).<br>
2002/05/15 - Typo fix (DLR).<br>
2001/12/26 - Misc. fixes (Aaron S. Hawley, DLR).<br>
2001/10/02 - Update for Free Translation Project.<br>
2001/10/02 - Assorted fixes, Debian additions.<br>
2001/06/30 - Silly typo fix.<br>
2001/05/05 - Spelling fixes by David Lawrence Ramsey.<br>
2001/05/02 - Misc fixes.<br>
2001/03/26 - Typo fix in an URL.<br>
2001/02/17 - Advocacy updates.<br>
2001/02/15 - Added GNU notes for 0.9.99pre3.<br>
2001/02/06 - Typo fixes.<br>
2001/01/14 - Added note about NumLock glitch.<br>
2001/01/10 - Linux -&gt; GNU/Linux.<br>
2001/01/09 - Added &quot;making exe smaller&quot; section.<br>
2000/12/19 - Typo and assorted error fixes.<br>
2000/11/28 - Added blurb about make install-strip.<br>
2000/11/19 - Changed Debian frozen to stable.<br>
2000/11/18 - Previous string display (4.5).<br>
2000/09/27 - Moved addresses to nano-editor.org.<br>
2000/06/31 - Initial framework.</p></blockquote>
<p>$Id$</p>
</body>
</html>

Просмотреть файл

@ -1333,7 +1333,7 @@ int write_file(const char *name, int tmp, int append, int nonamechange)
#ifndef NANO_SMALL
/* We backup only if the backup toggle is set, the file isn't
temporary, and the file already exists. Furthermore, if we aren't
appending, prepending, or writing a selection, also backup only if
appending, prepending, or writing a selection, we backup only if
the file has not been modified by someone else since nano opened
it. */
if (ISSET(BACKUP_FILE) && !tmp && realexists == 0 &&
@ -1381,7 +1381,7 @@ int write_file(const char *name, int tmp, int append, int nonamechange)
fclose(f);
if (chmod(backupname, originalfilestat.st_mode) == -1)
statusbar(_("Could not set permissions %o on backup %s: %s"),
statusbar(_("Could not set permissions %o on backup %s: %s"),
originalfilestat.st_mode, backupname,
strerror(errno));
@ -1803,7 +1803,7 @@ int do_writeout(const char *path, int exiting, int append)
/* Here's where we allow the selected text to be written to
a separate file. */
if (ISSET(MARK_ISSET) && !exiting) {
filestruct *fileagebak = fileage;
filestruct *fileagebak = fileage;
filestruct *filebotbak = filebot;
filestruct *cutback = cutbuffer;
int oldmod = ISSET(MODIFIED);
@ -2749,7 +2749,7 @@ char *do_browser(const char *inpath)
(int) st.st_size >> 10);
}
/* Hilight the currently selected file/dir */
/* Highlight the currently selected file/dir */
if (j == selected)
wattron(edit, A_REVERSE);
waddstr(edit, foo);

9
nano.1
Просмотреть файл

@ -6,7 +6,7 @@
.\" Public License for copying conditions. There is NO warranty.
.\"
.\" $Id$
.TH NANO 1 "July 30, 2002"
.TH NANO 1 "November 1, 2002"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
@ -42,11 +42,12 @@ Write file in DOS format.
Enable multiple file buffers, if available.
.TP
.B \-I (\-\-ignorercfiles)
Don't look at /etc/nanorc or ~/.nanorc, if nanorc support is available.
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
available.
.TP
.B \-K (\-\-keypad)
Do not use the ncurses keypad() call unless necessary. Try this flag if
you find that the arrow keys on the numeric keypad do not work for you
Do not use the ncurses keypad() call unless necessary. Try this flag if
you find that the arrow keys on the numeric keypad do not work for you
under nano.
.TP
.B \-M (\-\-mac)

Просмотреть файл

@ -3,7 +3,7 @@ Content-type: text/html
<HTML><HEAD><TITLE>Manpage of NANO</TITLE>
</HEAD><BODY>
<H1>NANO</H1>
Section: User Commands (1)<BR>Updated: October 13, 2002<BR><A HREF="#index">Index</A>
Section: User Commands (1)<BR>Updated: November 1, 2002<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
@ -59,12 +59,13 @@ Enable multiple file buffers, if available.
<DT><B>-I (--ignorercfiles)</B>
<DD>
Don't look at /etc/nanorc or ~/.nanorc, if nanorc support is available.
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
available.
<DT><B>-K (--keypad)</B>
<DD>
Do not use the ncurses keypad() call unless necessary. Try this flag if
you find that the arrow keys on the numeric keypad do not work for you
Do not use the ncurses keypad() call unless necessary. Try this flag if
you find that the arrow keys on the numeric keypad do not work for you
under nano.
<DT><B>-M (--mac)</B>
@ -235,6 +236,6 @@ used by others).
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 16:04:40 GMT, October 13, 2002
Time: 17:00:52 GMT, November 01, 2002
</BODY>
</HTML>

30
nano.c
Просмотреть файл

@ -685,7 +685,7 @@ void version(void)
printf(_(" GNU nano version %s (compiled %s, %s)\n"),
VERSION, __TIME__, __DATE__);
printf(_
(" Email: nano@nano-editor.org Web: http://www.nano-editor.org"));
(" Email: nano@nano-editor.org Web: http://www.nano-editor.org/"));
printf(_("\n Compiled options:"));
#ifdef DEBUG
@ -737,9 +737,6 @@ void version(void)
#ifdef ENABLE_NANORC
printf(" --enable-nanorc");
#endif
#ifdef ENABLE_UNDO
printf(" --enable-undo");
#endif
#ifdef USE_SLANG
printf(" --with-slang");
#endif
@ -785,9 +782,10 @@ int open_pipe(const char *command)
struct termios term, newterm;
#endif /* _POSIX_VDISABLE */
int cancel_sigs = 0;
/* cancel_sigs==1 means that sigaction failed without changing the
* signal handlers. cancel_sigs==2 means the signal handler was
* changed, but the tcsetattr didn't succeed.
/* cancel_sigs == 1 means that sigaction() failed without changing
* the signal handlers. cancel_sigs == 2 means the signal handler
* was changed, but the tcsetattr didn't succeed.
*
* I use this variable since it is important to put things back when
* we finish, even if we get errors. */
@ -806,7 +804,7 @@ int open_pipe(const char *command)
dup2(fd[1], fileno(stderr));
/* If execl() returns at all, there was an error. */
execl("/bin/sh","sh","-c",command,0);
execl("/bin/sh", "sh", "-c", command, 0);
exit(0);
}
@ -822,12 +820,12 @@ int open_pipe(const char *command)
/* Before we start reading the forked command's output, we set
* things up so that ^C will cancel the new process. */
if (sigaction(SIGINT, NULL, &newaction)==-1) {
if (sigaction(SIGINT, NULL, &newaction) == -1) {
cancel_sigs = 1;
nperror("sigaction");
} else {
newaction.sa_handler = cancel_fork;
if (sigaction(SIGINT, &newaction, &oldaction)==-1) {
if (sigaction(SIGINT, &newaction, &oldaction) == -1) {
cancel_sigs = 1;
nperror("sigaction");
}
@ -871,7 +869,7 @@ int open_pipe(const char *command)
nperror("tcsetattr");
#endif /* _POSIX_VDISABLE */
if (cancel_sigs!=1 && sigaction(SIGINT, &oldaction, NULL) == -1)
if (cancel_sigs != 1 && sigaction(SIGINT, &oldaction, NULL) == -1)
nperror("sigaction");
return 0;
@ -1950,13 +1948,13 @@ size_t indent_length(const char *line)
* it maintains 2 after a . ! or ?). Note the terminating \0
* counts as a space.
*
* If !changes_allowed and justify_format needs to make a change, it
* If !changes_allowed and justify_format() needs to make a change, it
* returns 1, otherwise returns 0.
*
* If changes_allowed, justify_format() might make line->data
* shorter, and change the actual pointer with null_at().
*
* justify_format will not look at the first skip characters of line.
* justify_format() will not look at the first skip characters of line.
* skip should be at most strlen(line->data). The skip+1st character must
* not be whitespace. */
int justify_format(int changes_allowed, filestruct *line, size_t skip)
@ -2167,7 +2165,7 @@ int break_line(const char *line, int goal, int force)
return -1;
}
/* Perhaps the character after space_loc is a space. But because
* of justify_format, there can be only two adjacent. */
* of justify_format(), there can be only two adjacent. */
if (*(line - cur_loc + space_loc + 1) == ' ' ||
*(line - cur_loc + space_loc + 1) == '\0')
space_loc++;
@ -2361,7 +2359,7 @@ int do_justify(void)
* change the line, just say whether there are changes to be
* made. If there are, we do backup_lines(), which copies the
* original paragraph to the cutbuffer for unjustification, and
* then calls justify_format on the remaining lines. */
* then calls justify_format() on the remaining lines. */
if (first_mod_line == NULL &&
justify_format(0, current, indent_len))
first_mod_line = backup_lines(current, par_len, quote_len);
@ -2660,7 +2658,7 @@ void signal_init(void)
#ifdef _POSIX_VDISABLE
tcgetattr(0, &term);
/* Ignore ^s, much to Chris' chagrin */
/* Ignore ^S, much to Chris' chagrin */
term.c_cc[VSTOP] = _POSIX_VDISABLE;
#ifdef VDSUSP

136
nano.texi
Просмотреть файл

@ -40,7 +40,7 @@ manual provided the copyright notice and this permission notice are
preserved on all copies.
@iftex
Permission is granted to process this file through TeX and print the
Permission is granted to process this file through @TeX{} and print the
results, provided the printed document carries copying permission notice
identical to this one except for the removal of this paragraph (this
paragraph not being relevant to the printed manual).
@ -56,7 +56,7 @@ into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation
approved by the Foundation.
You may contact the author by:
You may contact the author by
e-mail: @email{chrisa@@asty.org}@*
@end titlepage
@ -91,12 +91,12 @@ internationalization support, and filename tab completion.
@node Overview, Command Line Options, Introduction, Introduction
@section Overview
@code{nano} [GNU long option] [option] +LINE [ @var{ file ...} ]
@code{nano} +LINE [GNU long option] [option] [ @var{file ...} ]
The original goal for @code{nano} was a complete bug-for-bug compatible
emulation of Pico, but consistency is now a slightly higher priority.
There is a flag to implement (nearly) complete Pico emulation, (option -p
or GNU long option --pico). This can also be toggled from within
or GNU long option @code{--pico}). This can also be toggled from within
@code{nano} by typing Meta-P. @xref{Pico Compatibility}, for more
info.
@ -120,7 +120,8 @@ Write file in DOS format.
Enable multiple file buffers, if available.
@item -I, --ignorercfiles
Don't look at /etc/nanorc or ~/.nanorc, if nanorc support is available.
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
available.
@item -K, --keypad
Do not use the ncurses keypad() call unless necessary. Try this flag if
@ -135,16 +136,19 @@ Do not convert files from DOS/Mac format.
@item -Q [str], --quotestr [str]
Set the quoting string for justifying. The default is
"^([ \t]*[|>:@}#])+" if regular expression support is available, or
"> " otherwise.
Set the quoting string for justifying. The default is "> ".
@quotation
@code{^([ \t]*[|>:@}#])+}
@end quotation
if regular expression support is available, or ``> '' otherwise. Note
that @code{\t} above stands for a literal Tab character.
@item -R, --regexp
Turns on regular expression search and search/replace.
Turn on regular expression search and search/replace.
@item -S, --smooth
Enables smooth scrolling.
Enable smooth scrolling.
@item -T [num], --tabsize=[num]
Set the displayed tab length to [num] columns.
@ -245,7 +249,7 @@ Start at line number LINE instead of the default of line 1.
@section Entering Text
All key sequences in @code{nano} are entered using the keyboard.
@code{nano} is a "modeless" editor, all keys with the exception of
@code{nano} is a ``modeless'' editor. All keys with the exception of
Control and Meta key sequences will enter text into the file being
edited.
@ -265,7 +269,7 @@ Meta key sequences can be entered in a number of
possible ways: Pressing the Escape key, then releasing it and pressing
the desired key, or holding down the Alt key while pressing the desired
key. This varies from keyboard to keyboard, and certain commercial
operating systems "swallow" the Alt key so that it never reaches the
operating systems ``swallow'' the Alt key so that it never reaches the
application. If your operating system does this, you should use the
Escape key to generate Meta key sequences.
@end itemize
@ -276,11 +280,11 @@ Escape key to generate Meta key sequences.
The titlebar is the line displayed at the top of the editor. There are
three sections: left, center and right. The section on the left displays
the version of @code{nano} being used. The center section displays the
current file name, or "New Buffer" if the file has not yet been named.
The section on the right will display "Modified" if the file has been
current file name, or ``New Buffer'' if the file has not yet been named.
The section on the right will display ``Modified'' if the file has been
modified since it was last saved or opened.
Special modes: When @code{nano} is in "File browser" mode, the center
Special modes: When @code{nano} is in ``File browser'' mode, the center
section will display the current directory instead of the filename.
@xref{The File Browser}.
@ -288,7 +292,7 @@ section will display the current directory instead of the filename.
@section The Statusbar
The statusbar is located three lines from the bottom of the screen (or
the bottom line in Expert Mode. @xref{Expert Mode}, for more info.
the bottom line in Expert Mode. @xref{Expert Mode}, for more info).
The Statusbar shows important and informational messages. Any error
messages that occur from using the editor will appear on the statusbar.
@ -301,7 +305,7 @@ the statusbar.
The Shortcut Lists are the two lines at the bottom of the screen which
show some of the more commonly used functions in the editor. The exact
functions which are displayed depend on whether Pico Compatibility Mode
functions which are displayed depend on whether Pico Compatibility
mode is enabled. @xref{Pico Compatibility}, for more info.
@node Online Help, Feature Toggles, Editor Basics, Top
@ -318,47 +322,47 @@ and ^V (Page Down) keys. ^X exits the help system.
Toggles allow you to change certain aspects of the editor that
would normally be done via command line flags. They are invoked via
certain Meta key sequenced. @xref{Special Functions}, for more info.
certain Meta key sequences. @xref{Special Functions}, for more info.
The following global toggles are available:
@table @code
@item Backup File Toggle (Meta-B)
toggles the -B (--backup) command line flag.
toggles the -B (@code{--backup}) command line flag.
@item DOS Format Toggle (Meta-D)
toggles the -D (--dos) command line flag.
toggles the -D (@code{--dos}) command line flag.
@item Multiple Files Toggle (Meta-F)
toggles the -F (--multibuffer) command line flag.
toggles the -F (@code{--multibuffer}) command line flag.
@item AutoIndent Toggle (Meta-I)
toggles the -i (--autoindent) command line flag.
toggles the -i (@code{--autoindent}) command line flag.
@item Cut To End Toggle (Meta-K)
toggles the -k (--cut) command line flag.
toggles the -k (@code{--cut}) command line flag.
@item Mouse Toggle (Meta-M)
toggles the -m (--mouse) command line flag.
toggles the -m (@code{--mouse}) command line flag.
@item Mac Format Toggle (Meta-O)
toggles the -M (--mac) command line flag.
toggles the -M (@code{--mac}) command line flag.
@item Pico Mode Toggle (Meta-P)
toggles the -p (--pico) command line flag.
toggles the -p (@code{--pico}) command line flag.
@xref{Pico Compatibility}, for more info.
@item Smooth Scrolling Toggle (Meta-S)
toggles the -s (--smooth) command line flag.
toggles the -S (@code{--smooth}) command line flag.
@item AutoWrap Toggle (Meta-W)
toggles the -w (--nowrap) command line flag.
toggles the -w (@code{--nowrap}) command line flag.
@item Expert/Nohelp Toggle (Meta-X)
toggles the -x (--nohelp) command line flag.
toggles the -x (@code{--nohelp}) command line flag.
@item Suspend Toggle (Meta-Z)
toggles the -z (--suspend) command line flag.
toggles the -z (@code{--suspend}) command line flag.
@item Open Previous File Toggle (Meta-<)
changes buffer to previously loaded file.
@ -366,9 +370,9 @@ changes buffer to previously loaded file.
@item Open Next File Toggle (Meta->)
changes buffer to next loaded file.
@end table
@node The File Browser, Pico Compatibility, Feature Toggles, Top
@chapter The File Browser
@ -376,8 +380,8 @@ When reading or writing files, pressing ^T will invoke the file browser.
Here, one can navigate directories in a graphical manner in order to
find the desired file.
Basic movement in the file browser is accomplished with he arrow keys
and page up/down. The behavior of the enter (or 's') key varies by what
Basic movement in the file browser is accomplished with the arrow keys
and page up/down. The behavior of the enter (or `s') key varies by what
is currently selected. If the currently selected object is a directory,
the file browser will enter and display the contents of the directory.
If the object is a file, this filename and path are copied to the
@ -391,23 +395,27 @@ differences apply to the default mode and Pico Compatibility mode:
@table @code
@item Displayed Shortcuts
By default, the following shortcuts are displayed in the Shortcut Lists:
By default, the following shortcuts are displayed in the Shortcut List:
^G ^O ^\ ^Y ^K ^C@*
^X ^R ^W ^V ^U ^T
@multitable @columnfractions .1 .1 .1 .1 .1 .1
@item ^G @tab ^O @tab ^\ @tab ^Y @tab ^K @tab ^C
@item ^X @tab ^R @tab ^W @tab ^V @tab ^U @tab ^T
@end multitable
Related functions are listed above or below each other by default. The
Justify function is not listed, instead the "Replace" function is
displayed. Also, he "Read File" and "WriteOut" functions are aligned for
consistency.
Justify function is not listed, instead the ``Replace'' function is
displayed. Also, the ``Read File'' and ``WriteOut'' functions are aligned
for consistency.
In Pico Compatibility mode, the default Pico shortcuts are displayed:
^G ^O ^R ^Y ^K ^C@*
^X ^J ^W ^V ^U ^T
@multitable @columnfractions .1 .1 .1 .1 .1 .1
@item ^G @tab ^O @tab ^R @tab ^Y @tab ^K @tab ^C
@item ^X @tab ^J @tab ^W @tab ^V @tab ^U @tab ^T
@end multitable
@item Previous String Text
By default, previously entered string for a function (search string,
By default, the previously entered string for a function (search string,
file name) will be placed on the statusbar, and is editable. This is
done so there is consistency across all functions. For example: even if
there is a previous replace string, it can always be deleted if one
@ -434,11 +442,13 @@ to force these functions to behave in the Pico fashion.
Building @code{nano} from source is fairly straightforward if you are familiar
with compiling programs with autoconf support:
tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of @code{nano})
cd nano-x.y.z/
./configure
make
make install
@itemize @bullet
@item tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of nano)
@item cd nano-x.y.z/
@item ./configure
@item make
@item make install
@end itemize
if you are looking to optimize @code{nano} for size, you may want to
consider the following command line options:
@ -453,34 +463,34 @@ Disable the tab completion code when reading or writing files.
Disable the justify (^J)/unjustify (^U) functions in the editor.
@item --disable-speller
Disables spell checker ability.
Disable spell checker ability.
@item --disable-help
Disables the help function (^G). Disabling this option makes the binary
Disable the help function (^G). Disabling this option makes the binary
much smaller, but makes it difficult for new users to learn more than
very basic things about using the editor.
@item --disable-browser
Disables the mini file browser (^O) when reading or writing files.
@item --enable-tiny
This options disables all the above. It also disables some of the larger
internals of the editor, like the marker code (^^) and the cut to line
(-k) option which it depends on to work properly. It also disables the
function toggles and mouse support.
@item --disable-wrapping
Disables all word wrapping in the editor. This also eliminates the -w
command line flag, as nonwrapping is then the default behavior.
Disable the mini file browser (^T) when reading or writing files.
@item --disable-mouse
Disables all mouse functionality. This also disables the -m command
line flag which enables the mouse functions.
Disable all mouse functionality. This also disables the -m command line
flag, which enables the mouse functions.
@item --disable-operatingdir
Disables setting of operating directory. This also disables the -o
Disable setting the operating directory. This also disables the -o
command line flag.
@item --enable-tiny
This option disables all the above. It also disables some of the larger
internals of the editor, like the marker code (^^) and the cut to line
(-k) option, which depends on the marker code to work properly. It also
disables the function toggles.
@item --disable-wrapping
Disable all word wrapping in the editor. This also eliminates the -w
command line flag, as nonwrapping is then the default behavior.
@item --disable-nls
Disables Native Language support. This will make the available GNU
@code{nano} translations unusable.

Просмотреть файл

@ -81,8 +81,9 @@
# syntax "short description" ["filename regex" ...]
# color foreground,background "regex" ["regex"...]
#
# Legal colors are: white, black, red, blue, green, yellow, purple, cyan
# You may use the prefix "bright" to mean a stronger color highlight
# Legal colors are: white, black, red, blue, green, yellow, purple,
# cyan. You may use the prefix "bright" to mean a stronger color
# highlight.
#
# To use multi-line regexes use the start="regex" end="regex" format.
#
@ -99,8 +100,9 @@
# color brightcyan "#elif" "#else" "#if"
# You will in general want your comments and strings to come last,
# because syntax highlighting rules will be applied in the order they are
# read in
# because syntax highlighting rules will be applied in the order they
# are read in. Note that quotes in regexes should not be escaped (use "
# instead of \").
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
# color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""

Просмотреть файл

@ -834,7 +834,7 @@ int do_find_bracket(void)
flagsave = flags;
SET(USE_REGEXP);
/* apparent near redundancy with regexp_pat[] here is needed, [][] works, [[]] doesn't */
/* apparent near redundancy with regexp_pat[] here is needed, [][] works, [[]] doesn't */
if (offset < (strlen(brackets) / 2)) { /* on a left bracket */
regexp_pat[1] = wanted_ch;
@ -852,7 +852,7 @@ int do_find_bracket(void)
search_last_line = 0;
if (findnextstr(1, 1, current, current_x, regexp_pat)) {
have_past_editbuff |= past_editbuff;
if (current->data[current_x] == ch_under_cursor) /* found identical bracket */
if (current->data[current_x] == ch_under_cursor) /* found identical bracket */
count++;
else { /* found complementary bracket */
if (!(--count)) {
@ -862,7 +862,7 @@ int do_find_bracket(void)
update_line(current, current_x);
placewewant = xplustabs();
reset_cursor();
break ;
break;
}
}
} else { /* didn't find either left or right bracket */

Просмотреть файл

@ -1659,7 +1659,7 @@ void dump_buffer_reverse(void) {
#endif /* DEBUG */
#ifdef NANO_EXTRA
#define CREDIT_LEN 52
#define CREDIT_LEN 53
#define XLCREDIT_LEN 8
void do_credits(void)
@ -1681,6 +1681,7 @@ void do_credits(void)
"Rob Siemborski",
"Rocco Corsi",
"David Lawrence Ramsey",
"David Benbennick",
"Ken Tyler",
"Sven Guckes",
"Florian KЎnig",
@ -1715,7 +1716,7 @@ void do_credits(void)
"", "", "", "",
"(c) 1999-2002 Chris Allegretta",
"", "", "", "",
"www.nano-editor.org"
"http://www.nano-editor.org/"
};
xlcredits[0] = _("The nano text editor");