Benno Schulenberg | 15 Nov 18:18 2015

Re: exit without saving

On Fri, Nov 13, 2015, at 13:23, Mike Brown wrote:
> Benno wrote:
> > I was thinking of ^Q (Quit), but sounds too much like quitting
> > the entire program.
> That's what I'm asking for.

Well, not quite: when nano has multiple files open, the ^R reject
key would not quit the program but just close the current buffer.

> ...^X
> "aw crap! I'm being asked for a filename to save, must not have permission to 
> edit not-mine.txt after all!"

But most of the time you would be wanting to save the edits
you made, no?  To then 'sudo cp' them to the actual file.

But never mind that.  :)  I think a discard-buffer key is a
good idea.



-- - A fast, anti-spam email service.
Benno Schulenberg | 13 Nov 10:50 2015

Re: exit without saving

Hello Mike,

Thanks for your feature suggestion.

On Fri, Nov 13, 2015, at 08:11, Mike Brown wrote:
> Feature request:
>    Meta-T  -  toggle -t / --tempfile command line option

Unfortunately, Meta-T is already taken.  Also, I don't like the
idea of having a toggle for this: if someone, during furious
typing, accidentally toggles this on without noticing, then
decides to discard the changes with ^X N, types ^X...

>    At the write file prompt, allow a control key to exit
>    without saving, e.g. ^X or ^Y.

Yes, I like that one.  I wouldn't use ^X though (too close
to ^C, too easy to discard the file when you just meant to
cancel the save), nor ^Y (feels too much like "Yes, save").

I was thinking of ^Q (Quit), but sounds too much like quitting
the entire program.  ^A (Abandon), ^D (Discard), ^K (Kill-it)
are already used for editing the filename.  So I would suggest
^R (Reject, Rubbish) or ^J (Junk-it).

> The goal is to make it easier to exit a 'nano -t' session without saving,

(Continue reading)

Mike Brown | 13 Nov 08:11 2015

exit without saving

Feature request:

   Meta-T  -  toggle -t / --tempfile command line option


   At the write file prompt, allow a control key to exit
   without saving, e.g. ^X or ^Y.

The goal is to make it easier to exit a 'nano -t' session without saving, e.g. 
as I often need to do when I press ^X and suddenly get a write file prompt 
because I'm not a user with permission to edit the file given on the command 
line. (I realize I could tell nano at that point to write to /dev/null, but it 
would be better to have a key combo that would exit without saving.)

This was asked about by someone in 2004, as well:
higuita | 31 Oct 06:04 2015

block comment


	I would like to know if nano can do comment block operations, like
	selecting several lines and then "comment out" all those
	lines. We can do the ident with meta-{  and meta-}, but is there
	any way to comment?

	If not, then this is one feature request (shift-meta-(key) could
	setup what is the comment character or start/end of comment)

Thanks in advance

Naturally the common people don't want war... but after all it is the
leaders of a country who determine the policy, and it is always a 
simple matter to drag the people along, whether it is a democracy, or
a fascist dictatorship, or a parliament, or a communist dictatorship.
Voice or no voice, the people can always be brought to the bidding of
the leaders. That is easy. All you have to do is tell them they are 
being attacked, and denounce the pacifists for lack of patriotism and
exposing the country to danger.  It works the same in every country.
           -- Hermann Goering, Nazi and war criminal, 1883-1946
Help-nano mailing list
Help-nano <at>
Matthew Hebley | 28 Oct 21:31 2015

How to change nano background color

I upgraded from nano to nano 2. Now the background always reverts from 
my shell background to black even if I turn off the rc file (nano -I).

How do I make nano 2 use the same background color as my shell?

Or, how do I set the background color in nano2?

Best regards

Rafael Filipe Lúcio Romão | 10 Sep 13:27 2015


I want nano source code, where I can get?

Rafael Romão

Help-nano mailing list
Help-nano <at>
Fergus Daly | 31 Mar 13:57 2015

Compiling nano from source, for Cygwin

Nano v.2.4.0 comes with Cygwin.
Just install Cygwin (making the appropriate selection of optional packages, of which nano is just one of
many) and Hey Presto, it works.
If you want something outside the options list, it can usually (often) be rendered available by
downloading the source e.g. from gnu and compiling (./configure ... make ... make install) from within
Recently a patch to 2.4.0 has been made available on nano-devel which I would like to try on a Cygwin
platform. I'll need to patch nano from source. So I downloaded the source.
./configure works fine.
make proceeds quite energetically for a while and then fails as follows:

gcc -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/local/share/locale\"
-DSYSCONFDIR=\"/usr/local/etc\" -D_XOPEN_SOURCE=600   -g -O2 -Wall -MT text.o -MD -MP -MF
.deps/text.Tpo -c -o text.o text.c
text.c: In function 'do_alt_speller':
text.c:2667:5: error: unknown type name '__time_t'
     __time_t timestamp;
Makefile:411: recipe for target 'text.o' failed
make[2]: *** [text.o] Error 1
make[2]: Leaving directory '/home/user/nano-2.4.0/src'
Makefile:395: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/user/nano-2.4.0'
Makefile:333: recipe for target 'all' failed
make: *** [all] Error 2

It is possible that I have not installed enough of Cygwin (the entire provision is huge) but generally
speaking I have found compilation to work all right. (I install gcc-core and any dependencies but stop
there. In the past I have had to be explicit about ... bison, flex ... and some others.) 
Can anybody offer advice on what package in Cygwin Devel (or other) I might be missing that is preventing
compilation of nano from source?
Or is there a tweak to the script Makefile that I need to attend to?
Thank you.
mike _ | 25 Mar 15:37 2015

nano-2.4.0-1.x86_64.rpm glibc version states that
nano-2.4.0-1.x86_64.rpm is "Binary RPM for x86_64 platform
(glibc2.4+)."  but it won't install on SLED 11 SP3 which has glibc
2.11. The package appears to actually require 2.14.

nano-2.4.0-1.src.rpm seems to build OK on SLED 11 SP3 though.

Fergus Daly | 24 Mar 08:51 2015

Altering DOS/Mac/Unix terminated text files

Hello -
Just started using nano 2.4.0. As with many previous versions
	nano -help
	-N    --noconvert    Don't convert files from DOS/Mac format
carrying the implication that without the switch -N, files will be converted to Unix format.
But this is not what happens.
	nano (no argument)
	nano -N
are identical: they don't convert. 
If you go back far enough the following beautiful behaviour is what happened with v.1.3.4:
	nano (no argument) = if not Unix, convert convert to Unix
	nano -D = if not DOS, convert to DOS
	nano -M = if not Mac, convert to Mac
	nano -N = do not change format
PLEASE could nano v.current be made to mimic the marvellous behaviour of 1.3.4?
Or, if not, how can I get
	nano {? switch} = if not Unix, convert to Unix 
Thank you.
Josu Lazkano | 20 Feb 21:27 2015

Compile for PowerPC


This is my first post in this list.

I love nano and I want to use it in my satellite receiver, it is based
in PowerPC. Here is the toolchain:

I have no idea how to compile it.

Anyone could help?

Thanks for your help.



Josu Lazkano
Hart Larry | 24 Jan 17:45 2015

Can I Cut Before Cursor?

Well, following up on an earlier message before I subscribed to this list. 
Essentially what I want to do is edit the contents of a pine addressbook and cut 
out everything before the word "whitelist" Sure it would be nice if there were 
an easy way in Nano to do this, but manually looking over 730 lines would be 
time consuming.
Now in answering a question about special symbols, NANO will not let me search 
for or replace a charactor called "null" at least thats what my screen-reader 
says it is. So even pasting a null in, NANO ignores it.
Another type of thing I cannot do in NANO, are searching/replace to nuke blank 
lines. You must work on a file like this:
sed '/^[ \t*]*$/d' in_file.txt > out_file.txt
Word-Perfect, at least when I was in DOS would let me work on soft-and-hard 
returns, but I am going to need `alot of asistance getting a Linux version 
And lastly, maybe would be nice having a current number of lines in a file, 
always near an end of screen, as they are when you first enter. Also, the nain 
NANO home page would be more helpful with links to the mailing lists, also in 
the toolbar you have many links on a single line, not so easy listing with 
speech. Thanks so much in advance for suggestions.