Re: exit without saving

Mike Brown <[email protected]>
Newsgroups gmane.editors.nano.general
Message-ID <[email protected]>
On Sun, Nov 15, 2015 at 06:18:13PM +0100, Benno Schulenberg wrote:
> > ...^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.

Oh you GNU/Linux people, thinking every OS comes with sudo. :)

Usually the edits are small and I don't mind discarding them, and
redoing them after I'm root. So to recap, these are my choices,
currently, when -t was given on the command line:

  ^Z, killall nano, su, run nano as root

  save to a writable location, su, move the file, chown or chmod
  
  open another shell, su, chown or chmod the file, ^X in first
  shell, chown or chmod it back in second shell, exit second shell

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

Anything to avoid the su / sudo and get me out of nano cleanly!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.